Debian Codegraph @

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

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