Fixing gflags HINTS variable names (adding missing “_DIR”).
- The HINTS variables for gflags were incorrectly used as
GFLAGS_[INCLUDE/LIBRARY]_HINTS when they should have been
GFLAGS_[INCLUDE/LIBRARY]_DIR_HINTS as per the docs.
- Also removing a completed TODO in the main CMakeLists.
- Updating method of extracting current directory in CeresConfig.cmake
to avoid use of CMAKE_CURRENT_LIST_DIR, which was not present in
CMake =< v2.8.3.
Change-Id: I42ae696e3b785febe48688d912f0f343e8947cb0
diff --git a/cmake/CeresConfig.cmake.in b/cmake/CeresConfig.cmake.in
index 64eaf9c..25218d5 100644
--- a/cmake/CeresConfig.cmake.in
+++ b/cmake/CeresConfig.cmake.in
@@ -77,7 +77,8 @@
ENDMACRO(CERES_REPORT_NOT_FOUND)
# Get the (current, i.e. installed) directory containing this file.
-SET(CURRENT_CONFIG_INSTALL_DIR ${CMAKE_CURRENT_LIST_DIR})
+GET_FILENAME_COMPONENT(CURRENT_CONFIG_INSTALL_DIR
+ "${CMAKE_CURRENT_LIST_FILE}" PATH)
# Record the state of the CMake module path when this script was called so
# that we can ensure that we leave it in the same state on exit as it was