1 | option(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
|
---|
4 | set(BOOST_INCLUDEDIR ${LIB3DV_Boost_INCLUDE_DIR} CACHE STRING "")
|
---|
5 | set(BOOST_LIBRARYDIR ${LIB3DV_Boost_LIBRARY_DIR} CACHE STRING "")
|
---|
6 | set(BOOST_NO_SYSTEM_PATHS ON CACHE BOOL "")
|
---|
7 |
|
---|
8 | option(USE_ARCHIVE "Use LibArchive for zip and tar support" ON)
|
---|
9 |
|
---|
10 | if(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()
|
---|
18 | endif()
|
---|
19 |
|
---|
20 | option(USE_PCL "Use PCL for live data display" ON)
|
---|
21 |
|
---|
22 | if(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)
|
---|
27 | endif()
|
---|
28 |
|
---|
29 | find_package(Boost COMPONENTS date_time filesystem program_options serialization system thread REQUIRED)
|
---|
30 | find_package(Threads REQUIRED)
|
---|
31 |
|
---|
32 | if(UNIX)
|
---|
33 | set(LINUX_X11 X11)
|
---|
34 | endif()
|
---|
35 |
|
---|
36 | if(WIN32)
|
---|
37 | add_definitions(-DBOOST_ALL_NO_LIB -D_WIN32_WINNT=0x0501 -DNOMINMAX)
|
---|
38 | set(WIN32_LIBRARIES iphlpapi)
|
---|
39 | endif()
|
---|
40 |
|
---|
41 | add_executable(3dv-client file.cc main.cc utils.cc disk_writer.cc ${PCL_SOURCES})
|
---|
42 |
|
---|
43 | include_directories(${Boost_INCLUDE_DIR} ${LibArchive_INCLUDE_DIR} ${PCL_INCLUDE_DIRS} ${LIB3DV_INCLUDE_DIRS})
|
---|
44 |
|
---|
45 | target_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 |
|
---|
62 | set_target_properties(3dv-client PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
---|