Simplify cmake checks related to libosmocore
This commit is contained in:
parent
e153e729cd
commit
ac140210c9
|
@ -155,13 +155,13 @@ endif()
|
|||
if(NOT CPPUNIT_FOUND)
|
||||
message(FATAL_ERROR "CppUnit required to compile gr-gsm")
|
||||
endif()
|
||||
|
||||
if(NOT LIBOSMOCORE_FOUND OR NOT LIBOSMOCODEC_FOUND OR NOT LIBOSMOGSM_FOUND)
|
||||
set(LOCAL_OSMOCOM ON)
|
||||
endif()
|
||||
|
||||
if(LOCAL_OSMOCOM)
|
||||
message(STATUS "Compiling with local osmocom libraries")
|
||||
unset(LIBOSMOCORE_FOUND)
|
||||
unset(LIBOSMOCODEC_FOUND)
|
||||
unset(LIBOSMOCODING_FOUND)
|
||||
elseif(NOT LIBOSMOCORE_FOUND OR NOT LIBOSMOCODEC_FOUND)
|
||||
message(STATUS "Compiling local version of libosmocore")
|
||||
elseif(NOT LIBOSMOCODING_FOUND)
|
||||
message(STATUS "Compiling local version of libosmocoding")
|
||||
endif()
|
||||
|
|
|
@ -48,7 +48,7 @@ macro(GRCC_COMPILE file_name)
|
|||
COMMAND "${CMAKE_COMMAND}" -E rename ${CMAKE_CURRENT_BINARY_DIR}/${file_name}.py ${CMAKE_CURRENT_BINARY_DIR}/${file_name}
|
||||
DEPENDS ${file_name}.grc
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endmacro(GRCC_COMPILE)
|
||||
|
||||
########################################################################
|
||||
|
|
|
@ -88,7 +88,7 @@ if(WIN32)
|
|||
list (APPEND grgsm_link_libraries ws2_32)
|
||||
endif()
|
||||
|
||||
if(LIBOSMOCORE_FOUND AND LIBOSMOCODEC_FOUND AND LIBOSMOGSM_FOUND)
|
||||
if(NOT LOCAL_OSMOCOM)
|
||||
list (APPEND grgsm_link_libraries ${LIBOSMOCORE_LIBRARIES} ${LIBOSMOCODEC_LIBRARIES} ${LIBOSMOGSM_LIBRARY})
|
||||
if(LIBOSMOCODING_FOUND)
|
||||
list (APPEND grgsm_link_libraries ${LIBOSMOCODING_LIBRARIES})
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
|
||||
if(NOT LIBOSMOCORE_FOUND OR NOT LIBOSMOCODEC_FOUND OR NOT LIBOSMOGSM_FOUND)
|
||||
if(LOCAL_OSMOCOM)
|
||||
add_subdirectory(osmocom/core)
|
||||
add_subdirectory(osmocom/codec)
|
||||
add_subdirectory(osmocom/gsm)
|
||||
|
|
Loading…
Reference in New Issue