aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CMakeLists.txt
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@gmail.com>2018-03-04 19:36:24 +0100
committerPiotr Krysik <ptrkrysik@gmail.com>2018-03-04 19:36:24 +0100
commit1a5e87ea1a80f26873c25c3f7866867c32d8d42c (patch)
treeddb56c0524bca3e4f1dca3bfda7bcffaac70941e /lib/CMakeLists.txt
parentd8a576618deb943b795ff5e283040054626f8042 (diff)
Conditional compilation of local libosmocore depending if there is or is not libosmocore installation present on the system
Diffstat (limited to 'lib/CMakeLists.txt')
-rw-r--r--lib/CMakeLists.txt17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 253353b..db440e4 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -81,17 +81,22 @@ set(grgsm_link_libraries "")
list (APPEND grgsm_link_libraries ${Boost_LIBRARIES})
list (APPEND grgsm_link_libraries ${GNURADIO_ALL_LIBRARIES})
list (APPEND grgsm_link_libraries ${VOLK_LIBRARIES})
-list (APPEND grgsm_link_libraries ${Boost_LIBRARIES})
if(WIN32)
- list (APPEND grgsm_link_libraries wsock32)
- list (APPEND grgsm_link_libraries ws2_32)
+ list (APPEND grgsm_link_libraries wsock32)
+ list (APPEND grgsm_link_libraries ws2_32)
endif()
+if(LIBOSMOCORE_FOUND AND LIBOSMOCODEC_FOUND)
+ list (APPEND grgsm_link_libraries ${LIBOSMOCORE_LIBRARIES} ${LIBOSMOCODEC_LIBRARIES})
+ if(LIBOSMOCODING_FOUND)
+ list (APPEND grgsm_link_libraries ${LIBOSMOCODING_LIBRARIES})
+ endif()
+endif()
+
+
add_library(grgsm SHARED ${grgsm_sources})
-target_link_libraries(grgsm ${grgsm_link_libraries} #${LIBOSMOCORE_LIBRARIES}
-# ${LIBOSMOCODEC_LIBRARIES}
-# ${LIBOSMOCODING_LIBRARIES}
+target_link_libraries(grgsm ${grgsm_link_libraries}
# libraries required by plotting.h - have troubles to be installed by pybombs
# boost_iostreams
# boost_system