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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
|
From fecc8e9e23f78de94c41bc641b3e5b9e9a84560b Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Thu, 11 Apr 2019 13:10:57 +0200
Subject: [PATCH] Use GNUInstallDirs for standard installation directories
Raises minimum cmake version by a little.
(Later rebased by sam@gentoo.org for 2.4.0)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@
# For this purpose you can define a CMake var: OPENJPEG_NAMESPACE to whatever you like
# e.g.:
# set(OPENJPEG_NAMESPACE "GDCMOPENJPEG")
-cmake_minimum_required(VERSION 2.8.2)
+cmake_minimum_required(VERSION 2.8.5)
if(COMMAND CMAKE_POLICY)
cmake_policy(SET CMP0003 NEW)
@@ -105,58 +105,27 @@ endif()
# --------------------------------------------------------------------------
# Install directories
# Build DOCUMENTATION (not in ALL target and only if Doxygen is found)
+include(GNUInstallDirs)
+
option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
string(TOLOWER ${PROJECT_NAME} projectname)
set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
-if(NOT OPENJPEG_INSTALL_BIN_DIR)
- set(OPENJPEG_INSTALL_BIN_DIR "bin")
-endif()
-
-if(NOT OPENJPEG_INSTALL_LIB_DIR)
- set(OPENJPEG_INSTALL_LIB_DIR "lib")
-endif()
-
-if(NOT OPENJPEG_INSTALL_SHARE_DIR)
- set(OPENJPEG_INSTALL_SHARE_DIR "share")
-endif()
-
-if(NOT OPENJPEG_INSTALL_DATA_DIR)
- set(OPENJPEG_INSTALL_DATA_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
-endif()
-
-if(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
- set(OPENJPEG_INSTALL_INCLUDE_DIR "include/${OPENJPEG_INSTALL_SUBDIR}")
-endif()
-
-if(BUILD_DOC)
-if(NOT OPENJPEG_INSTALL_MAN_DIR)
- set(OPENJPEG_INSTALL_MAN_DIR "share/man/")
-endif()
-
-if(NOT OPENJPEG_INSTALL_DOC_DIR)
- set(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
-endif()
-endif()
-
if(NOT OPENJPEG_INSTALL_JNI_DIR)
if(WIN32)
- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_BIN_DIR})
+ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_BINDIR})
else()
- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_LIB_DIR})
+ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_LIBDIR})
endif()
endif()
if(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
- # We could install *.cmake files in share/ however those files contains
- # hardcoded path to libraries on a multi-arch system (fedora/debian) those
- # path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
- set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
+ set(OPENJPEG_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${OPENJPEG_INSTALL_SUBDIR}")
endif()
if (APPLE)
- list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
+ list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
option(OPJ_USE_DSYMUTIL "Call dsymutil on binaries after build." OFF)
endif()
@@ -342,14 +311,6 @@ install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
)
#-----------------------------------------------------------------------------
-# install CHANGES and LICENSE
-if(BUILD_DOC)
-if(EXISTS ${OPENJPEG_SOURCE_DIR}/CHANGES)
- install(FILES CHANGES DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
-endif()
-
-install(FILES LICENSE DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
-endif()
include (cmake/OpenJPEGCPack.cmake)
@@ -366,14 +327,14 @@ if(BUILD_PKGCONFIG_FILES)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc @ONLY)
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc DESTINATION
- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
#
if(BUILD_JPWL)
# install in lib and not share (see multi-arch note above)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpwl/libopenjpwl.pc.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/libopenjpwl.pc @ONLY)
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpwl.pc DESTINATION
- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
endif()
#
if(BUILD_JPIP)
@@ -381,7 +342,7 @@ if(BUILD_PKGCONFIG_FILES)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpip/libopenjpip.pc.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc @ONLY)
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc DESTINATION
- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
endif()
#
if(BUILD_JP3D)
@@ -389,7 +350,7 @@ if(BUILD_PKGCONFIG_FILES)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp3d/libopenjp3d.pc.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/libopenjp3d.pc @ONLY)
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp3d.pc DESTINATION
- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
endif()
endif()
--- a/cmake/OpenJPEGConfig.cmake.in
+++ b/cmake/OpenJPEGConfig.cmake.in
@@ -27,7 +27,7 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
# This is an install tree
include(${SELF_DIR}/OpenJPEGTargets.cmake)
- set(INC_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
+ set(INC_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@")
get_filename_component(OPENJPEG_INCLUDE_DIRS "${INC_DIR}" ABSOLUTE)
else()
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -44,7 +44,7 @@ if(DOXYGEN_FOUND)
# install HTML documentation (install png files too):
install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html
- DESTINATION ${OPENJPEG_INSTALL_DOC_DIR}
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}
PATTERN ".svn" EXCLUDE
)
else()
--- a/src/bin/jp2/CMakeLists.txt
+++ b/src/bin/jp2/CMakeLists.txt
@@ -67,7 +67,7 @@ foreach(exe opj_decompress opj_compress opj_dump)
# Install exe
install(TARGETS ${exe}
EXPORT OpenJPEGTargets
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
)
if(OPJ_USE_DSYMUTIL)
add_custom_command(TARGET ${exe} POST_BUILD
@@ -83,6 +83,6 @@ install(
FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_compress.1
${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_decompress.1
${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_dump.1
- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1)
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
#
endif()
--- a/src/bin/jp3d/CMakeLists.txt
+++ b/src/bin/jp3d/CMakeLists.txt
@@ -36,6 +36,6 @@ foreach(exe opj_jp3d_compress opj_jp3d_decompress)
# Install exe
install(TARGETS ${exe}
EXPORT OpenJP3DTargets
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
)
endforeach()
--- a/src/bin/jpip/CMakeLists.txt
+++ b/src/bin/jpip/CMakeLists.txt
@@ -13,7 +13,7 @@ add_executable(opj_jpip_addxml opj_jpip_addxml.c)
# Install exe
install(TARGETS opj_jpip_addxml
EXPORT OpenJPEGTargets
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
)
if(BUILD_JPIP_SERVER)
@@ -38,7 +38,7 @@ if(BUILD_JPIP_SERVER)
# Install exe
install(TARGETS opj_server
EXPORT OpenJPEGTargets
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
)
endif()
@@ -52,7 +52,7 @@ add_executable(${exe} ${exe}.c)
target_link_libraries(${exe} openjpip)
install(TARGETS ${exe}
EXPORT OpenJPEGTargets
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
)
endforeach()
@@ -123,7 +123,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
)
install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
)
else()
# opj_viewer (simple, no xerces)
@@ -153,7 +153,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
)
install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
)
endif()
else()
--- a/src/bin/jpwl/CMakeLists.txt
+++ b/src/bin/jpwl/CMakeLists.txt
@@ -57,6 +57,6 @@ foreach(exe decompress compress)
endif()
install(TARGETS ${jpwl_exe}
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
)
endforeach()
--- a/src/bin/mj2/CMakeLists.txt
+++ b/src/bin/mj2/CMakeLists.txt
@@ -43,5 +43,5 @@ foreach(exe
endif()
install(TARGETS ${exe}
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR})
+ DESTINATION ${CMAKE_INSTALL_BINDIR})
endforeach()
--- a/src/lib/openjp2/CMakeLists.txt
+++ b/src/lib/openjp2/CMakeLists.txt
@@ -2,7 +2,7 @@ include_regular_expression("^.*$")
#
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opj_config.h
- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers)
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers)
include_directories(
${${OPENJPEG_NAMESPACE}_BINARY_DIR}/src/lib/openjp2 # opj_config.h and opj_config_private.h
@@ -114,21 +114,21 @@ endif()
# Install library
install(TARGETS ${INSTALL_LIBS}
EXPORT OpenJPEGTargets
- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
)
# Install includes files
install(FILES openjpeg.h opj_stdint.h
- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers
)
if(BUILD_DOC)
# install man page of the library
install(
FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man3/libopenjp2.3
- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man3)
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
endif()
if(BUILD_LUTS_GENERATOR)
--- a/src/lib/openjp2/libopenjp2.pc.cmake.in
+++ b/src/lib/openjp2/libopenjp2.pc.cmake.in
@@ -1,9 +1,9 @@
prefix=@CMAKE_INSTALL_PREFIX@
-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
+mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
+docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
Name: openjp2
Description: JPEG2000 library (Part 1 and 2)
--- a/src/lib/openjp3d/CMakeLists.txt
+++ b/src/lib/openjp3d/CMakeLists.txt
@@ -34,12 +34,12 @@ endif()
# Install library
install(TARGETS ${OPENJP3D_LIBRARY_NAME}
EXPORT OpenJP3DTargets
- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Libraries
)
# Install includes files
install(FILES openjp3d.h
- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}
COMPONENT Headers
)
--- a/src/lib/openjp3d/libopenjp3d.pc.cmake.in
+++ b/src/lib/openjp3d/libopenjp3d.pc.cmake.in
@@ -1,9 +1,9 @@
prefix=@CMAKE_INSTALL_PREFIX@
-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
+mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
+docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
Name: openjp3d
Description: JPEG2000 Extensions for three-dimensional data (Part 10)
--- a/src/lib/openjpip/CMakeLists.txt
+++ b/src/lib/openjpip/CMakeLists.txt
@@ -74,9 +74,9 @@ endif()
# Install library
install(TARGETS openjpip
EXPORT OpenJPEGTargets
- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
)
if(BUILD_JPIP_SERVER)
@@ -86,6 +86,6 @@ if(BUILD_JPIP_SERVER)
PROPERTIES COMPILE_FLAGS "-DSERVER")
install(TARGETS openjpip_server
EXPORT OpenJPEGTargets
- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
)
endif()
--- a/src/lib/openjpip/libopenjpip.pc.cmake.in
+++ b/src/lib/openjpip/libopenjpip.pc.cmake.in
@@ -1,9 +1,9 @@
prefix=@CMAKE_INSTALL_PREFIX@
-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
+mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
+docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
Name: openjpip
Description: JPEG2000 Interactivity tools, APIs and protocols (Part 9)
--- a/src/lib/openjpwl/CMakeLists.txt
+++ b/src/lib/openjpwl/CMakeLists.txt
@@ -58,7 +58,7 @@ endif()
# Install library
install(TARGETS openjpwl
EXPORT OpenJPEGTargets
- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
)
--- a/src/lib/openjpwl/libopenjpwl.pc.cmake.in
+++ b/src/lib/openjpwl/libopenjpwl.pc.cmake.in
@@ -1,9 +1,9 @@
prefix=@CMAKE_INSTALL_PREFIX@
-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
+mandir=${prefix}/@CMAKE_INSTALL_MANDIR@
+docdir=${prefix}/@CMAKE_INSTALL_DOCDIR@
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
Name: openjpwl
Description: JPEG2000 Wireless library (Part 11)
--- a/src/lib/openmj2/CMakeLists.txt
+++ b/src/lib/openmj2/CMakeLists.txt
@@ -53,12 +53,12 @@ endif()
# Install library
install(TARGETS ${OPENMJ2_LIBRARY_NAME}
EXPORT OpenMJ2Targets
- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Libraries
)
# Install includes files
#install(FILES mj2.h
-# DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}/${subdir}
+# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}
# COMPONENT Headers
#)
--- a/wrapping/java/openjp2/CMakeLists.txt
+++ b/wrapping/java/openjp2/CMakeLists.txt
@@ -69,5 +69,5 @@ add_custom_target(OpenJPEGJavaJar ALL
)
install(FILES ${LIBRARY_OUTPUT_PATH}/openjpeg.jar
- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
)
|