diff --git a/cmake/set_control_system_adapter.cmake b/cmake/set_control_system_adapter.cmake index 6d52e98066d57beec304cc0ecfd7a6697f5100a0..d15dee996185eef8a1b994edc2c00bd15b04466c 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"