https://github.com/greatscottgadgets/hackrf

 

GitHub - greatscottgadgets/hackrf: low cost software radio platform

low cost software radio platform. Contribute to greatscottgadgets/hackrf development by creating an account on GitHub.

github.com

 

Prerequisties for Visual Studio:

 

Download | CMake

Current development distribution Each night binaries are created as part of the testing process. Other than passing all of the tests in CMake, this version of CMake should not be expected to work in a production environment. It is being produced so that us

cmake.org

  • libusbx-1.0.18 or later
PS C:\dev\vcpkg> .\vcpkg install libusb:x64-windows

Computing installation plan...
The following packages will be built and installed:
    libusb[core]:x64-windows -> 1.0.26.11791#3
  * pkgconf[core]:x64-windows -> 1.8.0#5
  * vcpkg-msbuild[core]:x64-windows -> 2023-08-08
  * vcpkg-pkgconfig-get-modules[core]:x64-windows -> 2023-02-25
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
:
:
:
libusb provides CMake targets:

    find_package(libusb CONFIG REQUIRED)
    target_include_directories(main PRIVATE ${LIBUSB_INCLUDE_DIRS})
    target_link_libraries(main PRIVATE ${LIBUSB_LIBRARIES})
  • fftw-3.3.5 or later
PS C:\dev\vcpkg> .\vcpkg search fftw3
dlib[fftw3]                               fftw3 support for dlib
fftw3                    3.3.10#8         FFTW is a C subroutine library for computing the discrete Fourier transfor...
fftw3[avx]                                Builds part of the library with avx, sse2, sse
fftw3[avx2]                               Builds part of the library with avx2, fma, avx, sse2, sse
fftw3[openmp]                             Builds openmp enabled lib
fftw3[sse]                                Builds part of the library with sse
fftw3[sse2]                               Builds part of the library with sse2, sse
fftw3[threads]                            Enable threads in fftw3
matplotplusplus[fftw]                     fftw3 support for Matplot++

PS C:\dev\vcpkg> .\vcpkg install fftw3:x64-windows
Computing installation plan...
:
fftw3 provides CMake targets:

    # this is heuristically generated, and may not be correct
    find_package(FFTW3 CONFIG REQUIRED)
    target_link_libraries(main PRIVATE FFTW3::fftw3)

    find_package(FFTW3f CONFIG REQUIRED)
    target_link_libraries(main PRIVATE FFTW3::fftw3f)

    find_package(FFTW3l CONFIG REQUIRED)
    target_link_libraries(main PRIVATE FFTW3::fftw3l)
 

GitHub - GerHobbelt/pthread-win32: clone / cvs-import of pthread-win32 + local tweaks (including MSVC2008 - MSVC2022 project fil

clone / cvs-import of pthread-win32 + local tweaks (including MSVC2008 - MSVC2022 project files) - GitHub - GerHobbelt/pthread-win32: clone / cvs-import of pthread-win32 + local tweaks (including M...

github.com

cmake

hackrf\host\build> cmake ../ -G "Visual Studio 17 2022" -A x64 \
	-DLIBUSB_INCLUDE_DIR=C:\Dev\vcpkg\packages\libusb_x64-windows\include\libusb-1.0 \
    -DLIBUSB_LIBRARIES=C:\Dev\vcpkg\packages\libusb_x64-windows\lib\libusb-1.0.lib \
    -DTHREADS_PTHREADS_INCLUDE_DIR=D:\Dev\HackRF\pthread-win32 \
    -DTHREADS_PTHREADS_WIN32_LIBRARY=D:\Dev\HackRF\pthread-win32\windows\VS2022\bin\Release-Unicode-64bit-x64\pthread.lib \
    -DFFTW_INCLUDES=C:\Dev\vcpkg\packages\fftw3_x64-windows\include \
    -DFFTW_LIBRARIES=C:\Dev\vcpkg\packages\fftw3_x64-windows\lib\fftw3f.lib

CMake Deprecation Warning at CMakeLists.txt:3 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
CMake Deprecation Warning at libhackrf/CMakeLists.txt:24 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at hackrf-tools/CMakeLists.txt:24 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Configuring done
-- Generating done
-- Build files have been written to: D:/Dev/Defense/HackRF/hackrf/host/build

...

2023-08-30  02:46            18,307 ALL_BUILD.vcxproj
2023-08-30  02:06               288 ALL_BUILD.vcxproj.filters
2023-08-30  02:11               168 ALL_BUILD.vcxproj.user
2023-08-30  02:46            15,235 CMakeCache.txt
2023-08-30  02:48    <DIR>          CMakeFiles
2023-08-30  02:06             1,716 cmake_install.cmake
2023-08-30  02:06             1,486 cmake_uninstall.cmake
2023-08-30  02:46    <DIR>          hackrf-tools
2023-08-30  02:06            16,620 HackRF.sln
2023-08-30  02:06            10,139 INSTALL.vcxproj
2023-08-30  02:06               530 INSTALL.vcxproj.filters
2023-08-30  02:46    <DIR>          libhackrf
2023-08-30  02:46            19,742 uninstall.vcxproj
2023-08-30  02:06               722 uninstall.vcxproj.filters
2023-08-30  02:11    <DIR>          x64
2023-08-30  02:46            20,128 ZERO_CHECK.vcxproj
2023-08-30  02:06               531 ZERO_CHECK.vcxproj.filters

 

HackRF.sln 파일을 Microsoft Visual Studio Community 2022로 열여서 컴파일!

세 폴더에 컴파일된 파일들을 한 폴더에 모아서 사용하면 도작함!

 

TODO: pthread 까지 vcpkg로 설치해서 사용해 보면 좋을 듯

 

 

'OS > Windows' 카테고리의 다른 글

Apache Kafka  (0) 2021.10.12

+ Recent posts