Added libosmocore to build. Preparation for issue #85

This commit is contained in:
Roman Khassraf 2015-07-17 13:57:24 +02:00
parent f329ae5633
commit 9c58846b04
3 changed files with 48 additions and 1 deletions

View File

@ -93,6 +93,7 @@ find_package(Gnuradio)
find_package(Volk)
find_package(CppUnit)
find_package(Doxygen)
find_package(Libosmocore)
if(NOT GNURADIO_RUNTIME_FOUND)
message(FATAL_ERROR "GnuRadio Runtime required to compile gr-gsm")
@ -103,6 +104,9 @@ endif()
if(NOT CPPUNIT_FOUND)
message(FATAL_ERROR "CppUnit required to compile gr-gsm")
endif()
if(NOT LIBOSMOCORE_FOUND)
message(FATAL_ERROR "Libosmocore required to compile gr-gsm")
endif()
########################################################################
# Setup doxygen option
@ -124,6 +128,7 @@ include_directories(
${Boost_INCLUDE_DIRS}
${CPPUNIT_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${LIBOSMOCORE_INCLUDE_DIR}
)
link_directories(

View File

@ -0,0 +1,42 @@
find_package(PkgConfig)
pkg_check_modules(PC_libosmocore libosmocore)
set(LIBOSMOCORE_DEFINITIONS ${PC_LIBOSMOCORE_CFLAGS_OTHER})
find_path(
LIBOSMOCORE_INCLUDE_DIR
NAMES osmocom/core/application.h
HINTS ${PC_libosmocore_INCLUDEDIR}
${PC_libosmocore_INCLUDE_DIRS}
${CMAKE_INSTALL_PREFIX}/include
PATHS /usr/local/include
/usr/include
)
find_library(
LIBOSMOCORE_LIBRARY
NAMES libosmocore osmocore
HINTS ${PC_libosmocore_LIBDIR}
${PC_libosmocore_LIBRARY_DIRS}
${CMAKE_INSTALL_PREFIX}/lib/
${CMAKE_INSTALL_PREFIX}/lib64/
PATHS /usr/local/lib
/usr/lib
)
find_library(
LIBOSMOCORE_GSM_LIBRARY
NAMES libosmogsm osmogsm
HINTS ${PC_libosmocore_LIBDIR}
${PC_libosmocore_LIBRARY_DIRS}
${CMAKE_INSTALL_PREFIX}/lib/
${CMAKE_INSTALL_PREFIX}/lib64/
PATHS /usr/local/lib
/usr/lib
)
set(LIBOSMOCORE_LIBRARIES ${LIBOSMOCORE_LIBRARY} ${LIBOSMOCORE_GSM_LIBRARY})
set(LIBOSMOCORE_INCLUDE_DIRS ${LIBOSMOCORE_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(libosmocore DEFAULT_MSG LIBOSMOCORE_LIBRARY LIBOSMOCORE_INCLUDE_DIR)
mark_as_advanced(LIBOSMOCORE_INCLUDE_DIR LIBOSMOCORE_LIBRARY )

View File

@ -55,7 +55,7 @@ list(APPEND grgsm_sources
decryption/decryption_impl.cc )
add_library(gnuradio-grgsm SHARED ${grgsm_sources})
target_link_libraries(gnuradio-grgsm ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES}
target_link_libraries(gnuradio-grgsm ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES} ${LIBOSMOCORE_LIBRARIES}
# libraries required by plotting.h - have troubles to be installed by pybombs
# boost_iostreams
# boost_system