153 lines
6.0 KiB
CMake
153 lines
6.0 KiB
CMake
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 将点云与 mesh 表达合并,不再单独处理点云
|
|||
|
|
# 加载: 点云-> mesh
|
|||
|
|
# 处理: mesh->点云-> 处理模块 -> mesh
|
|||
|
|
#
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 头文件搜索路径
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
|
|||
|
|
|
|||
|
|
# boost
|
|||
|
|
include_directories(D:/vcpkg/installed/x64-windows/include)
|
|||
|
|
|
|||
|
|
# pcl
|
|||
|
|
include_directories(C:/PCL/3rdParty/FLANN/include)
|
|||
|
|
include_directories(C:/PCL/3rdParty/VTK/include/vtk-9.3)
|
|||
|
|
include_directories(C:/PCL/include/pcl-1.14)
|
|||
|
|
|
|||
|
|
# qt5
|
|||
|
|
include_directories(C:/Qt/5.15.2/msvc2019_64/include/QtQml)
|
|||
|
|
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 链接库
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
|
|||
|
|
# pcl
|
|||
|
|
link_directories("C:/PCL/3rdParty/FLANN/lib")
|
|||
|
|
link_directories("C:/VTK/lib")
|
|||
|
|
link_directories("C:/PCL/lib")
|
|||
|
|
|
|||
|
|
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 自动添加include目录
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 添加资源文件
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
set(_qrc "${CMAKE_CURRENT_SOURCE_DIR}/../qrc/qianfan.qrc")
|
|||
|
|
set(_lang "${CMAKE_CURRENT_SOURCE_DIR}/../qrc/translations.qrc")
|
|||
|
|
qt5_add_resources(_resource ${_qrc} ${_lang})
|
|||
|
|
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 源码扫描
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
file(GLOB _ui "*.ui")
|
|||
|
|
file(GLOB _header "*.h")
|
|||
|
|
file(GLOB _source "*.cpp")
|
|||
|
|
qt5_wrap_ui(_interface ${_ui})
|
|||
|
|
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 添加动态库目标
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
add_library(PluginWBFZExchangePlugin
|
|||
|
|
${_resource}
|
|||
|
|
${_interface}
|
|||
|
|
${_header}
|
|||
|
|
${_source}
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 链接库
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
|
|||
|
|
# pcl
|
|||
|
|
link_directories("C:/PCL/3rdParty/FLANN/lib")
|
|||
|
|
link_directories("C:/VTK/lib")
|
|||
|
|
link_directories("C:/PCL/lib")
|
|||
|
|
|
|||
|
|
find_package(Qt5 REQUIRED COMPONENTS Core Quick Sql Core Xml Opengl Gui Svg Xmlpatterns Uitools Widgets Qml Printsupport Sensors Quickwidgets Quick Concurrent Openglextensions Charts Datavisualization)
|
|||
|
|
find_package(PCL )
|
|||
|
|
|
|||
|
|
# boost
|
|||
|
|
include_directories(D:/vcpkg/installed/x64-windows/include)
|
|||
|
|
|
|||
|
|
# pcl
|
|||
|
|
include_directories(C:/PCL/3rdParty/FLANN/include)
|
|||
|
|
include_directories(C:/PCL/3rdParty/VTK/include/vtk-9.3)
|
|||
|
|
include_directories(C:/PCL/include/pcl-1.14)
|
|||
|
|
|
|||
|
|
|
|||
|
|
include_directories(${PCL_INCLUDE_DIRS})
|
|||
|
|
link_directories(${PCL_LIBRARY_DIRS})
|
|||
|
|
add_definitions(${PCL_DEFINITIONS})
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 添加接口声明宏
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
target_compile_definitions(PluginWBFZExchangePlugin PRIVATE "NOMINMAX") # 禁用vc++ 中的min max 定义,避免与 pcl 的中 std::min,pcl::max 函数冲突
|
|||
|
|
target_compile_definitions(PluginWBFZExchangePlugin PRIVATE "WBFZ_API")
|
|||
|
|
|
|||
|
|
list(APPEND _depend_library
|
|||
|
|
LAMPTool WBCLFZSystemModule Common PointCloudOperator PythonModule DataProperty MeshData Material Geometry BCBase ConfigOptions SelfDefObject ModelData ModuleBase PluginManager GeometryCommand GeometryWidgets IO MainWidgets MainWindow
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
list(APPEND _runtimes_libraries
|
|||
|
|
LAMPCAE::CGNS Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Xml
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
# 添加 点云 pcl
|
|||
|
|
list(APPEND _runtimes_libraries
|
|||
|
|
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
|
|||
|
|
# 添加 VTK
|
|||
|
|
list(APPEND _runtimes_libraries
|
|||
|
|
VTK::CommonColor VTK::CommonComputationalGeometry VTK::CommonCore VTK::CommonDataModel VTK::CommonExecutionModel VTK::CommonMath VTK::CommonMisc VTK::CommonSystem VTK::CommonTransforms VTK::DICOMParser VTK::FiltersCore VTK::FiltersGeneral VTK::FiltersGeometry VTK::FiltersHybrid VTK::FiltersModeling VTK::FiltersSources VTK::IOCore VTK::IOChemistry VTK::IOGeometry VTK::IOImage VTK::IOLegacy VTK::ImagingCore VTK::ImagingSources VTK::RenderingCore VTK::RenderingLOD VTK::doubleconversion VTK::jpeg VTK::jsoncpp VTK::lz4 VTK::lzma VTK::metaio VTK::png VTK::pugixml VTK::sys VTK::tiff VTK::zlib
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 链接依赖库
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
target_link_libraries(PluginWBFZExchangePlugin PRIVATE
|
|||
|
|
${_runtimes_libraries}
|
|||
|
|
${_depend_library}
|
|||
|
|
${PCL_LIBRARIES}
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 添加依赖关系
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
add_dependencies(PluginWBFZExchangePlugin ${_depend_library})
|
|||
|
|
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 添加运行时依赖关系
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
set(LAMPCAE_PluginWBFZExchangePlugin_Runtimes_Libraries ${_runtimes_libraries} PARENT_SCOPE)
|
|||
|
|
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
# 设置插件的输出目录
|
|||
|
|
#-----------------------------------------------------------------------------
|
|||
|
|
set_target_properties(PluginWBFZExchangePlugin
|
|||
|
|
PROPERTIES
|
|||
|
|
ARCHIVE_OUTPUT_DIRECTORY_RELEASE $<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins
|
|||
|
|
LIBRARY_OUTPUT_DIRECTORY_RELEASE $<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins
|
|||
|
|
RUNTIME_OUTPUT_DIRECTORY_RELEASE $<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins
|
|||
|
|
ARCHIVE_OUTPUT_DIRECTORY_DEBUG $<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins
|
|||
|
|
LIBRARY_OUTPUT_DIRECTORY_DEBUG $<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins
|
|||
|
|
RUNTIME_OUTPUT_DIRECTORY_DEBUG $<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins
|
|||
|
|
)
|