From b8f27d83702da197f1b8b4e5774cdcc05bd0f0f8 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 28 Nov 2019 15:29:27 +0100 Subject: [PATCH] Fix buiding when glog is not present --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 06570975d..c3a3e25be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1120,10 +1120,10 @@ if(NOT GFLAGS_FOUND) ExternalProject_Add(gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION} PREFIX ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION} GIT_REPOSITORY git://github.com/gflags/gflags.git - GIT_TAG master #v${GNSSSDR_GFLAGS_LOCAL_VERSION} + GIT_TAG v${GNSSSDR_GFLAGS_LOCAL_VERSION} SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION} BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION} - CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_LIB=ON -DBUILD_gflags_nothreads_LIB=OFF -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_LIB=ON -DBUILD_gflags_nothreads_LIB=ON -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} BUILD_COMMAND ${GFLAGS_BUILD_COMMAND} BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${GFLAGS_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX} UPDATE_COMMAND "" @@ -1391,7 +1391,6 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES "${GLOG_LIBRARIES}" ) - target_link_libraries(Glog::glog INTERFACE Gflags::gflags) endif() set(LOCAL_GLOG TRUE CACHE STRING "Glog downloaded and built automatically" FORCE)