forked from pothosware/PothosSDR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildCubicSDR.cmake
50 lines (44 loc) · 1.64 KB
/
BuildCubicSDR.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
############################################################
## Pothos SDR environment build sub-script
##
## This script builds CubicSDR and dependencies
##
## * CubicSDR
############################################################
set(CUBIC_SDR_BRANCH master)
#only support msvc 2015 build to match dlls in CubicSDR/external
if (NOT MSVC14)
message(STATUS "!Skipping CubicSDR - only supported on VC14")
return()
endif()
############################################################
## Build CubicSDR
##
## -DWX_ROOT_DIR is a hack to prevent FindwxWidgets.cmake
## from clearing wxWidgets_LIB_DIR the first configuration.
############################################################
MyExternalProject_Add(CubicSDR
DEPENDS SoapySDR wxWidgets
GIT_REPOSITORY https://github.com/cjcliffe/CubicSDR.git
GIT_TAG ${CUBIC_SDR_BRANCH}
CMAKE_DEFAULTS ON
CMAKE_ARGS
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DWX_ROOT_DIR=${wxWidgets_ROOT_DIR}
-DwxWidgets_ROOT_DIR=${wxWidgets_ROOT_DIR}
-DwxWidgets_LIB_DIR=${wxWidgets_LIB_DIR}
-DFFTW_INCLUDES=${FFTW3F_INCLUDE_DIRS}
-DFFTW_LIBRARIES=${FFTW3F_LIBRARIES}
-DFFTW_DLL=${FFTW3F_LIBRARIES} #this gets installed to bin
-DSoapySDR_DIR=${CMAKE_INSTALL_PREFIX}
LICENSE_FILES LICENSE
)
ExternalProject_Get_Property(CubicSDR SOURCE_DIR)
#install pre-built liquid dsp dll from external/
install(
FILES ${SOURCE_DIR}/external/liquid-dsp/msvc/64/libliquid.dll
DESTINATION bin
)
list(APPEND CPACK_PACKAGE_EXECUTABLES "CubicSDR" "CubicSDR")
list(APPEND CPACK_CREATE_DESKTOP_LINKS "CubicSDR")