mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-30 10:54:50 +00:00
Fix building when gflags is installed in the system but glog is not
This commit is contained in:
parent
3fd7639b6d
commit
38bf45079f
@ -553,16 +553,18 @@ if (NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
|||||||
set(TARGET_GFLAGS gflags-${gflags_RELEASE})
|
set(TARGET_GFLAGS gflags-${gflags_RELEASE})
|
||||||
if(${LOCAL_GFLAGS})
|
if(${LOCAL_GFLAGS})
|
||||||
set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_SHARED_LIBS})
|
set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_SHARED_LIBS})
|
||||||
|
set(GFLAGS_LIBRARY_DIR_TO_LINK ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib)
|
||||||
else(${LOCAL_GFLAGS})
|
else(${LOCAL_GFLAGS})
|
||||||
set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_LIBS})
|
set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_LIBS})
|
||||||
|
set(GFLAGS_LIBRARY_DIR_TO_LINK ${GFlags_LIBRARY_DIRS})
|
||||||
endif(${LOCAL_GFLAGS})
|
endif(${LOCAL_GFLAGS})
|
||||||
|
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags
|
||||||
"#!/bin/sh
|
"#!/bin/sh
|
||||||
export CPPFLAGS=-I${GFlags_INCLUDE_DIRS}
|
export CPPFLAGS=-I${GFlags_INCLUDE_DIRS}
|
||||||
export LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib
|
export LDFLAGS=-L${GFLAGS_LIBRARY_DIR_TO_LINK}
|
||||||
export LIBS=${GFLAGS_LIBRARIES_TO_LINK}
|
export LIBS=\"${GFLAGS_LIBRARIES_TO_LINK} -lc++\"
|
||||||
export CXXFLAGS=\"-stdlib=libc++\"
|
export CXXFLAGS=\"-stdlib=libc++\"
|
||||||
export CC=clang
|
export CC=clang
|
||||||
export CXX=clang++
|
export CXX=clang++
|
||||||
@ -577,7 +579,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure")
|
|||||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags
|
||||||
"#!/bin/sh
|
"#!/bin/sh
|
||||||
export CPPFLAGS=-I${GFlags_INCLUDE_DIRS}
|
export CPPFLAGS=-I${GFlags_INCLUDE_DIRS}
|
||||||
export LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib
|
export LDFLAGS=-L${GFLAGS_LIBRARY_DIR_TO_LINK}
|
||||||
export LIBS=${GFLAGS_LIBRARIES_TO_LINK}
|
export LIBS=${GFLAGS_LIBRARIES_TO_LINK}
|
||||||
cd ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/
|
cd ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/
|
||||||
aclocal
|
aclocal
|
||||||
|
Loading…
Reference in New Issue
Block a user