Skip to content

Commit 94a0e27

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 dc006f4 commit 94a0e27

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
@@ -266,6 +266,7 @@ endif()
266266

267267
# Set some useful variables
268268
SetBasicVariables()
269+
SET(ROOT_INCLUDE_PATH ${CMAKE_INSTALL_FULL_INCLUDEDIR})
269270

270271
# All the main / public components
271272
add_subdirectory(fairroot)
@@ -338,14 +339,13 @@ install(FILES ${CMAKE_BINARY_DIR}/check_system.csh
338339
Configure_File(${CMAKE_SOURCE_DIR}/cmake/scripts/fairroot-config.in ${CMAKE_BINARY_DIR}/fairroot-config @ONLY)
339340

340341
install(PROGRAMS ${CMAKE_BINARY_DIR}/fairroot-config
341-
DESTINATION bin
342+
DESTINATION ${CMAKE_INSTALL_BINDIR}
342343
)
343344

344345

345346
WRITE_CONFIG_FILE(config.sh)
346347
WRITE_CONFIG_FILE(config.csh)
347348
SET(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/fairbase/examples)
348-
SET(ROOT_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/include)
349349
WRITE_CONFIG_FILE(config.sh_install)
350350
WRITE_CONFIG_FILE(config.csh_install)
351351

0 commit comments

Comments
 (0)