12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #-----------------------------------------------------------------------------
- # 头文件搜索路径
- #-----------------------------------------------------------------------------
- include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
- #-----------------------------------------------------------------------------
- # 自动添加include目录
- #-----------------------------------------------------------------------------
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
- #-----------------------------------------------------------------------------
- # 源码扫描
- #-----------------------------------------------------------------------------
- file(GLOB _header "*.h")
- file(GLOB _source "*.cpp")
- #-----------------------------------------------------------------------------
- # 添加动态库目标
- #-----------------------------------------------------------------------------
- add_library(ModelData
- ${_header}
- ${_source}
- )
- #-----------------------------------------------------------------------------
- # 添加接口声明宏
- #-----------------------------------------------------------------------------
- target_compile_definitions(ModelData PRIVATE "MODELDATA_API")
- list(APPEND _depend_library PythonModule Settings DataProperty MeshData Geometry BCBase ConfigOptions ParaClassFactory)
- list(APPEND _runtimes_libraries
- Qt5::Core Qt5::Gui Qt5::Xml Qt5::Widgets
- )
- #-----------------------------------------------------------------------------
- # 链接依赖库
- #-----------------------------------------------------------------------------
- target_link_libraries(ModelData PRIVATE
- ${_runtimes_libraries}
- ${_depend_library}
- )
- #-----------------------------------------------------------------------------
- # 添加依赖关系
- #-----------------------------------------------------------------------------
- add_dependencies(ModelData ${_depend_library})
- #-----------------------------------------------------------------------------
- # 添加运行时依赖关系
- #-----------------------------------------------------------------------------
- set(FastCAE_ModelData_Runtimes_Libraries ${_runtimes_libraries} PARENT_SCOPE)
|