| ## gflags CMake configuration file |
| |
| # library version information |
| set (@PACKAGE_NAME@_VERSION_STRING "@PACKAGE_VERSION@") |
| set (@PACKAGE_NAME@_VERSION_MAJOR @PACKAGE_VERSION_MAJOR@) |
| set (@PACKAGE_NAME@_VERSION_MINOR @PACKAGE_VERSION_MINOR@) |
| set (@PACKAGE_NAME@_VERSION_PATCH @PACKAGE_VERSION_PATCH@) |
| |
| # import targets |
| include ("${CMAKE_CURRENT_LIST_DIR}/@PACKAGE_NAME@-export.cmake") |
| |
| # installation prefix |
| get_filename_component (CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) |
| get_filename_component (_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_PREFIX_REL2CONFIG_DIR@" ABSOLUTE) |
| |
| # include directory |
| # |
| # Newer versions of CMake set the INTERFACE_INCLUDE_DIRECTORIES property |
| # of the imported targets. It is hence not necessary to add this path |
| # manually to the include search path for targets which link to gflags. |
| set (@PACKAGE_NAME@_INCLUDE_DIR "${_INSTALL_PREFIX}/@INCLUDE_INSTALL_DIR@") |
| |
| # default settings |
| if (NOT DEFINED @PACKAGE_NAME@_SHARED) |
| if (TARGET @PACKAGE_NAME@-static OR TARGET @PACKAGE_NAME@_nothreads-static) |
| set (@PACKAGE_NAME@_SHARED FALSE) |
| else () |
| set (@PACKAGE_NAME@_SHARED TRUE) |
| endif () |
| endif () |
| if (NOT DEFINED @PACKAGE_NAME@_NOTHREADS) |
| if (TARGET @PACKAGE_NAME@-static OR TARGET @PACKAGE_NAME@-shared) |
| set (@PACKAGE_NAME@_NOTHREADS FALSE) |
| else () |
| set (@PACKAGE_NAME@_NOTHREADS TRUE) |
| endif () |
| endif () |
| |
| # choose imported library target |
| if (@PACKAGE_NAME@_SHARED) |
| if (@PACKAGE_NAME@_NOTHREADS) |
| set (@PACKAGE_NAME@_LIBRARIES @PACKAGE_NAME@_nothreads-shared) |
| else () |
| set (@PACKAGE_NAME@_LIBRARIES @PACKAGE_NAME@-shared) |
| endif () |
| else () |
| if (@PACKAGE_NAME@_NOTHREADS) |
| set (@PACKAGE_NAME@_LIBRARIES @PACKAGE_NAME@_nothreads-static) |
| else () |
| set (@PACKAGE_NAME@_LIBRARIES @PACKAGE_NAME@-static) |
| endif () |
| endif () |
| if (NOT TARGET ${@PACKAGE_NAME@_LIBRARIES}) |
| message (FATAL_ERROR "Your @PACKAGE_NAME@ installation does not contain a ${@PACKAGE_NAME@_LIBRARIES} library!" |
| " Try a different combination of @PACKAGE_NAME@_SHARED and @PACKAGE_NAME@_NOTHREADS.") |
| endif () |
| |
| # unset private variables |
| unset (_INSTALL_PREFIX) |