mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-07-10 11:05:22 +02:00
new cmake stuff
This commit is contained in:
18
sdrpp_module.cmake
Normal file
18
sdrpp_module.cmake
Normal file
@ -0,0 +1,18 @@
|
||||
# Get needed values depending on if this is in-tree or out-of-tree
|
||||
if (NOT SDRPP_CORE_ROOT)
|
||||
set(SDRPP_CORE_ROOT "@SDRPP_CORE_ROOT@")
|
||||
endif ()
|
||||
if (NOT SDRPP_MODULE_COMPILER_ARGS)
|
||||
set(SDRPP_MODULE_COMPILER_ARGS @SDRPP_MODULE_COMPILER_ARGS@)
|
||||
endif ()
|
||||
|
||||
# Created shared lib and link to core
|
||||
add_library(${PROJECT_NAME} SHARED ${SRC})
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE sdrpp_core)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE "${SDRPP_CORE_ROOT}/src/")
|
||||
|
||||
# Set compile arguments
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE ${SDRPP_MODULE_COMPILER_ARGS})
|
||||
|
||||
# Install directives
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION lib/sdrpp/plugins)
|
Reference in New Issue
Block a user