-
Notifications
You must be signed in to change notification settings - Fork 19
/
LVR2Config.cmake.in
115 lines (93 loc) · 3.06 KB
/
LVR2Config.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# -----------------------------------------------------------------
# lvr's cmake configuration
#
# provided options:
# - LVR2_USE_STATIC_LIBS(=OFF) to link the static libraries of lvr
#
# provided interface variables:
# - LVR2_INCLUDE_DIRS
# - LVR2_DEFINITIONS
# - LVR2_LIBRARIES
# - LVR2_LIBRARY
#
# Do not forget to add_defintions(${LVR2_DEFINITIONS}) as they
# describe the build configuration of liblvr.
#
# -----------------------------------------------------------------
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/lvr2Targets.cmake")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/Modules")
cmake_policy(PUSH)
cmake_policy(SET CMP0012 NEW)
set(LVR2_INCLUDE_DIRS @LVR2_INSTALL_INCLUDE_DIRS@)
set(LVR2_DEFINITIONS @LVR2_DEFINITIONS@)
find_package(PkgConfig REQUIRED)
set(LVR2_LIB_DIR @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@)
option(LVR2_USE_STATIC_LIBS OFF)
if(LVR2_USE_STATIC_LIBS)
# find_library(LVR2_LIBRARY NAMES lvr2_static)
set(LVR2_LIBRARY ${LVR2_LIB_DIR}/liblvr2_static.so)
set(LVR2_LIBRARIES ${LVR2_LIBRARY})
else()
# find_library(LVR2_LIBRARY NAMES lvr2)
set(LVR2_LIBRARY ${LVR2_LIB_DIR}/liblvr2.so)
set(LVR2_LIBRARIES ${LVR2_LIBRARY})
endif()
find_package(OpenCV REQUIRED)
list(APPEND LVR2_INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
find_package(Eigen3 REQUIRED)
list(APPEND LVR2_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
find_package(VTK)
list(APPEND LVR2_INCLUDE_DIRS ${VTK_INCLUDE_DIRS})
list(APPEND LVR2_DEFINITIONS ${VTK_DEFINTIONS})
# nabo
if(@NABO_FOUND@)
find_package(NABO REQUIRED)
list(APPEND LVR2_INCLUDE_DIRS ${NABO_INCLUDE_DIRS})
endif()
# pcl
if(@PCL_FOUND@)
find_package(PCL REQUIRED)
list(APPEND LVR2_INCLUDE_DIRS ${PCL_INCLUDE_DIRS})
list(APPEND LVR2_DEFINITIONS ${PCL_DEFINITIONS})
endif()
# cgal
if(@CGAL_FOUND@)
find_package(CGAL REQUIRED)
list(APPEND LVR2_INCLUDE_DIRS ${CGAL_INCLUDE_DIRS})
endif()
find_package(Boost REQUIRED)
list(APPEND LVR2_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
list(APPEND LVR2_DEFINITIONS ${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
find_package(OpenGL REQUIRED)
list(APPEND LVR2_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR})
find_package(GLUT REQUIRED)
list(APPEND LVR2_INCLUDE_DIRS ${GLUT_INCLUDE_DIR})
find_package(Lz4 REQUIRED)
list(APPEND LVR2_INCLUDE_DIRS ${LZ4_INCLUDE_DIR})
list(APPEND LVR2_LIBRARIES ${LZ4_LIBRARY})
# libfreenect
if(@LIBFREENECT_FOUND@)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBFREENECT REQUIRED libfreenect)
list(APPEND LVR2_INCLUDE_DIRS ${LIBFREENECT_INCLUDE_DIRS})
endif()
# stann
if(@STANN_FOUND@)
set(STANN_DIR @STANN_DIR@)
find_package(STANN REQUIRED)
list(APPEND LVR2_2INCLUDE_DIRS ${STANN_INCLUDE_DIR})
endif()
# HDF5
find_package(HDF5 REQUIRED COMPONENTS C CXX HL)
list(APPEND LVR2_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS})
list(APPEND LVR2_LIBRARIES ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES})
# Embree
if(@embree_FOUND@)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
find_package(embree 3.0 REQUIRED)
list(APPEND LVR2_INCLUDE_DIRS ${EMBREE_INCLUDE_DIRS})
list(APPEND LVR2_LIBRARIES ${EMBREE_LIBRARY})
endif()
cmake_policy(POP)
set(LVR2_FOUND TRUE)