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}") ...@@ -29,7 +29,8 @@ set (PACKAGE_SOVERSION "${PACKAGE_VERSION_MAJOR}")
if (NOT GFLAGS_NAMESPACE) if (NOT GFLAGS_NAMESPACE)
# maintain binary backwards compatibility with gflags library version <= 2.0, # maintain binary backwards compatibility with gflags library version <= 2.0,
# but at the same time enable the use of the preferred new "gflags" namespace # 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 () endif ()
set (GFLAGS_NAMESPACE_SECONDARY "${GFLAGS_NAMESPACE}") set (GFLAGS_NAMESPACE_SECONDARY "${GFLAGS_NAMESPACE}")
list (REMOVE_DUPLICATES GFLAGS_NAMESPACE_SECONDARY) list (REMOVE_DUPLICATES GFLAGS_NAMESPACE_SECONDARY)
...@@ -76,7 +77,8 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS) ...@@ -76,7 +77,8 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
endif () endif ()
if (NOT GFLAGS_INCLUDE_DIR) 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 () else ()
if (IS_ABSOLUTE GFLAGS_INCLUDE_DIR) if (IS_ABSOLUTE GFLAGS_INCLUDE_DIR)
message (FATAL_ERROR "GFLAGS_INCLUDE_DIR must be a path relative to CMAKE_INSTALL_PREFIX/include") 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