mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
db704e9f2c
@ -1046,11 +1046,13 @@ set(LOCAL_GFLAGS false)
|
|||||||
find_package(GFLAGS)
|
find_package(GFLAGS)
|
||||||
set_package_properties(GFLAGS PROPERTIES
|
set_package_properties(GFLAGS PROPERTIES
|
||||||
URL "https://github.com/gflags/gflags"
|
URL "https://github.com/gflags/gflags"
|
||||||
DESCRIPTION "C++ library that implements commandline flags processing"
|
|
||||||
PURPOSE "Used for commandline flags management."
|
PURPOSE "Used for commandline flags management."
|
||||||
TYPE REQUIRED
|
TYPE REQUIRED
|
||||||
)
|
)
|
||||||
if(NOT GFLAGS_FOUND)
|
if(NOT GFLAGS_FOUND)
|
||||||
|
set_package_properties(GFLAGS PROPERTIES
|
||||||
|
DESCRIPTION "C++ library that implements commandline flags processing"
|
||||||
|
)
|
||||||
message(STATUS " gflags library has not been found.")
|
message(STATUS " gflags library has not been found.")
|
||||||
message(STATUS " gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built automatically ")
|
message(STATUS " gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built automatically ")
|
||||||
message(STATUS " when doing 'make'.")
|
message(STATUS " when doing 'make'.")
|
||||||
@ -1109,6 +1111,16 @@ if(NOT GFLAGS_FOUND)
|
|||||||
set_package_properties(GFLAGS PROPERTIES
|
set_package_properties(GFLAGS PROPERTIES
|
||||||
PURPOSE "Gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'."
|
PURPOSE "Gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'."
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
if(GFLAGS_VERSION)
|
||||||
|
set_package_properties(GFLAGS PROPERTIES
|
||||||
|
DESCRIPTION "C++ library that implements commandline flags processing (found: v${GFLAGS_VERSION})"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set_package_properties(GFLAGS PROPERTIES
|
||||||
|
DESCRIPTION "C++ library that implements commandline flags processing"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@ -1124,11 +1136,13 @@ if(NOT ${ENABLE_OWN_GLOG})
|
|||||||
endif()
|
endif()
|
||||||
set_package_properties(GLOG PROPERTIES
|
set_package_properties(GLOG PROPERTIES
|
||||||
URL "https://github.com/google/glog"
|
URL "https://github.com/google/glog"
|
||||||
DESCRIPTION "C++ implementation of the Google logging module"
|
|
||||||
PURPOSE "Used for runtime internal logging."
|
PURPOSE "Used for runtime internal logging."
|
||||||
TYPE REQUIRED
|
TYPE REQUIRED
|
||||||
)
|
)
|
||||||
if(NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
if(NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
||||||
|
set_package_properties(GLOG PROPERTIES
|
||||||
|
DESCRIPTION "C++ implementation of the Google logging module"
|
||||||
|
)
|
||||||
message(STATUS " glog library has not been found")
|
message(STATUS " glog library has not been found")
|
||||||
if(NOT GFLAGS_FOUND)
|
if(NOT GFLAGS_FOUND)
|
||||||
message(STATUS " or it is likely not linked to gflags.")
|
message(STATUS " or it is likely not linked to gflags.")
|
||||||
@ -1285,6 +1299,16 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c
|
|||||||
set_package_properties(GLOG PROPERTIES
|
set_package_properties(GLOG PROPERTIES
|
||||||
PURPOSE "Glog v${GNSSSDR_GLOG_LOCAL_VERSION} will be downloaded and built when doing 'make'."
|
PURPOSE "Glog v${GNSSSDR_GLOG_LOCAL_VERSION} will be downloaded and built when doing 'make'."
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
if(GLOG_VERSION)
|
||||||
|
set_package_properties(GLOG PROPERTIES
|
||||||
|
DESCRIPTION "C++ implementation of the Google logging module (found: v${GLOG_VERSION})"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set_package_properties(GLOG PROPERTIES
|
||||||
|
DESCRIPTION "C++ implementation of the Google logging module"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT ENABLE_LOG)
|
if(NOT ENABLE_LOG)
|
||||||
|
@ -111,6 +111,17 @@ endif()
|
|||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(GFLAGS DEFAULT_MSG GFlags_LIBS GFlags_INCLUDE_DIRS)
|
find_package_handle_standard_args(GFLAGS DEFAULT_MSG GFlags_LIBS GFlags_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
if(GFLAGS_FOUND)
|
||||||
|
list(GET GFlags_LIBS 0 FIRST_DIR)
|
||||||
|
get_filename_component(GFlags_LIBS_DIR ${FIRST_DIR} DIRECTORY)
|
||||||
|
if(EXISTS ${GFlags_LIBS_DIR}/cmake/gflags/gflags-config-version.cmake)
|
||||||
|
include(${GFlags_LIBS_DIR}/cmake/gflags/gflags-config-version.cmake)
|
||||||
|
endif()
|
||||||
|
if(PACKAGE_VERSION)
|
||||||
|
set(GFLAGS_VERSION ${PACKAGE_VERSION})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(GFLAGS_FOUND AND NOT TARGET Gflags::gflags)
|
if(GFLAGS_FOUND AND NOT TARGET Gflags::gflags)
|
||||||
add_library(Gflags::gflags SHARED IMPORTED)
|
add_library(Gflags::gflags SHARED IMPORTED)
|
||||||
set_target_properties(Gflags::gflags PROPERTIES
|
set_target_properties(Gflags::gflags PROPERTIES
|
||||||
|
@ -41,6 +41,9 @@ else()
|
|||||||
set(LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/lib)
|
set(LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/lib)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include(FindPkgConfig)
|
||||||
|
pkg_check_modules(PC_GLOG libglog)
|
||||||
|
|
||||||
macro(_FIND_GLOG_LIBRARIES _var)
|
macro(_FIND_GLOG_LIBRARIES _var)
|
||||||
find_library(${_var}
|
find_library(${_var}
|
||||||
NAMES ${ARGN}
|
NAMES ${ARGN}
|
||||||
@ -75,6 +78,7 @@ macro(_FIND_GLOG_LIBRARIES _var)
|
|||||||
$ENV{GLOG_ROOT}/lib
|
$ENV{GLOG_ROOT}/lib
|
||||||
${GLOG_ROOT}/lib64
|
${GLOG_ROOT}/lib64
|
||||||
$ENV{GLOG_ROOT}/lib64
|
$ENV{GLOG_ROOT}/lib64
|
||||||
|
${PC_GLOG_LIBDIR}
|
||||||
PATH_SUFFIXES lib
|
PATH_SUFFIXES lib
|
||||||
)
|
)
|
||||||
mark_as_advanced(${_var})
|
mark_as_advanced(${_var})
|
||||||
@ -94,6 +98,7 @@ if(MSVC)
|
|||||||
PATHS
|
PATHS
|
||||||
${GLOG_ROOT}/src/windows
|
${GLOG_ROOT}/src/windows
|
||||||
${GLOG_ROOT}/src/windows/glog
|
${GLOG_ROOT}/src/windows/glog
|
||||||
|
${PC_GLOG_INCLUDEDIR}
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
# Linux/OS X builds
|
# Linux/OS X builds
|
||||||
@ -102,6 +107,7 @@ else()
|
|||||||
${GLOG_ROOT}/include/glog
|
${GLOG_ROOT}/include/glog
|
||||||
/usr/include/glog
|
/usr/include/glog
|
||||||
/opt/local/include/glog # default location in Macports
|
/opt/local/include/glog # default location in Macports
|
||||||
|
${PC_GLOG_INCLUDEDIR}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -118,15 +124,18 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(GLOG_FOUND)
|
|
||||||
message(STATUS "glog library found at ${GLOG_LIBRARIES}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set GLOG_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set GLOG_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(GLOG DEFAULT_MSG GLOG_LIBRARIES)
|
find_package_handle_standard_args(GLOG DEFAULT_MSG GLOG_LIBRARIES)
|
||||||
|
|
||||||
|
if(GLOG_FOUND)
|
||||||
|
message(STATUS "glog library found at ${GLOG_LIBRARIES}")
|
||||||
|
if(PC_GLOG_VERSION)
|
||||||
|
set(GLOG_VERSION ${PC_GLOG_VERSION})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
string(REGEX REPLACE "/glog$" "" VAR_WITHOUT ${GLOG_INCLUDE_DIR})
|
string(REGEX REPLACE "/glog$" "" VAR_WITHOUT ${GLOG_INCLUDE_DIR})
|
||||||
string(REGEX REPLACE "/windows$" "" VAR_WITHOUT ${VAR_WITHOUT})
|
string(REGEX REPLACE "/windows$" "" VAR_WITHOUT ${VAR_WITHOUT})
|
||||||
|
Loading…
Reference in New Issue
Block a user