Skip to content

Commit

Permalink
Merge pull request #788 from ECP-copa/cmake_install_target
Browse files Browse the repository at this point in the history
cmake: allow to customize location of CMake target files
  • Loading branch information
streeve authored Oct 5, 2024
2 parents 861d291 + 82a0100 commit 40b6ed4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 40b6ed4

Please sign in to comment.