source: pacpussensors/trunk/Vislab/20150310_lib3dv-1.2.0/src/CMakeLists.txt@ 149

Last change on this file since 149 was 136, checked in by ldecherf, 7 years ago

Doc

File size: 2.1 KB
Line 
1option(Boost_USE_STATIC_LIBS "Use static version of Boost" ${LIB3DV_Boost_USE_STATIC_LIBS})
2
3# this is to make sure we are going to use the same version of boost as lib3dv
4set(BOOST_INCLUDEDIR ${LIB3DV_Boost_INCLUDE_DIR} CACHE STRING "")
5set(BOOST_LIBRARYDIR ${LIB3DV_Boost_LIBRARY_DIR} CACHE STRING "")
6set(BOOST_NO_SYSTEM_PATHS ON CACHE BOOL "")
7
8option(USE_ARCHIVE "Use LibArchive for zip and tar support" ON)
9
10if(USE_ARCHIVE)
11 option(LibArchive_USE_STATIC_LIBS "Use static version of LibArchive" OFF)
12 find_package(LibArchive REQUIRED)
13 add_definitions(-DARCHIVE)
14
15 if(BUILD_STATIC_EXECUTABLE)
16 find_package(ZLIB REQUIRED)
17 endif()
18endif()
19
20option(USE_PCL "Use PCL for live data display" ON)
21
22if(USE_PCL)
23 set(PCL_DIR "" CACHE STRING "PCL installation directory")
24 find_package(PCL 1.7 REQUIRED COMPONENTS common io visualization)
25 add_definitions(-DPCL ${PCL_DEFINITIONS})
26 set(PCL_SOURCES display.cc interactor_style_3dv.cc playback.cc)
27endif()
28
29find_package(Boost COMPONENTS date_time filesystem program_options serialization system thread REQUIRED)
30find_package(Threads REQUIRED)
31
32if(UNIX)
33 set(LINUX_X11 X11)
34endif()
35
36if(WIN32)
37 add_definitions(-DBOOST_ALL_NO_LIB -D_WIN32_WINNT=0x0501 -DNOMINMAX)
38 set(WIN32_LIBRARIES iphlpapi)
39endif()
40
41add_executable(3dv-client file.cc main.cc utils.cc disk_writer.cc ${PCL_SOURCES})
42
43include_directories(${Boost_INCLUDE_DIR} ${LibArchive_INCLUDE_DIR} ${PCL_INCLUDE_DIRS} ${LIB3DV_INCLUDE_DIRS})
44
45target_link_libraries(3dv-client
46 ${LIB3DV_LIBRARIES}
47 ${Boost_DATE_TIME_LIBRARY}
48 ${Boost_FILESYSTEM_LIBRARY}
49 ${Boost_PROGRAM_OPTIONS_LIBRARY}
50 ${Boost_SERIALIZATION_LIBRARY}
51 ${Boost_SYSTEM_LIBRARY}
52 ${Boost_THREAD_LIBRARY}
53 ${CMAKE_THREAD_LIBS_INIT}
54 ${LibArchive_LIBRARY}
55 ${PCL_COMMON_LIBRARIES}
56 ${PCL_IO_LIBRARIES}
57 ${PCL_VISUALIZATION_LIBRARIES} vtkFiltering
58 ${ZLIB_LIBRARY}
59 ${WIN32_LIBRARIES}
60 ${LINUX_X11})
61
62set_target_properties(3dv-client PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
Note: See TracBrowser for help on using the repository browser.