2023-02-14 15:25:05 +00:00
|
|
|
# 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 ()
|
2023-02-16 06:59:01 +00:00
|
|
|
if (NOT SDRPP_MODULE_COMPILER_FLAGS)
|
|
|
|
set(SDRPP_MODULE_COMPILER_FLAGS @SDRPP_MODULE_COMPILER_FLAGS@)
|
2023-02-14 15:25:05 +00:00
|
|
|
endif ()
|
|
|
|
|
2024-08-25 19:40:01 +00:00
|
|
|
# Add compiler definitions for the directories
|
2024-08-25 19:43:14 +00:00
|
|
|
add_definitions(-DSDRPP_MODULES_LOAD_DIR="${SDRPP_MODULES_LOAD_DIR}")
|
|
|
|
add_definitions(-DSDRPP_RES_LOAD_DIR="${SDRPP_RES_LOAD_DIR}")
|
2024-08-25 19:40:01 +00:00
|
|
|
|
2023-02-14 15:25:05 +00:00
|
|
|
# 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/")
|
2023-02-15 14:39:34 +00:00
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
|
2023-02-14 15:25:05 +00:00
|
|
|
|
|
|
|
# Set compile arguments
|
2023-02-16 06:59:01 +00:00
|
|
|
target_compile_options(${PROJECT_NAME} PRIVATE ${SDRPP_MODULE_COMPILER_FLAGS})
|
2023-02-14 15:25:05 +00:00
|
|
|
|
|
|
|
# Install directives
|
2024-08-25 19:40:01 +00:00
|
|
|
install(TARGETS ${PROJECT_NAME} DESTINATION ${SDRPP_MODULES_INSTALL_DIR})
|