Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: allow to customize location of CMake target files #788

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)

# use gnu standard install directories
include(GNUInstallDirs)
set(Cabana_INSTALL_PACKAGEDIR "${CMAKE_INSTALL_DATADIR}/cmake/Cabana" CACHE PATH "Install location of CMake target files")

# point to cmake modules
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
Expand Down Expand Up @@ -97,7 +98,7 @@ Cabana_add_dependency( PACKAGE SILO )
if(SILO_FOUND)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindSILO.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Cabana )
DESTINATION ${Cabana_INSTALL_PACKAGEDIR} )
endif()

# find HDF5 (XDMF)
Expand Down Expand Up @@ -268,7 +269,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/CabanaConfig.cmakein
${CMAKE_CURRENT_BINARY_DIR}/CabanaConfig.cmake @ONLY)

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/CabanaConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/CabanaConfigVersion.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Cabana)
DESTINATION ${Cabana_INSTALL_PACKAGEDIR})

##---------------------------------------------------------------------------##
## Clang Format
Expand Down
2 changes: 1 addition & 1 deletion core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ install(TARGETS Core
install(EXPORT Cabana_Targets
FILE Cabana_Targets.cmake
NAMESPACE Cabana::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Cabana)
DESTINATION ${Cabana_INSTALL_PACKAGEDIR})

install(FILES ${HEADERS_PUBLIC} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

Expand Down
Loading