Skip to content
Snippets Groups Projects
Unverified Commit 03da7df8 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer Committed by GitHub
Browse files

Merge pull request #107 from ChimeraTK/update-project-template

update project template
parents ef273a3b d4601224
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ FUNCTION(add_dependency dependency_project_name required_version)
ENDFUNCTION(add_dependency)
# make sure that cmake finds modules provided by project-template.
# since with new cmake concept for imported targets, dependencies also search for implicit dependencies,
# since with new cmake concept for imported targets, dependencies also search for implicit dependencies,
# all projects using add_dependency also require this module path.
set(_projectTemplateModulePath ${CMAKE_SOURCE_DIR}/cmake/Modules)
# substr search is better than regex if paths have special characters
......@@ -62,3 +62,11 @@ string(FIND ":${CMAKE_MODULE_PATH}:" ":${_projectTemplateModulePath}:" _projectT
if (${_projectTemplateModulePathPos} EQUAL -1)
list(APPEND CMAKE_MODULE_PATH "${_projectTemplateModulePath}")
endif()
message(WARNING "
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You are using add_dependency() in your CMakeLists.txt which is deprecated and may lead to subtle problems. Please follow the project-template migration guide to cmake imported targets.
Furhter processing is delayed by 5 seconds.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
")
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 5.0)
......@@ -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)
find_package(ChimeraTK-ControlSystemAdapter-EPICS-IOC-Adapter 02.01 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)
find_package(ChimeraTK-ControlSystemAdapter-EPICS7-IOC-Adapter 02.01 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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment