From cc5cf874770061dc3380c5aa3e6fe5555f11c753 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 4 Nov 2016 12:55:09 +0100 Subject: [PATCH] Fix automatic building of gflags and glog --- CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index efde2339d..fa6cea127 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -552,7 +552,7 @@ if (NOT GLOG_FOUND OR ${LOCAL_GFLAGS}) endif(NOT ${LOCAL_GFLAGS}) if(${LOCAL_GFLAGS}) - set(TARGET_GFLAGS ${gflags}) + set(TARGET_GFLAGS gflags-${gflags_RELEASE}) if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags "#!/bin/sh @@ -573,6 +573,11 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure") export CPPFLAGS=-I${GFlags_INCLUDE_DIRS} export LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib export LIBS=${GFlags_SHARED_LIBS} +cd ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/ +aclocal +automake --add-missing +autoreconf -vfi +cd ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure") file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} @@ -602,6 +607,11 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure") export CPPFLAGS=-I${GFlags_INCLUDE_DIRS} export LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib export LIBS=${GFlags_SHARED_LIBS} +cd ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/ +aclocal +automake --add-missing +autoreconf -vfi +cd ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure") file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}