diff --git a/CMakeLists.txt b/CMakeLists.txt index 33c19c34256d7..7f9dc79723aaa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -353,6 +353,9 @@ if (PARTHENON_ENABLE_ASCENT) find_package(Ascent REQUIRED NO_DEFAULT_PATH) endif() +# Installation configuration +include(GNUInstallDirs) + add_subdirectory(src) add_subdirectory(example) add_subdirectory(benchmarks) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 54a226c553831..236ef834c008c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -328,11 +328,7 @@ target_include_directories(parthenon PUBLIC $ ) -install(TARGETS parthenon EXPORT parthenonTargets - INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/parthenon" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -) +install(TARGETS parthenon EXPORT parthenonTargets) # Maintain directory structure in installed include files install(DIRECTORY . DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/parthenon" FILES_MATCHING PATTERN "*.hpp")