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

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

update project template
parents d13e38d6 bd21e24e
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) ...@@ -54,7 +54,7 @@ FUNCTION(add_dependency dependency_project_name required_version)
ENDFUNCTION(add_dependency) ENDFUNCTION(add_dependency)
# make sure that cmake finds modules provided by project-template. # 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. # all projects using add_dependency also require this module path.
set(_projectTemplateModulePath ${CMAKE_SOURCE_DIR}/cmake/Modules) set(_projectTemplateModulePath ${CMAKE_SOURCE_DIR}/cmake/Modules)
# substr search is better than regex if paths have special characters # substr search is better than regex if paths have special characters
...@@ -62,3 +62,11 @@ string(FIND ":${CMAKE_MODULE_PATH}:" ":${_projectTemplateModulePath}:" _projectT ...@@ -62,3 +62,11 @@ string(FIND ":${CMAKE_MODULE_PATH}:" ":${_projectTemplateModulePath}:" _projectT
if (${_projectTemplateModulePathPos} EQUAL -1) if (${_projectTemplateModulePathPos} EQUAL -1)
list(APPEND CMAKE_MODULE_PATH "${_projectTemplateModulePath}") list(APPEND CMAKE_MODULE_PATH "${_projectTemplateModulePath}")
endif() 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 @@ ...@@ -29,18 +29,22 @@
if(ADAPTER STREQUAL "OPCUA") if(ADAPTER STREQUAL "OPCUA")
message("Building against the OPC UA ControlSystemAdater") message("Building against the OPC UA ControlSystemAdater")
find_package(ChimeraTK-ControlSystemAdapter-OPCUAAdapter 03.00 REQUIRED) 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) add_library(ChimeraTK::SelectedAdapter ALIAS ChimeraTK::ChimeraTK-ControlSystemAdapter-OPCUAAdapter)
elseif(ADAPTER STREQUAL "DOOCS") elseif(ADAPTER STREQUAL "DOOCS")
message("Building against the DOOCS ControlSystemAdater") message("Building against the DOOCS ControlSystemAdater")
find_package(ChimeraTK-ControlSystemAdapter-DoocsAdapter 01.08 REQUIRED) 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) add_library(ChimeraTK::SelectedAdapter ALIAS ChimeraTK::ChimeraTK-ControlSystemAdapter-DoocsAdapter)
elseif(ADAPTER STREQUAL "EPICSIOC") elseif(ADAPTER STREQUAL "EPICSIOC")
message("Building against the EPICS IOC ControlSystemAdater") 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) add_library(ChimeraTK::SelectedAdapter ALIAS ChimeraTK::ChimeraTK-ControlSystemAdapter-EPICS-IOC-Adapter)
elseif(ADAPTER STREQUAL "EPICS7IOC") elseif(ADAPTER STREQUAL "EPICS7IOC")
message("Building against the EPICS ver. 7.0 IOC ControlSystemAdater") 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) add_library(ChimeraTK::SelectedAdapter ALIAS ChimeraTK::ChimeraTK-ControlSystemAdapter-EPICS7-IOC-Adapter)
else() else()
message(FATAL_ERROR "Please select your ControlSystemAdapter to use by passing to the cmake command line:\n" 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