Debian Codegraph @

plugins/core/Standard/qMasonry/qAutoSeg/CMakeLists.txt

raw
1 cmake_minimum_required( VERSION 3.5 )
2
3 # CloudCompare Masonry Manual Segmentation plugin
4 option( PLUGIN_STANDARD_MASONRY_QAUTO_SEG "Check to install QAutoSeg plugin" OFF )
5
6 if ( PLUGIN_STANDARD_MASONRY_QAUTO_SEG )
7
8 project( QAUTO_SEG_PLUGIN )
9
10 AddPlugin( NAME ${PROJECT_NAME} )
11
12 target_sources( ${PROJECT_NAME}
13 PRIVATE
14 ${CMAKE_CURRENT_LIST_DIR}/qAutoSeg.h
15 ${CMAKE_CURRENT_LIST_DIR}/qAutoSeg.cpp
16 ${CMAKE_CURRENT_LIST_DIR}/profileImportDlg.h
17 ${CMAKE_CURRENT_LIST_DIR}/profileImportDlg.cpp
18 ${CMAKE_CURRENT_LIST_DIR}/profileImportDlg.ui
19 )
20
21 target_include_directories( ${PROJECT_NAME}
22 PRIVATE
23 ${CMAKE_CURRENT_SOURCE_DIR}
24 )
25
26 # Find Packages
27 # Find PCL
28 #set( PCL_DIR "C:/Program Files/PCL 1.9.1") #DGM: can't do that as it will obviously conflict with most of the users settings ;)
29 find_package( PCL 1.9.1 REQUIRED )
30
31 # Find OpenCV
32 #set( OpenCV_DIR "C:/opencv/build" ) #DGM: can't do that as it will obviously conflict with most of the users settings ;)
33 find_package( OpenCV REQUIRED )
34
35 if (WIN32)
36 # We need to copy the OpenCV "World" DLL file next to CloudCompare.exe
37 set( OpenCV_WORLD_DLL "" CACHE FILEPATH "Opencv 'World' DLL file path" )
38 if( CMAKE_CONFIGURATION_TYPES )
39 set( OpenCV_WORLD_DEBUG_DLL "" CACHE FILEPATH "OpenCV Debug 'World' DLL file path" )
40 endif()
41 endif()
42
43 if( PCL_FOUND AND OpenCV_FOUND )
44 # [C/C++]>[General]>[Additional Include Directories]
45 include_directories( ${PCL_INCLUDE_DIRS} )
46 include_directories( ${OpenCV_INCLUDE_DIRS} )
47
48 # [C/C++]>[Preprocessor]>[Preprocessor Definitions]
49 add_definitions( ${PCL_DEFINITIONS} )
50
51 # For Use Not PreCompiled Features
52 #add_definitions( -DPCL_NO_PRECOMPILE )
53
54 # [Linker]>[General]>[Additional Library Directories]
55 link_directories( ${PCL_LIBRARY_DIRS} )
56 link_directories( ${OpenCV_LIB_DIR} )
57
58 # [Linker]>[Input]>[Additional Dependencies]
59 target_link_libraries( QAUTO_SEG_PLUGIN ${PCL_LIBRARIES} )
60 target_link_libraries( QAUTO_SEG_PLUGIN ${OpenCV_LIBS} )
61
62 if (WIN32)
63 if (OpenCV_WORLD_DLL)
64 copy_files("${OpenCV_WORLD_DLL}" ${CLOUDCOMPARE_DEST_FOLDER} 0)
65 endif()
66 if (CMAKE_CONFIGURATION_TYPES AND OpenCV_WORLD_DEBUG_DLL)
67 copy_files("${OpenCV_WORLD_DEBUG_DLL}" ${CLOUDCOMPARE_DEST_FOLDER} 2)
68 endif()
69 endif()
70
71 endif()
72
73 endif()