From 1caf190b415971a10c9db1a0f5b849927487311b Mon Sep 17 00:00:00 2001 From: Martin Hierholzer <martin.hierholzer@desy.de> Date: Fri, 21 Apr 2023 10:24:30 +0200 Subject: [PATCH] fix(project-template): for cmake 3.16 (Ubuntu 20.04) problem was introduced with commit "imported targets for set_csa" --- cmake/set_control_system_adapter.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/set_control_system_adapter.cmake b/cmake/set_control_system_adapter.cmake index 6d52e98..d15dee9 100644 --- a/cmake/set_control_system_adapter.cmake +++ b/cmake/set_control_system_adapter.cmake @@ -29,18 +29,22 @@ if(ADAPTER STREQUAL "OPCUA") message("Building against the OPC UA ControlSystemAdater") find_package(ChimeraTK-ControlSystemAdapter-OPCUAAdapter 03.00 REQUIRED) + set_target_properties(ChimeraTK::ChimeraTK-ControlSystemAdapter-OPCUAAdapter PROPERTIES IMPORTED_GLOBAL TRUE) add_library(ChimeraTK::SelectedAdapter ALIAS ChimeraTK::ChimeraTK-ControlSystemAdapter-OPCUAAdapter) elseif(ADAPTER STREQUAL "DOOCS") message("Building against the DOOCS ControlSystemAdater") find_package(ChimeraTK-ControlSystemAdapter-DoocsAdapter 01.08 REQUIRED) + set_target_properties(ChimeraTK::ChimeraTK-ControlSystemAdapter-DoocsAdapter PROPERTIES IMPORTED_GLOBAL TRUE) add_library(ChimeraTK::SelectedAdapter ALIAS ChimeraTK::ChimeraTK-ControlSystemAdapter-DoocsAdapter) elseif(ADAPTER STREQUAL "EPICSIOC") message("Building against the EPICS IOC ControlSystemAdater") find_package(ChimeraTK-ControlSystemAdapter-EPICS-IOC-Adapter 02.00 REQUIRED) + set_target_properties(ChimeraTK::ChimeraTK-ControlSystemAdapter-EPICS-IOC-Adapter PROPERTIES IMPORTED_GLOBAL TRUE) add_library(ChimeraTK::SelectedAdapter ALIAS ChimeraTK::ChimeraTK-ControlSystemAdapter-EPICS-IOC-Adapter) elseif(ADAPTER STREQUAL "EPICS7IOC") message("Building against the EPICS ver. 7.0 IOC ControlSystemAdater") find_package(ChimeraTK-ControlSystemAdapter-EPICS7-IOC-Adapter 02.00 REQUIRED) + set_target_properties(ChimeraTK::ChimeraTK-ControlSystemAdapter-EPICS7-IOC-Adapter PROPERTIES IMPORTED_GLOBAL TRUE) add_library(ChimeraTK::SelectedAdapter ALIAS ChimeraTK::ChimeraTK-ControlSystemAdapter-EPICS7-IOC-Adapter) else() message(FATAL_ERROR "Please select your ControlSystemAdapter to use by passing to the cmake command line:\n" -- GitLab