Config.cmake.in 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. # - Config file for @CMAKE_PROJECT_NAME@
  2. # It defines the following variables
  3. # @PACKAGE_NAME@_INCLUDE_DIR - include directories for @CMAKE_PROJECT_NAME@
  4. # Compute paths
  5. get_filename_component(OUR_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
  6. if(EXISTS "${OUR_CMAKE_DIR}/CMakeCache.txt")
  7. # In build tree
  8. set(@PACKAGE_NAME@_INCLUDE_DIR @GTSAM_SOURCE_DIR@ CACHE PATH "@PACKAGE_NAME@ include directory")
  9. else()
  10. # Find installed library
  11. set(@PACKAGE_NAME@_INCLUDE_DIR "${OUR_CMAKE_DIR}/@CONF_REL_INCLUDE_DIR@" CACHE PATH "@PACKAGE_NAME@ include directory")
  12. endif()
  13. # Find dependencies, required by cmake exported targets:
  14. include(CMakeFindDependencyMacro)
  15. # Allow using cmake < 3.8
  16. if(${CMAKE_VERSION} VERSION_LESS "3.8.0")
  17. find_package(Boost @BOOST_FIND_MINIMUM_VERSION@ COMPONENTS @BOOST_FIND_MINIMUM_COMPONENTS@)
  18. else()
  19. find_dependency(Boost @BOOST_FIND_MINIMUM_VERSION@ COMPONENTS @BOOST_FIND_MINIMUM_COMPONENTS@)
  20. endif()
  21. # Load exports
  22. include(${OUR_CMAKE_DIR}/@PACKAGE_NAME@-exports.cmake)
  23. # Load project-specific flags, if present
  24. if(EXISTS "${OUR_CMAKE_DIR}/@EXTRA_FILE@")
  25. include("${OUR_CMAKE_DIR}/@EXTRA_FILE@")
  26. endif()
  27. message(STATUS "@CMAKE_PROJECT_NAME@ include directory: ${@CMAKE_PROJECT_NAME@_INCLUDE_DIR}")