Commit 2a40e191 authored by Andreas Schuh's avatar Andreas Schuh

cmake: Add advanced cache entries for GFLAGS_NAMESPACE and GFLAGS_INCLUDE_DIR

parent 376ef823
......@@ -29,7 +29,8 @@ set (PACKAGE_SOVERSION "${PACKAGE_VERSION_MAJOR}")
if (NOT GFLAGS_NAMESPACE)
# maintain binary backwards compatibility with gflags library version <= 2.0,
# but at the same time enable the use of the preferred new "gflags" namespace
set (GFLAGS_NAMESPACE "google;${PACKAGE_NAME}")
set (GFLAGS_NAMESPACE "google;${PACKAGE_NAME}" CACHE STRING "Name(s) of library namespace (separate multiple options by semicolon)")
mark_as_advanced (GFLAGS_NAMESPACE)
endif ()
set (GFLAGS_NAMESPACE_SECONDARY "${GFLAGS_NAMESPACE}")
list (REMOVE_DUPLICATES GFLAGS_NAMESPACE_SECONDARY)
......@@ -76,7 +77,8 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
endif ()
if (NOT GFLAGS_INCLUDE_DIR)
set (GFLAGS_INCLUDE_DIR "${PACKAGE_NAME}")
set (GFLAGS_INCLUDE_DIR "${PACKAGE_NAME}" CACHE STRING "Name of include directory of installed header files")
mark_as_advanced (GFLAGS_INCLUDE_DIR)
else ()
if (IS_ABSOLUTE GFLAGS_INCLUDE_DIR)
message (FATAL_ERROR "GFLAGS_INCLUDE_DIR must be a path relative to CMAKE_INSTALL_PREFIX/include")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment