SDRPlusPlus/source_modules/limesdr_source/CMakeLists.txt

39 lines
1.2 KiB
CMake
Raw Normal View History

2021-06-28 02:22:51 +02:00
cmake_minimum_required(VERSION 3.13)
project(limesdr_source)
file(GLOB SRC "src/*.cpp")
add_library(limesdr_source SHARED ${SRC})
target_link_libraries(limesdr_source PRIVATE sdrpp_core)
set_target_properties(limesdr_source PROPERTIES PREFIX "")
2021-10-04 03:31:13 +02:00
target_include_directories(limesdr_source PRIVATE "src/")
2021-10-04 02:34:17 +02:00
if (MSVC)
target_compile_options(limesdr_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(limesdr_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(limesdr_source PRIVATE -O3 -std=c++17)
endif ()
2021-06-28 02:22:51 +02:00
if (MSVC)
# Lib path
2021-10-04 03:31:13 +02:00
target_link_directories(limesdr_source PRIVATE "C:/Program Files/PothosSDR/lib")
2021-06-28 02:22:51 +02:00
2021-10-04 03:31:13 +02:00
target_link_libraries(limesdr_source PRIVATE LimeSuite)
2021-06-28 02:22:51 +02:00
else (MSVC)
find_package(PkgConfig)
# Not in pkg-config
2021-10-04 03:31:13 +02:00
target_link_libraries(limesdr_source PRIVATE LimeSuite)
2021-06-28 02:22:51 +02:00
# Include it because for some reason pkgconfig doesn't look here?
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
2023-01-13 22:05:01 +01:00
target_include_directories(limesdr_source PRIVATE "/usr/local/include")
2021-06-28 02:22:51 +02:00
endif()
endif ()
# Install directives
2023-01-13 22:05:01 +01:00
install(TARGETS limesdr_source DESTINATION lib/sdrpp/plugins)