aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasil Velichkov <vvvelichkov@gmail.com>2019-11-16 02:12:16 +0200
committerPiotr Krysik <ptrkrysik@gmail.com>2020-02-14 15:14:59 +0000
commitfd4454d6ec6e2e65db60519892e77dece299a6c7 (patch)
treebf90022a9c1f3ca02917042b3ce4438bf92c251c
parentbad4a81360ee642c8402f708ea2552532dcadcb1 (diff)
Fix compiling with the local libosmocore copyporting_to_gr38
-rw-r--r--lib/CMakeLists.txt22
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index e7dae14..bc1baeb 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -77,22 +77,32 @@ add_subdirectory(transmitter)
add_subdirectory(trx)
if(NOT LOCAL_OSMOCOM)
- list (APPEND grgsm_link_libraries ${LIBOSMOCORE_LIBRARIES} ${LIBOSMOCODEC_LIBRARIES} ${LIBOSMOGSM_LIBRARY})
+ list (APPEND grgsm_link_libraries ${LIBOSMOCORE_LIBRARY} ${LIBOSMOCODEC_LIBRARY} ${LIBOSMOGSM_LIBRARY})
if(LIBOSMOCODING_FOUND)
list (APPEND grgsm_link_libraries
- ${LIBOSMOCODING_LIBRARIES}
- )
+ ${LIBOSMOCODING_LIBRARY}
+ )
+ list (APPEND grgsm_include_directories
+ PUBLIC $<BUILD_INTERFACE:${LIBOSMOCORE_INCLUDE_DIR}>
+ )
+ else()
list (APPEND grgsm_include_directories
- ${LIBOSMOCORE_INCLUDE_DIR}
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/decoding>
)
endif()
-endif()
+else(NOT LOCAL_OSMOCOM)
+ list (APPEND grgsm_include_directories
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/decoding>
+ )
+endif(NOT LOCAL_OSMOCOM)
+
add_library(grgsm SHARED ${grgsm_sources})
-target_link_libraries(grgsm gnuradio::gnuradio-runtime gnuradio::gnuradio-filter volk osmocoding)
+target_link_libraries(grgsm gnuradio::gnuradio-runtime gnuradio::gnuradio-filter volk ${grgsm_link_libraries})
target_include_directories(grgsm
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/receiver>
+ ${grgsm_include_directories}
PUBLIC $<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
PUBLIC $<INSTALL_INTERFACE:include>
)