diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d5e196..f0d6f76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,9 +15,26 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) ) endif() +# Install all common pages except Beamline_overview_images.json. +# That file is handled separately so the parent project can override it. install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pages/ DESTINATION . + PATTERN "Beamline_overview_images.json" EXCLUDE +) + +# The parent project may provide a different file through +# BEAMLINE_OVERVIEW_IMAGES_FILE. Otherwise use the common default. +if(NOT DEFINED BEAMLINE_OVERVIEW_IMAGES_FILE) + set( + BEAMLINE_OVERVIEW_IMAGES_FILE + "${CMAKE_CURRENT_SOURCE_DIR}/pages/Beamline_elements/Beamline_overview_images.json" + ) +endif() + +install( + FILES "${BEAMLINE_OVERVIEW_IMAGES_FILE}" + DESTINATION Beamline_elements ) install(