Skip to content
Snippets Groups Projects
Commit 5a3d780c authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Fix for legacy Gaudi CMake compatibility

parent 1f6b6061
No related branches found
No related tags found
1 merge request!79"Modernize" CMake configuration
......@@ -54,4 +54,10 @@ include(G4CMakeMain)
if(GAUDI_LEGACY_CMAKE_SUPPORT)
set(PROJECT_VERSION ${${PROJECT_NAME}_VERSION})
include(${legacy_cmake_config_support})
# This is to match Geant4 install layout
install(FILES
${PROJECT_BINARY_DIR}/.metadata.cmake
DESTINATION ${GEANT4_CMAKE_DIR}
COMPONENT Development
)
endif()
......@@ -52,6 +52,18 @@ set(GEANT4_INSTALL_EXAMPLES OFF CACHE BOOL "")
option(GAUDI_LEGACY_CMAKE_SUPPORT "Enable compatibility with old-style CMake builds" "$ENV{GAUDI_LEGACY_CMAKE_SUPPORT}")
if(GAUDI_LEGACY_CMAKE_SUPPORT)
# make sure we have a BINARY_TAG CMake variable set
# (duplication from LegacyGaudiCMakeSupport.cmake, but needed here otherwise it's too late)
if(NOT BINARY_TAG)
if(NOT "$ENV{BINARY_TAG}" STREQUAL "")
set(BINARY_TAG $ENV{BINARY_TAG})
elseif(LHCB_PLATFORM)
set(BINARY_TAG ${LHCB_PLATFORM})
else()
message(AUTHOR_WARNING "BINARY_TAG not set")
endif()
endif()
# default install prefix when building in legacy mode
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/InstallArea/${BINARY_TAG}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment