Skip to content

Commit e41888e

Browse files
build: Use more CMAKE_INSTALL_ vars
Instead of hardcoding `bin` and `include` use CMake variables from GNUInstallDirs. Also move setting of ROOT_INCLUDE_PATH more up, so that the examples have the right path.
1 parent ec63431 commit e41888e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ add_subdirectory(third_party)
271271

272272
# Set some useful variables
273273
SetBasicVariables()
274+
SET(ROOT_INCLUDE_PATH ${CMAKE_INSTALL_FULL_INCLUDEDIR})
274275

275276
# All the main / public components
276277
add_subdirectory(fairroot)
@@ -336,14 +337,13 @@ install(FILES ${CMAKE_BINARY_DIR}/check_system.csh
336337
Configure_File(${CMAKE_SOURCE_DIR}/cmake/scripts/fairroot-config.in ${CMAKE_BINARY_DIR}/fairroot-config @ONLY)
337338

338339
install(PROGRAMS ${CMAKE_BINARY_DIR}/fairroot-config
339-
DESTINATION bin
340+
DESTINATION ${CMAKE_INSTALL_BINDIR}
340341
)
341342

342343

343344
WRITE_CONFIG_FILE(config.sh)
344345
WRITE_CONFIG_FILE(config.csh)
345346
SET(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/fairbase/examples)
346-
SET(ROOT_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/include)
347347
WRITE_CONFIG_FILE(config.sh_install)
348348
WRITE_CONFIG_FILE(config.csh_install)
349349

0 commit comments

Comments
 (0)