mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-21 23:55:13 -05:00
Enable SigMF plugins on windows
This commit is contained in:
parent
fe56c1c11c
commit
3a79e63a92
@ -372,11 +372,18 @@ if(VS2019)
|
||||
set(HIDAPI_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/hidapi/x64/hidapi.lib" CACHE INTERNAL "")
|
||||
set(HIDAPI_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/hidapi/x64" CACHE INTERNAL "")
|
||||
|
||||
set(LIBSIGMF_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBSIGMF_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/libsigmf/include" CACHE INTERNAL "")
|
||||
set(LIBSIGMF_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/libsigmf/lib/libsigmf.lib" DbgHelp CACHE INTERNAL "")
|
||||
set(LIBSIGMF_LIBRARIES_DEBUG "${EXTERNAL_LIBRARY_FOLDER}/libsigmf/lib/libsigmfd.lib" DbgHelp CACHE INTERNAL "")
|
||||
set(LIBSIGMF_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/libsigmf/lib/" CACHE INTERNAL "")
|
||||
|
||||
# used on fixup_bundle phase
|
||||
set(WINDOWS_FIXUP_BUNDLE_LIB_DIRS
|
||||
"${EXTERNAL_LIBRARY_FOLDER}/fftw-3"
|
||||
"${EXTERNAL_LIBRARY_FOLDER}/libusb/MS64/dll"
|
||||
"${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/bin"
|
||||
"${EXTERNAL_LIBRARY_FOLDER}/libsigmf/lib"
|
||||
)
|
||||
elseif(ANDROID)
|
||||
set(EXTERNAL_LIBRARY_FOLDER "${CMAKE_SOURCE_DIR}/external/android")
|
||||
|
@ -228,6 +228,14 @@ elseif(WIN32 OR MINGW)
|
||||
)
|
||||
endforeach(openssl_dll)
|
||||
|
||||
file(GLOB LIBSIGMF_DLLS "${LIBSIGMF_DLL_DIR}/libsigmf*${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
foreach(libsigmf_dll ${LIBSIGMF_DLLS})
|
||||
get_filename_component(libsigmf_dll_name "${libsigmf_dll}" NAME)
|
||||
add_custom_target(copy_libsigmf_${libsigmf_dll_name} ALL
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${libsigmf_dll}" "${SDRANGEL_BINARY_BIN_DIR}/"
|
||||
)
|
||||
endforeach(libsigmf_dll)
|
||||
|
||||
# TODO we need a way to fixup_bundle() on the build bin/ directory without call install
|
||||
if(BUILD_GUI)
|
||||
install(CODE "
|
||||
@ -284,6 +292,9 @@ elseif(WIN32 OR MINGW)
|
||||
# OpenSSL
|
||||
install(DIRECTORY "${OPENSSL_DLL_DIR}/" DESTINATION "${INSTALL_LIB_DIR}"
|
||||
FILES_MATCHING PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
# libsigmf
|
||||
install(DIRECTORY "${LIBSIGMF_DLL_DIR}/" DESTINATION "${INSTALL_LIB_DIR}"
|
||||
FILES_MATCHING PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
|
||||
|
||||
install(CODE "
|
||||
|
@ -101,7 +101,7 @@ if (ENABLE_CHANNELRX_DEMODM17 AND CODEC2_FOUND)
|
||||
add_subdirectory(demodm17)
|
||||
endif()
|
||||
|
||||
if (ENABLE_CHANNELRX_SIGMFFILESINK AND LIBSIGMF_FOUND AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if (ENABLE_CHANNELRX_SIGMFFILESINK AND LIBSIGMF_FOUND)
|
||||
add_subdirectory(sigmffilesink)
|
||||
endif()
|
||||
|
||||
|
@ -62,7 +62,7 @@ if(ENABLE_SOAPYSDR AND SOAPYSDR_FOUND)
|
||||
add_subdirectory(soapysdrinput)
|
||||
endif()
|
||||
|
||||
if(LIBSIGMF_FOUND AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if(LIBSIGMF_FOUND)
|
||||
add_subdirectory(sigmffileinput)
|
||||
endif()
|
||||
|
||||
|
@ -19,6 +19,7 @@ set(sigmffileinput_HEADERS
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${LIBSIGMF_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if(NOT SERVER_MODE)
|
||||
@ -49,14 +50,20 @@ add_library(${TARGET_NAME} SHARED
|
||||
${sigmffileinput_SOURCES}
|
||||
)
|
||||
|
||||
if (NOT WIN32)
|
||||
link_directories(${Boost_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
target_link_libraries(${TARGET_NAME}
|
||||
Boost::disable_autolinking
|
||||
Qt::Core
|
||||
${TARGET_LIB}
|
||||
sdrbase
|
||||
${TARGET_LIB_GUI}
|
||||
swagger
|
||||
${LIBSIGMF_LIBRARIES}
|
||||
)
|
||||
target_link_libraries(${TARGET_NAME} optimized ${LIBSIGMF_LIBRARIES})
|
||||
target_link_libraries(${TARGET_NAME} debug ${LIBSIGMF_LIBRARIES_DEBUG})
|
||||
|
||||
install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER})
|
||||
|
||||
|
@ -32,7 +32,7 @@ else(FFTW3F_FOUND)
|
||||
add_definitions(-DUSE_KISSFFT)
|
||||
endif(FFTW3F_FOUND)
|
||||
|
||||
if (LIBSIGMF_FOUND AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if (LIBSIGMF_FOUND)
|
||||
set(sdrbase_SOURCES
|
||||
${sdrbase_SOURCES}
|
||||
dsp/sigmffilerecord.cpp
|
||||
@ -43,7 +43,6 @@ if (LIBSIGMF_FOUND AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
dsp/sigmffilerecord.h
|
||||
)
|
||||
include_directories(${LIBSIGMF_INCLUDE_DIR})
|
||||
set(sdrbase_LIBSIGMF_LIB ${LIBSIGMF_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (LIBSERIALDV_FOUND)
|
||||
@ -519,6 +518,10 @@ target_link_libraries(sdrbase
|
||||
qrtplib
|
||||
swagger
|
||||
)
|
||||
if (LIBSIGMF_FOUND)
|
||||
target_link_libraries(sdrbase optimized ${LIBSIGMF_LIBRARIES})
|
||||
target_link_libraries(sdrbase debug ${LIBSIGMF_LIBRARIES_DEBUG})
|
||||
endif()
|
||||
if (Qt6_FOUND)
|
||||
target_link_libraries(sdrbase
|
||||
Qt::Core5Compat
|
||||
|
Loading…
Reference in New Issue
Block a user