@@ -45,7 +45,7 @@ endmacro(pcl_report_not_found)
45
45
macro (pcl_message)
46
46
if (NOT PCL_FIND_QUIETLY)
47
47
message (${ARGN} )
48
- endif (NOT PCL_FIND_QUIETLY )
48
+ endif ()
49
49
endmacro (pcl_message)
50
50
51
51
# Remove duplicate libraries
@@ -76,13 +76,13 @@ macro(pcl_remove_duplicate_libraries _unfiltered_libraries _filtered_libraries)
76
76
list (APPEND _optimized_libraries ${library} )
77
77
endif ()
78
78
set (_waiting_for_optimized 0)
79
- else (" ${library} " STREQUAL "debug" )
79
+ else ()
80
80
list (FIND _other_libraries "${library} " library_position)
81
81
if (library_position EQUAL -1)
82
82
list (APPEND ${_filtered_libraries} ${library} )
83
83
list (APPEND _other_libraries ${library} )
84
84
endif ()
85
- endif (" ${library} " STREQUAL "debug" )
85
+ endif ()
86
86
endforeach (library)
87
87
endmacro (pcl_remove_duplicate_libraries)
88
88
@@ -92,26 +92,26 @@ macro(find_boost)
92
92
set (BOOST_ROOT "${PCL_ROOT} /3rdParty/Boost" )
93
93
elseif (NOT BOOST_INCLUDEDIR)
94
94
set (BOOST_INCLUDEDIR "@Boost_INCLUDE_DIR@" )
95
- endif (PCL_ALL_IN_ONE_INSTALLER )
95
+ endif ()
96
96
# use static Boost in Windows
97
97
if (WIN32 )
98
98
set (Boost_USE_STATIC_LIBS @Boost_USE_STATIC_LIBS@)
99
99
set (Boost_USE_STATIC @Boost_USE_STATIC@)
100
100
set (Boost_USE_MULTITHREAD @Boost_USE_MULTITHREAD@)
101
- endif (WIN32 )
101
+ endif ()
102
102
if (${CMAKE_VERSION} VERSION_LESS 2.8.5)
103
103
set (Boost_ADDITIONAL_VERSIONS
104
104
"1.47.0" "1.47" "1.46.1"
105
105
"1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43" )
106
- else (${CMAKE_VERSION} VERSION_LESS 2.8.5 )
106
+ else ()
107
107
set (Boost_ADDITIONAL_VERSIONS
108
108
"@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@.@Boost_SUBMINOR_VERSION@" "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@"
109
109
"1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
110
110
"1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
111
111
"1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
112
112
"1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
113
113
"1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" )
114
- endif (${CMAKE_VERSION} VERSION_LESS 2.8.5 )
114
+ endif ()
115
115
# Disable the config mode of find_package(Boost)
116
116
set (Boost_NO_BOOST_CMAKE ON )
117
117
find_package (Boost 1.40.0 ${QUIET_} COMPONENTS @PCLCONFIG_AVAILABLE_BOOST_MODULES@)
@@ -122,7 +122,7 @@ macro(find_boost)
122
122
set (BOOST_LIBRARIES ${Boost_LIBRARIES} )
123
123
if (WIN32 AND NOT MINGW)
124
124
set (BOOST_DEFINITIONS ${BOOST_DEFINITIONS} -DBOOST_ALL_NO_LIB)
125
- endif (WIN32 AND NOT MINGW )
125
+ endif ()
126
126
endmacro (find_boost)
127
127
128
128
#remove this as soon as eigen is shipped with FindEigen.cmake
@@ -131,7 +131,7 @@ macro(find_eigen)
131
131
set (EIGEN_ROOT "${PCL_ROOT} /3rdParty/Eigen" )
132
132
elseif (NOT EIGEN_ROOT)
133
133
get_filename_component (EIGEN_ROOT "@EIGEN_INCLUDE_DIRS@" ABSOLUTE )
134
- endif (PCL_ALL_IN_ONE_INSTALLER )
134
+ endif ()
135
135
find_package (Eigen)
136
136
set (EIGEN_DEFINITIONS ${EIGEN_DEFINITIONS} )
137
137
endmacro (find_eigen)
@@ -142,7 +142,7 @@ macro(find_qhull)
142
142
set (QHULL_ROOT "${PCL_ROOT} /3rdParty/Qhull" )
143
143
elseif (NOT QHULL_ROOT)
144
144
get_filename_component (QHULL_ROOT "@QHULL_INCLUDE_DIRS@" PATH )
145
- endif (PCL_ALL_IN_ONE_INSTALLER )
145
+ endif ()
146
146
147
147
set (QHULL_USE_STATIC @QHULL_USE_STATIC@)
148
148
find_package (Qhull)
@@ -230,7 +230,7 @@ macro(find_flann)
230
230
set (FLANN_ROOT "${PCL_ROOT} /3rdParty/Flann" )
231
231
elseif (NOT FLANN_ROOT)
232
232
get_filename_component (FLANN_ROOT "@FLANN_INCLUDE_DIRS@" PATH )
233
- endif (PCL_ALL_IN_ONE_INSTALLER )
233
+ endif ()
234
234
235
235
set (FLANN_USE_STATIC @FLANN_USE_STATIC@)
236
236
find_package (FLANN)
@@ -245,7 +245,7 @@ macro(find_VTK)
245
245
endif ()
246
246
elseif (NOT VTK_DIR AND NOT ANDROID)
247
247
set (VTK_DIR "@VTK_DIR@" CACHE PATH "The directory containing VTKConfig.cmake" )
248
- endif (PCL_ALL_IN_ONE_INSTALLER AND NOT ANDROID )
248
+ endif ()
249
249
if (NOT ANDROID)
250
250
find_package (VTK ${QUIET_} )
251
251
endif ()
@@ -262,7 +262,7 @@ macro(find_libusb)
262
262
NAMES usb-1.0
263
263
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib)
264
264
find_package_handle_standard_args(libusb-1.0 LIBUSB_1_LIBRARY LIBUSB_1_INCLUDE_DIR)
265
- endif (NOT WIN32 )
265
+ endif ()
266
266
endmacro (find_libusb)
267
267
268
268
macro (find_glew)
@@ -311,7 +311,7 @@ macro(find_external_library _component _lib _is_optional)
311
311
find_glew()
312
312
elseif ("${_lib} " STREQUAL "opengl" )
313
313
find_package (OpenGL)
314
- endif (" ${_lib} " STREQUAL "boost" )
314
+ endif ()
315
315
316
316
string (TOUPPER "${_component} " COMPONENT )
317
317
string (TOUPPER "${_lib} " LIB)
@@ -320,16 +320,16 @@ macro(find_external_library _component _lib _is_optional)
320
320
list (APPEND PCL_${COMPONENT} _INCLUDE_DIRS ${${LIB} _INCLUDE_DIRS})
321
321
if (${LIB} _USE_FILE)
322
322
include (${${LIB} _USE_FILE})
323
- else (${LIB} _USE_FILE )
323
+ else ()
324
324
list (APPEND PCL_${COMPONENT} _LIBRARY_DIRS "${${LIB} _LIBRARY_DIRS}" )
325
- endif (${LIB} _USE_FILE )
325
+ endif ()
326
326
if (${LIB} _LIBRARIES)
327
327
list (APPEND PCL_${COMPONENT} _LIBRARIES "${${LIB} _LIBRARIES}" )
328
- endif (${LIB} _LIBRARIES )
328
+ endif ()
329
329
if (${LIB} _DEFINITIONS AND NOT ${LIB} STREQUAL "VTK" )
330
330
list (APPEND PCL_${COMPONENT} _DEFINITIONS ${${LIB} _DEFINITIONS})
331
- endif (${LIB} _DEFINITIONS AND NOT ${LIB} STREQUAL "VTK" )
332
- else (${LIB} _FOUND )
331
+ endif ()
332
+ else ()
333
333
if ("${_is_optional} " STREQUAL "OPTIONAL" )
334
334
list (APPEND PCL_${COMPONENT} _DEFINITIONS "-DDISABLE_${LIB} " )
335
335
pcl_message("** WARNING ** ${_component} features related to ${_lib} will be disabled" )
@@ -341,9 +341,9 @@ macro(find_external_library _component _lib _is_optional)
341
341
string (TOUPPER "${_component} " COMPONENT )
342
342
pcl_message("** WARNING ** ${_component} will be disabled cause ${_lib} was not found" )
343
343
list (REMOVE_ITEM PCL_TO_FIND_COMPONENTS ${_component} )
344
- endif (( NOT PCL_FIND_ALL) OR (PCL_FIND_ALL EQUAL 1) )
345
- endif (" ${_is_optional} " STREQUAL "OPTIONAL" )
346
- endif (${LIB} _FOUND )
344
+ endif ()
345
+ endif ()
346
+ endif ()
347
347
endmacro (find_external_library)
348
348
349
349
macro (pcl_check_external_dependency _component)
@@ -363,38 +363,38 @@ macro(compute_dependencies TO_FIND_COMPONENTS)
363
363
list (INSERT ${TO_FIND_COMPONENTS} ${pos} ${dependency} )
364
364
if (pcl_${dependency} _ext_dep)
365
365
list (APPEND pcl_${component} _ext_dep ${pcl_${dependency} _ext_dep})
366
- endif (pcl_ ${dependency} _ext_dep )
366
+ endif ()
367
367
if (pcl_${dependency} _opt_dep)
368
368
list (APPEND pcl_${component} _opt_dep ${pcl_${dependency} _opt_dep})
369
- endif (pcl_ ${dependency} _opt_dep )
369
+ endif ()
370
370
compute_dependencies(${TO_FIND_COMPONENTS} )
371
- else (${pcl_dependency} _int_dep )
371
+ else ()
372
372
list (INSERT ${TO_FIND_COMPONENTS} 0 ${dependency} )
373
- endif (${pcl_dependency} _int_dep )
374
- endif (found EQUAL -1 )
373
+ endif ()
374
+ endif ()
375
375
endforeach (dependency)
376
- endif (${pcl_component} _int_dep AND ( NOT PCL_FIND_ALL) )
376
+ endif ()
377
377
endforeach (component )
378
378
endmacro (compute_dependencies)
379
379
380
380
### ---[ Find PCL
381
381
382
382
if (PCL_FIND_QUIETLY)
383
383
set (QUIET_ QUIET )
384
- else (PCL_FIND_QUIETLY )
384
+ else ()
385
385
set (QUIET_)
386
- endif (PCL_FIND_QUIETLY )
386
+ endif ()
387
387
388
388
find_package (PkgConfig QUIET )
389
389
390
390
file (TO_CMAKE_PATH "${PCL_DIR} " PCL_DIR)
391
391
if (WIN32 AND NOT MINGW)
392
392
# PCLConfig.cmake is installed to PCL_ROOT/cmake
393
393
get_filename_component (PCL_ROOT "${PCL_DIR} " PATH )
394
- else (WIN32 AND NOT MINGW )
394
+ else ()
395
395
# PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y
396
396
get_filename_component (PCL_ROOT "${CMAKE_CURRENT_LIST_DIR} /../.." ABSOLUTE )
397
- endif (WIN32 AND NOT MINGW )
397
+ endif ()
398
398
399
399
# check whether PCLConfig.cmake is found into a PCL installation or in a build tree
400
400
if (EXISTS "${PCL_ROOT} /include/pcl-${PCL_VERSION_MAJOR} .${PCL_VERSION_MINOR} /pcl/pcl_config.h" )
@@ -404,24 +404,24 @@ if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl
404
404
set (PCL_LIBRARY_DIRS "${PCL_ROOT} /@LIB_INSTALL_DIR@" )
405
405
if (EXISTS "${PCL_ROOT} /3rdParty" )
406
406
set (PCL_ALL_IN_ONE_INSTALLER ON )
407
- endif (EXISTS " ${PCL_ROOT} /3rdParty" )
407
+ endif ()
408
408
elseif (EXISTS "${PCL_ROOT} /include/pcl/pcl_config.h" )
409
409
# Found a non-standard (likely ANDROID) PCL installation
410
410
# pcl_message("Found a PCL installation")
411
411
set (PCL_INCLUDE_DIRS "${PCL_ROOT} /include" )
412
412
set (PCL_LIBRARY_DIRS "${PCL_ROOT} /lib" )
413
413
if (EXISTS "${PCL_ROOT} /3rdParty" )
414
414
set (PCL_ALL_IN_ONE_INSTALLER ON )
415
- endif (EXISTS " ${PCL_ROOT} /3rdParty" )
415
+ endif ()
416
416
elseif (EXISTS "${PCL_DIR} /include/pcl/pcl_config.h" )
417
417
# Found PCLConfig.cmake in a build tree of PCL
418
418
# pcl_message("PCL found into a build tree.")
419
419
set (PCL_INCLUDE_DIRS "${PCL_DIR} /include" ) # for pcl_config.h
420
420
set (PCL_LIBRARY_DIRS "${PCL_DIR} /@LIB_INSTALL_DIR@" )
421
421
set (PCL_SOURCES_TREE "@CMAKE_SOURCE_DIR@" )
422
- else (EXISTS " ${PCL_ROOT} /include/pcl- ${PCL_VERSION_MAJOR} . ${PCL_VERSION_MINOR} /pcl/pcl_config.h" )
422
+ else ()
423
423
pcl_report_not_found("PCL can not be found on this machine" )
424
- endif (EXISTS " ${PCL_ROOT} /include/pcl- ${PCL_VERSION_MAJOR} . ${PCL_VERSION_MINOR} /pcl/pcl_config.h" )
424
+ endif ()
425
425
426
426
#set a suffix for debug libraries
427
427
set (PCL_DEBUG_SUFFIX "@CMAKE_DEBUG_POSTFIX@" )
@@ -453,13 +453,13 @@ if(PCL_FIND_COMPONENTS)
453
453
if (PCL_FIND_COMPONENTS_LENGTH EQUAL PCL_NB_COMPONENTS)
454
454
set (PCL_TO_FIND_COMPONENTS ${pcl_all_components} )
455
455
set (PCL_FIND_ALL 1)
456
- else (PCL_FIND_COMPONENTS_LENGTH EQUAL PCL_NB_COMPONENTS )
456
+ else ()
457
457
set (PCL_TO_FIND_COMPONENTS ${PCL_FIND_COMPONENTS} )
458
- endif (PCL_FIND_COMPONENTS_LENGTH EQUAL PCL_NB_COMPONENTS )
459
- else (PCL_FIND_COMPONENTS )
458
+ endif ()
459
+ else ()
460
460
set (PCL_TO_FIND_COMPONENTS ${pcl_all_components} )
461
461
set (PCL_FIND_ALL 1)
462
- endif (PCL_FIND_COMPONENTS )
462
+ endif ()
463
463
464
464
compute_dependencies(PCL_TO_FIND_COMPONENTS)
465
465
@@ -518,9 +518,9 @@ foreach(component ${PCL_TO_FIND_COMPONENTS})
518
518
519
519
if (PCL_${COMPONENT} _INCLUDE_DIR)
520
520
list (APPEND PCL_${COMPONENT} _INCLUDE_DIRS "${PCL_${COMPONENT} _INCLUDE_DIR}" )
521
- else (PCL_ ${COMPONENT} _INCLUDE_DIR )
521
+ else ()
522
522
#pcl_message("No include directory found for pcl_${component}.")
523
- endif (PCL_ ${COMPONENT} _INCLUDE_DIR )
523
+ endif ()
524
524
525
525
# Skip find_library for header only modules
526
526
list (FIND pcl_header_only_components ${component} _is_header_only)
@@ -544,20 +544,20 @@ foreach(component ${PCL_TO_FIND_COMPONENTS})
544
544
get_filename_component (${component} _library_path_debug
545
545
${PCL_${COMPONENT} _LIBRARY_DEBUG}
546
546
PATH )
547
- endif (PCL_ ${COMPONENT} _LIBRARY_DEBUG )
547
+ endif ()
548
548
549
549
# Restrict this to Windows users
550
550
if (NOT PCL_${COMPONENT} _LIBRARY AND WIN32 )
551
551
# might be debug only
552
552
set (PCL_${COMPONENT} _LIBRARY ${PCL_${COMPONENT} _LIBRARY_DEBUG})
553
- endif (NOT PCL_ ${COMPONENT} _LIBRARY AND WIN32 )
553
+ endif ()
554
554
555
555
find_package_handle_standard_args(PCL_${COMPONENT} DEFAULT_MSG
556
556
PCL_${COMPONENT} _LIBRARY PCL_${COMPONENT} _INCLUDE_DIR)
557
- else (_is_header_only EQUAL -1 )
557
+ else ()
558
558
find_package_handle_standard_args(PCL_${COMPONENT} DEFAULT_MSG
559
559
PCL_${COMPONENT} _INCLUDE_DIR)
560
- endif (_is_header_only EQUAL -1 )
560
+ endif ()
561
561
562
562
if (PCL_${COMPONENT} _FOUND)
563
563
if (NOT "${PCL_${COMPONENT} _INCLUDE_DIRS}" STREQUAL "" )
@@ -570,7 +570,7 @@ foreach(component ${PCL_TO_FIND_COMPONENTS})
570
570
list (REMOVE_DUPLICATES _filtered)
571
571
set (PCL_${COMPONENT} _INCLUDE_DIRS ${_filtered} )
572
572
list (APPEND PCL_INCLUDE_DIRS ${_filtered} )
573
- endif (NOT "${PCL_ ${COMPONENT} _INCLUDE_DIRS}" STREQUAL "" )
573
+ endif ()
574
574
mark_as_advanced (PCL_${COMPONENT} _INCLUDE_DIRS)
575
575
if (_is_header_only EQUAL -1)
576
576
list (APPEND PCL_DEFINITIONS ${PCL_${COMPONENT} _DEFINITIONS})
@@ -588,8 +588,8 @@ foreach(component ${PCL_TO_FIND_COMPONENTS})
588
588
list (APPEND PCL_${COMPONENT} _INCLUDE_DIRS ${PCL_${INT_DEP} _INCLUDE_DIRS})
589
589
if (PCL_${INT_DEP} _LIBRARIES)
590
590
list (APPEND PCL_${COMPONENT} _LINK_LIBRARIES "${PCL_${INT_DEP} _LIBRARIES}" )
591
- endif (PCL_ ${INT_DEP} _LIBRARIES )
592
- endif (PCL_ ${INT_DEP} _FOUND )
591
+ endif ()
592
+ endif ()
593
593
endforeach (int_dep)
594
594
if (_is_header_only EQUAL -1)
595
595
add_library (${pcl_component} @PCL_LIB_TYPE@ IMPORTED )
@@ -633,20 +633,20 @@ foreach(component ${PCL_TO_FIND_COMPONENTS})
633
633
endif ()
634
634
set (PCL_${COMPONENT} _LIBRARIES ${pcl_component} )
635
635
endif ()
636
- endif (PCL_ ${COMPONENT} _FOUND )
636
+ endif ()
637
637
endforeach (component )
638
638
639
639
if (NOT "${PCL_INCLUDE_DIRS} " STREQUAL "" )
640
640
list (REMOVE_DUPLICATES PCL_INCLUDE_DIRS)
641
- endif (NOT " ${PCL_INCLUDE_DIRS} " STREQUAL "" )
641
+ endif ()
642
642
643
643
if (NOT "${PCL_LIBRARY_DIRS} " STREQUAL "" )
644
644
list (REMOVE_DUPLICATES PCL_LIBRARY_DIRS)
645
- endif (NOT " ${PCL_LIBRARY_DIRS} " STREQUAL "" )
645
+ endif ()
646
646
647
647
if (NOT "${PCL_DEFINITIONS} " STREQUAL "" )
648
648
list (REMOVE_DUPLICATES PCL_DEFINITIONS)
649
- endif (NOT " ${PCL_DEFINITIONS} " STREQUAL "" )
649
+ endif ()
650
650
651
651
pcl_remove_duplicate_libraries(PCL_COMPONENTS PCL_LIBRARIES)
652
652
0 commit comments