mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-27 01:14:51 +00:00
Fix Debug building with Ninja
This commit is contained in:
parent
dde7d8f657
commit
67e70093c0
@ -1099,6 +1099,9 @@ if(NOT GFLAGS_FOUND)
|
||||
if(MSVC)
|
||||
set(GFLAGS_BUILD_COMMAND "cmake" "--build" "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}" "--config" "${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
if((CMAKE_BUILD_TYPE MATCHES Debug) AND (CMAKE_VERSION VERSION_GREATER "3.0.2"))
|
||||
set(GFLAGS_DEBUG_POSTFIX "_debug")
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
ExternalProject_Add(gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
@ -1117,24 +1120,23 @@ 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 v${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
GIT_TAG master #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}
|
||||
BUILD_COMMAND ${GFLAGS_BUILD_COMMAND}
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
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 ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
endif()
|
||||
# Note: -DBUILD_gflags_nothreads_LIB=ON is required as a workaround to a bug in gflags 2.2.2. This is fixed in gflags master branch
|
||||
|
||||
set(GFlags_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/include CACHE PATH "Local Gflags headers"
|
||||
)
|
||||
if((CMAKE_BUILD_TYPE MATCHES Debug) AND (CMAKE_VERSION VERSION_GREATER "3.0.2"))
|
||||
set(GFLAGS_DEBUG_POSTFIX "_debug")
|
||||
endif()
|
||||
|
||||
set(GFlags_LIBS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${GFLAGS_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
@ -1145,7 +1147,7 @@ if(NOT GFLAGS_FOUND)
|
||||
endif()
|
||||
if(MSVC)
|
||||
set(GFlags_LIBS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_BUILD_TYPE}/gflags_static.lib"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_BUILD_TYPE}/gflags_static${GFLAGS_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user