Skip to content

Commit f5575d3

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 5f34e34 commit f5575d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ endif()
259259

260260
# Set some useful variables
261261
SetBasicVariables()
262+
SET(ROOT_INCLUDE_PATH ${CMAKE_INSTALL_FULL_INCLUDEDIR})
262263

263264
# All the main / public components
264265
add_subdirectory(fairroot)
@@ -331,14 +332,13 @@ install(FILES ${CMAKE_BINARY_DIR}/check_system.csh
331332
Configure_File(${CMAKE_SOURCE_DIR}/cmake/scripts/fairroot-config.in ${CMAKE_BINARY_DIR}/fairroot-config @ONLY)
332333

333334
install(PROGRAMS ${CMAKE_BINARY_DIR}/fairroot-config
334-
DESTINATION bin
335+
DESTINATION ${CMAKE_INSTALL_BINDIR}
335336
)
336337

337338

338339
WRITE_CONFIG_FILE(config.sh)
339340
WRITE_CONFIG_FILE(config.csh)
340341
SET(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/fairbase/examples)
341-
SET(ROOT_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/include)
342342
WRITE_CONFIG_FILE(config.sh_install)
343343
WRITE_CONFIG_FILE(config.csh_install)
344344

0 commit comments

Comments
 (0)