You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.0 KiB

2 months ago
  1. if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER 3.0)
  2. include(GNUInstallDirs)
  3. install(
  4. DIRECTORY ${CMAKE_SOURCE_DIR}/src/carl/
  5. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/carl
  6. FILES_MATCHING REGEX ".*\.(h|tpp)$"
  7. )
  8. install(
  9. TARGETS lib_carl
  10. EXPORT carl_Targets
  11. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  12. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  13. ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  14. )
  15. if(BUILD_STATIC)
  16. install(
  17. TARGETS lib_carl_static
  18. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  19. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  20. ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  21. )
  22. endif()
  23. install(FILES ${CMAKE_BINARY_DIR}/carlConfig.install.cmake DESTINATION ${CMAKE_INSTALL_DIR} RENAME carlConfig.cmake)
  24. install(FILES ${CMAKE_BINARY_DIR}/carlConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_DIR})
  25. install(EXPORT carl_Targets FILE carlTargets.cmake DESTINATION ${CMAKE_INSTALL_DIR})
  26. else()
  27. message(STATUS "Disabled install target due to cmake version less than 3.1")
  28. endif()