@@ -57,7 +57,8 @@ endif()
57
57
#-------------------------------------------------
58
58
option (BUILD_RAN_AND_RBF_NETWORKS "Build RAN and RBF networks (requires CULA)" ON )
59
59
option (CULA_R17_OR_ABOVE "CULA version is R17 or above" ON )
60
- option (BUILD_SURFACE_RECONSTRUCTION_SOM "Build surface reconstruction function in SOM (required PCL)" ON )
60
+ option (BUILD_SURFACE_RECONSTRUCTION_SOM "Build surface reconstruction function in SOM" ON )
61
+ option (BUILD_PCL_VIEWER "Build viewer extension in surface reconstruction function in SOM" ON )
61
62
62
63
set (ARCH_OPTIONS default 11 12 13 20 30 35 50 52)
63
64
list (GET ARCH_OPTIONS 0 DEFAULT_ARCH)
@@ -194,23 +195,25 @@ endif()
194
195
195
196
find_package ( PCL 1.8 )
196
197
197
- if ( PCL_FOUND AND BUILD_SURFACE_RECONSTRUCTION_SOM )
198
- # [C/C++]>[General]>[Additional Include Directories]
199
- include_directories ( ${PCL_INCLUDE_DIRS} )
198
+ if ( PCL_FOUND AND BUILD_SURFACE_RECONSTRUCTION_SOM AND BUILD_PCL_VIEWER )
199
+ add_definitions (-DPCL_EXIST)
200
+
201
+ # [C/C++]>[General]>[Additional Include Directories]
202
+ include_directories ( ${PCL_INCLUDE_DIRS} )
200
203
201
- # [C/C++]>[Preprocessor]>[Preprocessor Definitions]
202
- add_definitions ( ${PCL_DEFINITIONS} )
204
+ # [C/C++]>[Preprocessor]>[Preprocessor Definitions]
205
+ add_definitions ( ${PCL_DEFINITIONS} )
203
206
204
- # For Use Not PreCompiled Features
205
- #add_definitions( -DPCL_NO_PRECOMPILE )
207
+ # For Use Not PreCompiled Features
208
+ #add_definitions( -DPCL_NO_PRECOMPILE )
206
209
207
- # [Linker]>[General]>[Additional Library Directories]
208
- link_directories ( ${PCL_LIBRARY_DIRS} )
210
+ # [Linker]>[General]>[Additional Library Directories]
211
+ link_directories ( ${PCL_LIBRARY_DIRS} )
209
212
210
- # [Linker]>[Input]>[Additional Dependencies]
211
- #target_link_libraries( SOM_Reconstruction ${PCL_LIBRARIES} )
213
+ # [Linker]>[Input]>[Additional Dependencies]
214
+ #target_link_libraries( SOM_Reconstruction ${PCL_LIBRARIES} )
212
215
else ()
213
- message (WARNING "PCL not found. Surface reconstruction for SOM will not be build " )
216
+ message (WARNING "PCL will not be built " )
214
217
endif ()
215
218
#-------------------------------------------------
216
219
@@ -615,29 +618,44 @@ function(build_apps)
615
618
616
619
build_qt_app(SOM "${libs_som} " "${files_som} " )
617
620
618
- if (PCL_FOUND AND BUILD_SURFACE_RECONSTRUCTION_SOM)
621
+ if (BUILD_SURFACE_RECONSTRUCTION_SOM)
619
622
# SOM_Reconstruction GUI app
620
623
qt5_add_resources(res_som_surface
621
624
src/apps/SOM_Reconstruction/SOMSurfaceresources.qrc
622
625
)
623
-
624
- set (files_som_surface
625
- src/apps/SOM_Reconstruction/main.cpp
626
- src/apps/SOM_Reconstruction/SOMSurfacewidget.cpp
627
- ${res_som_surface}
628
- )
629
-
630
- # Build with PCL
631
- set (libs_som_surface
632
- gpumlib_cuda_som_surface
633
- gpumlib_utils
634
- gpumlib_gui
635
- ${PCL_LIBRARIES}
636
- )
626
+
627
+ if (PCL_FOUND AND BUILD_PCL_VIEWER)
628
+ set (files_som_surface
629
+ src/apps/SOM_Reconstruction/main.cpp
630
+ src/apps/SOM_Reconstruction/SOMSurfacewidget.cpp
631
+ src/apps/SOM_Reconstruction/SurfaceViewer.cpp
632
+ ${res_som_surface}
633
+ )
634
+
635
+ # Build with PCL
636
+ set (libs_som_surface
637
+ gpumlib_cuda_som_surface
638
+ gpumlib_utils
639
+ gpumlib_gui
640
+ ${PCL_LIBRARIES}
641
+ )
642
+ else ()
643
+ set (files_som_surface
644
+ src/apps/SOM_Reconstruction/main.cpp
645
+ src/apps/SOM_Reconstruction/SOMSurfacewidget.cpp
646
+ ${res_som_surface}
647
+ )
648
+
649
+ set (libs_som_surface
650
+ gpumlib_cuda_som_surface
651
+ gpumlib_utils
652
+ gpumlib_gui
653
+ )
654
+ endif ()
637
655
638
656
build_qt_app(SOM_Reconstruction "${libs_som_surface} " "${files_som_surface} " )
639
657
else ()
640
- message (WARNING "PCL not found. Cannot compile SOM for Surface Reconstruction. " )
658
+ message (WARNING "Surface Reconstruction will not be built " )
641
659
endif ()
642
660
643
661
if (CSHARP_FOUND)
0 commit comments