加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
DAWorkbenchConfig.cmake.in 1.96 KB
一键复制 编辑 原始数据 按行查看 历史
尘中远 提交于 2023-12-28 17:29 . 更新文档
# DAWorkbench的config file 此处将列举所有的components
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
# 这里PROJECT_NAME就作为包名
set(_package_name @PROJECT_NAME@)
set(_${_package_name}_supported_components DAUtils DAAxOfficeWrapper DAMessageHandler DAPyBindQt DAPyScripts DAData DACommonWidgets DAPyCommonWidgets DAGraphicsView DAWorkFlow DAFigure DAGui DAInterface DAPluginSupport)
set(_${_package_name}_available_components "")
# 把DA_ENABLE_PYTHON变量传递到此处
set(DA_ENABLE_PYTHON @DA_ENABLE_PYTHON@)
# 遍历所有要导入的模块
foreach(_component ${${_package_name}_FIND_COMPONENTS})
# 首先判断是否在所支持列表中
if(_component IN_LIST _${_package_name}_supported_components)
set(__target ${_package_name}::${_component})
if(TARGET ${__target})
# 避免重复加载
continue()
else()
find_package(${_component}
REQUIRED
PATHS ${CMAKE_CURRENT_LIST_DIR}
)
endif()
else()
set(${_package_name}_FOUND FALSE)
set(${_package_name}_NOT_FOUND_MESSAGE "Unknown component: ${__target}.")
break()
endif()
endforeach()
if(NOT DEFINED @PROJECT_NAME@_FOUND)
set(@PROJECT_NAME@_FOUND TRUE)
set(@PROJECT_NAME@_VERSION "@PROJECT_VERSION@")
set(@PROJECT_NAME@_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@")
set(@PROJECT_NAME@_VERSION_MINOR "@PROJECT_VERSION_MINOR@")
set(@PROJECT_NAME@_VERSION_PATCH "@PROJECT_VERSION_PATCH@")
#set(@PROJECT_NAME@_VERSION_TWEAK "@PROJECT_VERSION_TWEAK@")
set(@PROJECT_NAME@_DESCRIPTION "@PROJECT_DESCRIPTION@")
set(@PROJECT_NAME@_HOMEPAGE_URL "@PROJECT_HOMEPAGE_URL@")
set(@PROJECT_NAME@_COMMIT "@PROJECT_VERSION_COMMIT@")
set(@PROJECT_NAME@_COMPILE_DATETIME "@PROJECT_COMPILE_DATETIME@")
endif()
include(FeatureSummary)
set_package_properties(@PROJECT_NAME@ PROPERTIES
DESCRIPTION "@PROJECT_DESCRIPTION@"
URL "@PROJECT_HOMEPAGE_URL@"
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化