Skip to content

Commit

Permalink
Use GNUInstallDirs to fix installation problems on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrady committed Oct 16, 2023
1 parent 7395ed5 commit d56b502
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 1 addition & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,7 @@ target_include_directories(parthenon PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/parthenon>
)

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")
Expand Down

0 comments on commit d56b502

Please sign in to comment.