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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
|
diff -urN a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake
--- a/cmake/FindBlosc.cmake 2018-08-13 16:33:07.000000000 +0100
+++ b/cmake/FindBlosc.cmake 2018-08-28 12:20:33.331930720 +0100
@@ -37,7 +37,7 @@
FIND_PACKAGE ( PackageHandleStandardArgs )
-FIND_PATH( BLOSC_LOCATION include/blosc.h
+FIND_PATH( BLOSC_LOCATION ${CMAKE_INSTALL_INCLUDEDIR}/blosc.h
"$ENV{BLOSC_ROOT}"
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
@@ -49,7 +49,7 @@
IF ( BLOSC_FOUND )
- SET ( BLOSC_LIBRARYDIR ${BLOSC_LOCATION}/lib
+ SET ( BLOSC_LIBRARYDIR ${BLOSC_LOCATION}/${CMAKE_INSTALL_LIBDIR}
CACHE STRING "Blosc library directories")
SET ( _blosc_library_name "blosc" )
@@ -75,6 +75,6 @@
SET( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP} )
ENDIF()
- SET( BLOSC_INCLUDE_DIR "${BLOSC_LOCATION}/include" CACHE STRING "Blosc include directory" )
+ SET( BLOSC_INCLUDE_DIR "${BLOSC_LOCATION}/${CMAKE_INSTALL_INCLUDEDIR}" CACHE STRING "Blosc include directory" )
ENDIF ( BLOSC_FOUND )
diff -urN a/cmake/FindCPPUnit.cmake b/cmake/FindCPPUnit.cmake
--- a/cmake/FindCPPUnit.cmake 2018-08-13 16:33:07.000000000 +0100
+++ b/cmake/FindCPPUnit.cmake 2018-08-28 12:20:33.333930718 +0100
@@ -38,7 +38,7 @@
FIND_PACKAGE ( PackageHandleStandardArgs )
-FIND_PATH( CPPUNIT_LOCATION include/cppunit/Test.h
+FIND_PATH( CPPUNIT_LOCATION ${CMAKE_INSTALL_INCLUDEDIR}/cppunit/Test.h
"$ENV{CPPUNIT_ROOT}"
NO_DEFAULT_PATH
NO_CMAKE_ENVIRONMENT_PATH
@@ -53,13 +53,13 @@
IF ( CPPUNIT_FOUND )
- SET( CPPUNIT_INCLUDE_DIR "${CPPUNIT_LOCATION}/include" CACHE STRING "CPPUNIT include directory")
+ SET( CPPUNIT_INCLUDE_DIR "${CPPUNIT_LOCATION}/${CMAKE_INSTALL_INCLUDEDIR}" CACHE STRING "CPPUNIT include directory")
IF (CPPUnit_USE_STATIC_LIBS)
SET( CPPUNIT_LIBRARY_NAME libcppunit.a)
ELSE ()
SET( CPPUNIT_LIBRARY_NAME cppunit)
ENDIF ()
FIND_LIBRARY ( CPPUnit_cppunit_LIBRARY ${CPPUNIT_LIBRARY_NAME}
- PATHS ${CPPUNIT_LOCATION}/lib )
+ PATHS ${CPPUNIT_LOCATION}/${CMAKE_INSTALL_LIBDIR} )
ENDIF ( CPPUNIT_FOUND )
diff -urN a/cmake/FindGLEW.cmake b/cmake/FindGLEW.cmake
--- a/cmake/FindGLEW.cmake 2018-08-13 16:33:07.000000000 +0100
+++ b/cmake/FindGLEW.cmake 2018-08-28 12:20:33.333930718 +0100
@@ -39,7 +39,7 @@
FIND_PACKAGE ( PackageHandleStandardArgs )
-FIND_PATH( GLEW_LOCATION include/GL/glew.h
+FIND_PATH( GLEW_LOCATION ${CMAKE_INSTALL_INCLUDEDIR}/GL/glew.h
"$ENV{GLEW_ROOT}"
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
@@ -51,7 +51,7 @@
IF ( GLEW_LOCATION )
- SET( GLEW_INCLUDE_DIR "${GLEW_LOCATION}/include" CACHE STRING "GLEW include path")
+ SET( GLEW_INCLUDE_DIR "${GLEW_LOCATION}/${CMAKE_INSTALL_INCLUDEDIR}" CACHE STRING "GLEW include path")
SET ( ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
IF (GLEW_USE_STATIC_LIBS)
@@ -74,11 +74,11 @@
FIND_LIBRARY ( GLEWmx_LIBRARY_PATH GLEW32MXS PATHS ${GLEW_LOCATION}/lib )
ELSE (APPLE)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
- FIND_LIBRARY ( GLEW_LIBRARY_PATH GLEW PATHS ${GLEW_LOCATION}/lib
+ FIND_LIBRARY ( GLEW_LIBRARY_PATH GLEW PATHS ${GLEW_LOCATION}/${CMAKE_INSTALL_LIBDIR}
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
)
- FIND_LIBRARY ( GLEWmx_LIBRARY_PATH GLEWmx PATHS ${GLEW_LOCATION}/lib
+ FIND_LIBRARY ( GLEWmx_LIBRARY_PATH GLEWmx PATHS ${GLEW_LOCATION}/${CMAKE_INSTALL_LIBDIR}
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
)
@@ -107,11 +107,11 @@
)
ELSE (APPLE)
# Unices
- FIND_LIBRARY ( GLEW_LIBRARY_PATH GLEW PATHS ${GLEW_LOCATION}/lib
+ FIND_LIBRARY ( GLEW_LIBRARY_PATH GLEW PATHS ${GLEW_LOCATION}/${CMAKE_INSTALL_LIBDIR}
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
)
- FIND_LIBRARY ( GLEWmx_LIBRARY_PATH GLEWmx PATHS ${GLEW_LOCATION}/lib
+ FIND_LIBRARY ( GLEWmx_LIBRARY_PATH GLEWmx PATHS ${GLEW_LOCATION}/${CMAKE_INSTALL_LIBDIR}
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
)
diff -urN a/cmake/FindGLFW3.cmake b/cmake/FindGLFW3.cmake
--- a/cmake/FindGLFW3.cmake 2018-08-13 16:33:07.000000000 +0100
+++ b/cmake/FindGLFW3.cmake 2018-08-28 12:20:33.334930718 +0100
@@ -39,7 +39,7 @@
FIND_PACKAGE ( PackageHandleStandardArgs )
-FIND_PATH( GLFW3_LOCATION include/GLFW/glfw3.h
+FIND_PATH( GLFW3_LOCATION ${CMAKE_INSTALL_INCLUDEDIR}/GLFW/glfw3.h
"$ENV{GLFW3_ROOT}"
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
@@ -50,11 +50,11 @@
)
IF (GLFW3_FOUND)
- SET( GLFW3_INCLUDE_DIR "${GLFW3_LOCATION}/include" CACHE STRING "GLFW3 include path")
+ SET( GLFW3_INCLUDE_DIR "${GLFW3_LOCATION}/${CMAKE_INSTALL_INCLUDEDIR}" CACHE STRING "GLFW3 include path")
SET (GLFW3_PATH_SUFFIXES x86_64-linux-gnu)
IF (GLFW3_USE_STATIC_LIBS)
FIND_LIBRARY ( GLFW3_glfw_LIBRARY glfw3
- PATHS ${GLFW3_LOCATION}/lib
+ PATHS ${GLFW3_LOCATION}/${CMAKE_INSTALL_LIBDIR}
PATH_SUFFIXES ${GLFW3_PATH_SUFFIXES}
NO_DEFAULT_PATH
NO_CMAKE_ENVIRONMENT_PATH
@@ -64,7 +64,7 @@
)
ELSE (GLFW3_USE_STATIC_LIBS)
FIND_LIBRARY ( GLFW3_glfw_LIBRARY glfw
- PATHS ${GLFW3_LOCATION}/lib
+ PATHS ${GLFW3_LOCATION}/${CMAKE_INSTALL_LIBDIR}
PATH_SUFFIXES ${GLFW3_PATH_SUFFIXES}
NO_DEFAULT_PATH
NO_CMAKE_ENVIRONMENT_PATH
diff -urN a/cmake/FindGLFW.cmake b/cmake/FindGLFW.cmake
--- a/cmake/FindGLFW.cmake 2018-08-13 16:33:07.000000000 +0100
+++ b/cmake/FindGLFW.cmake 2018-08-28 12:20:33.334930718 +0100
@@ -38,12 +38,12 @@
SET ( GLFW_FOUND FALSE )
-FIND_PATH( GLFW_LOCATION include/GL/glfw.h
+FIND_PATH( GLFW_LOCATION ${CMAKE_INSTALL_INCLUDEDIR}/GL/glfw.h
"$ENV{GLFW_ROOT}"
NO_SYSTEM_ENVIRONMENT_PATH
)
-SET( GLFW_INCLUDE_DIR "${GLFW_LOCATION}/include" CACHE STRING "GLFW include path")
+SET( GLFW_INCLUDE_DIR "${GLFW_LOCATION}/${CMAKE_INSTALL_INCLUDEDIR}" CACHE STRING "GLFW include path")
SET ( ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
IF (GLFW_USE_STATIC_LIBS)
@@ -61,7 +61,7 @@
FIND_LIBRARY ( GLFW_LIBRARY_PATH GLFW32S PATHS ${GLFW_LOCATION}/lib )
ELSE (APPLE)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
- FIND_LIBRARY ( GLFW_LIBRARY_PATH glfw PATHS ${GLFW_LOCATION}/lib ${GLFW_LOCATION}/lib64
+ FIND_LIBRARY ( GLFW_LIBRARY_PATH glfw PATHS ${GLFW_LOCATION}/${CMAKE_INSTALL_LIBDIR}
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
)
@@ -84,7 +84,7 @@
)
ELSE (APPLE)
# Unices
- FIND_LIBRARY ( GLFW_LIBRARY_PATH glfw PATHS ${GLFW_LOCATION}/lib ${GLFW_LOCATION}/lib64
+ FIND_LIBRARY ( GLFW_LIBRARY_PATH glfw PATHS ${GLFW_LOCATION}/${CMAKE_INSTALL_LIBDIR}
NO_SYSTEM_ENVIRONMENT_PATH
)
ENDIF (APPLE)
diff -urN a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake
--- a/cmake/FindOpenVDB.cmake 2018-08-13 16:33:07.000000000 +0100
+++ b/cmake/FindOpenVDB.cmake 2018-08-28 12:20:33.334930718 +0100
@@ -45,7 +45,7 @@
FIND_PACKAGE( PackageHandleStandardArgs )
-FIND_PATH( OPENVDB_LOCATION include/openvdb/version.h
+FIND_PATH( OPENVDB_LOCATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/version.h
"$ENV{OPENVDB_ROOT}"
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
@@ -56,10 +56,10 @@
)
IF( OpenVDB_FOUND )
- SET( OpenVDB_INCLUDE_DIR ${OPENVDB_LOCATION}/include
+ SET( OpenVDB_INCLUDE_DIR ${OPENVDB_LOCATION}/${CMAKE_INSTALL_INCLUDEDIR}
CACHE PATH "OpenVDB include directory")
- SET( OpenVDB_LIBRARY_DIR ${OPENVDB_LOCATION}/lib
+ SET( OpenVDB_LIBRARY_DIR ${OPENVDB_LOCATION}/${CMAKE_INSTALL_LIBDIR}
CACHE PATH "OpenVDB library directory" )
FIND_LIBRARY( OpenVDB_OPENVDB_LIBRARY openvdb
diff -urN a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake
--- a/cmake/FindTBB.cmake 2018-08-13 16:33:07.000000000 +0100
+++ b/cmake/FindTBB.cmake 2018-08-28 12:20:33.335930717 +0100
@@ -42,7 +42,7 @@
# SET ( TBB_FOUND FALSE )
-FIND_PATH( TBB_LOCATION include/tbb/tbb.h
+FIND_PATH( TBB_LOCATION ${CMAKE_INSTALL_INCLUDEDIR}/tbb/tbb.h
"$ENV{TBB_ROOT}"
NO_DEFAULT_PATH
NO_CMAKE_ENVIRONMENT_PATH
@@ -57,7 +57,7 @@
IF ( TBB_FOUND )
- SET( TBB_INCLUDE_DIR "${TBB_LOCATION}/include" CACHE STRING "TBB include directory")
+ SET( TBB_INCLUDE_DIR "${TBB_LOCATION}/${CMAKE_INSTALL_INCLUDEDIR}" CACHE STRING "TBB include directory")
IF (APPLE)
IF (TBB_FOR_CLANG)
@@ -86,7 +86,7 @@
LIST ( APPEND TBB_LIBRARIES_LIST ${TBB_LIBRARY_PATH} ${TBBmx_LIBRARY_PATH} )
ELSE (APPLE)
# MESSAGE ( "CMAKE_COMPILER_IS_GNUCXX = ${CMAKE_COMPILER_IS_GNUCXX}")
- SET ( TBB_LIBRARYDIR ${TBB_LOCATION}/lib CACHE STRING "TBB library directory")
+ SET ( TBB_LIBRARYDIR ${TBB_LOCATION}/${CMAKE_INSTALL_LIBDIR} CACHE STRING "TBB library directory")
IF (${CMAKE_COMPILER_IS_GNUCXX})
IF ( TBB_MATCH_COMPILER_VERSION )
STRING(REGEX MATCHALL "[0-9]+" GCC_VERSION_COMPONENTS ${CMAKE_CXX_COMPILER_VERSION})
diff -urN a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2018-08-13 16:33:07.000000000 +0100
+++ b/CMakeLists.txt 2018-08-28 12:20:33.335930717 +0100
@@ -32,6 +32,8 @@
ENABLE_TESTING()
+INCLUDE ( GNUInstallDirs )
+
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
diff -urN a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt
--- a/openvdb/CMakeLists.txt 2018-08-13 16:33:07.000000000 +0100
+++ b/openvdb/CMakeLists.txt 2018-08-28 12:20:33.335930717 +0100
@@ -414,7 +414,7 @@
)
INSTALL ( CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build \"${PROJECT_BINARY_DIR}\" --target doc)")
- INSTALL ( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html DESTINATION docs)
+ INSTALL ( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html DESTINATION ${CMAKE_INSTALL_DOCDIR})
ENDIF ()
@@ -423,37 +423,37 @@
INSTALL ( TARGETS
vdb_view
DESTINATION
- bin
+ ${CMAKE_INSTALL_BINDIR}
)
ENDIF ()
INSTALL ( TARGETS
vdb_print
vdb_render
DESTINATION
- bin
+ ${CMAKE_INSTALL_BINDIR}
)
INSTALL ( TARGETS
openvdb_static
DESTINATION
- lib
+ ${CMAKE_INSTALL_LIBDIR}
)
IF (WIN32)
INSTALL ( TARGETS
openvdb_shared
- RUNTIME DESTINATION bin COMPONENT Runtime
- ARCHIVE DESTINATION lib COMPONENT Runtime
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime
)
ELSE()
INSTALL ( TARGETS
openvdb_shared
DESTINATION
- lib
+ ${CMAKE_INSTALL_LIBDIR}
)
ENDIF ()
-INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR} DESTINATION include
+INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
PATTERN "python" EXCLUDE
PATTERN "cmd" EXCLUDE
diff -urN a/openvdb/python/CMakeLists.txt b/openvdb/python/CMakeLists.txt
--- a/openvdb/python/CMakeLists.txt 2018-08-13 16:33:07.000000000 +0100
+++ b/openvdb/python/CMakeLists.txt 2018-08-28 12:20:33.336930716 +0100
@@ -107,6 +107,6 @@
${PYOPENVDB_INSTALL_DIRECTORY}
)
-INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR} DESTINATION include
+INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
)
|