From 1c08affe597cf3b1c10c4e81cdbc95ab9e4a4d23 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Fri, 14 Jul 2023 07:56:06 +0200 Subject: [PATCH] Rename CMAKE_{SOURCE,BIN}_DIR to PROJECT_{SOURCE,BIN}_DIR (#281) Co-authored-by: jmcarcell --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f81c84b0..d3bf36cad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,14 +14,14 @@ SET( ${PackageName}_VERSION_PATCH 1 ) SET( ${PackageName}_VERSION "${${PackageName}_VERSION_MAJOR}.${${PackageName}_VERSION_MINOR}" ) SET( ${PackageName}_SOVERSION "${${PackageName}_VERSION_MAJOR}.${${PackageName}_VERSION_MINOR}" ) -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake ) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake ) set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) #------------- set the default installation directory to be the source directory IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - SET( CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR} CACHE PATH + SET( CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR} CACHE PATH "install prefix path - overwrite with -D CMAKE_INSTALL_PREFIX = ..." FORCE ) MESSAGE(STATUS "CMAKE_INSTALL_PREFIX is ${CMAKE_INSTALL_PREFIX} - overwrite with -D CMAKE_INSTALL_PREFIX" ) @@ -74,8 +74,8 @@ endif() add_dd4hep_plugin(${PackageName} SHARED ${sources}) add_dd4hep_plugin(${PackageName}G4 SHARED ${G4sources}) -target_include_directories(${PackageName} PRIVATE ${CMAKE_SOURCE_DIR}/detector/include ) -target_include_directories(${PackageName}G4 PRIVATE ${CMAKE_SOURCE_DIR}/detector/include ) +target_include_directories(${PackageName} PRIVATE ${PROJECT_SOURCE_DIR}/detector/include ) +target_include_directories(${PackageName}G4 PRIVATE ${PROJECT_SOURCE_DIR}/detector/include ) target_include_directories(${PackageName} SYSTEM PUBLIC ${LCIO_INCLUDE_DIRS}) target_include_directories(${PackageName}G4 SYSTEM PUBLIC ${LCIO_INCLUDE_DIRS})