From 25763e6e502906c0a0dabf7e06e071b9cb6f80a2 Mon Sep 17 00:00:00 2001 From: Corentin Schreiber Date: Sat, 30 Nov 2024 09:50:15 +0000 Subject: [PATCH] Fix cmake --install ... --prefix ... for #196 --- CMakeLists.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36033218..067fdd68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,13 +145,13 @@ if (NOT SNITCH_HEADER_ONLY) target_include_directories(${SNITCH_TARGET_NAME} PUBLIC $ $ - $) + $) configure_snitch_exports(${SNITCH_TARGET_NAME}) install( FILES ${SNITCH_INCLUDES} - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/snitch) + DESTINATION include/snitch) else() # Build as a header-only library. set(SNITCH_TARGET_NAME snitch-header-only) @@ -175,15 +175,15 @@ else() add_dependencies(${SNITCH_TARGET_NAME} snitch-header-only-impl) target_sources(${SNITCH_TARGET_NAME} INTERFACE $ - $) + $) target_compile_features(${SNITCH_TARGET_NAME} INTERFACE cxx_std_20) target_include_directories(${SNITCH_TARGET_NAME} INTERFACE $ - $) + $) install( FILES ${PROJECT_BINARY_DIR}/snitch/snitch_all.hpp - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/snitch) + DESTINATION include/snitch) endif() # Common properties @@ -194,7 +194,7 @@ set_target_properties(${SNITCH_TARGET_NAME} PROPERTIES EXPORT_NAME snitch::${SNI install(TARGETS ${SNITCH_TARGET_NAME} EXPORT ${SNITCH_TARGET_NAME}-targets) install(EXPORT ${SNITCH_TARGET_NAME}-targets - DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/snitch COMPONENT Development) + DESTINATION lib/cmake/snitch COMPONENT Development) export(EXPORT ${SNITCH_TARGET_NAME}-targets) @@ -202,13 +202,13 @@ include(CMakePackageConfigHelpers) configure_package_config_file( "${PROJECT_SOURCE_DIR}/cmake/snitch-config.cmake.in" "${PROJECT_BINARY_DIR}/snitch-config.cmake" - INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + INSTALL_DESTINATION lib NO_CHECK_REQUIRED_COMPONENTS_MACRO NO_SET_AND_CHECK_MACRO) install(FILES "${PROJECT_BINARY_DIR}/snitch-config.cmake" - DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/snitch COMPONENT Development) + DESTINATION lib/cmake/snitch COMPONENT Development) # Setup tests if (SNITCH_DO_TEST) @@ -244,7 +244,7 @@ if (SNITCH_DO_TEST) add_dependencies(snitch-testlib snitch-header-only-impl) target_sources(snitch-testlib INTERFACE $ - $) + $) target_compile_features(snitch-testlib INTERFACE cxx_std_20) target_include_directories(snitch-testlib INTERFACE ${PROJECT_BINARY_DIR})