diff options
| author | Thomas Bracht Laumann Jespersen <t@laumann.xyz> | 2022-08-07 16:42:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-07 16:42:01 +0200 |
| commit | c7bccf0515892617af984328e96cff5b4a6cd6d3 (patch) | |
| tree | 67fe67826f15c36e97cc6b8edf150e0b4e68fee5 /src/lib/openjpip | |
| parent | e3f07dcc07c651321ec3b5f540ef698bbe6f1906 (diff) | |
CMake: switch to GNUInstallDirs (#1424)
* Add GNUInstallDirs for standard installation directories
Distributions are given standard variables for already existing hooks.
Multiarch libdirs is taken care of automagically.
Raises minimum cmake version by a little.
* Handle CMAKE_INSTALL_xxx being absolute paths for .pc file generation
In some cases the CMAKE_INSTAL_{BIN,MAN,DOC,LIB,INCLUDE}DIR variables
may turn out to be absolute paths in which case prepending ${prefix} in
the pkg-config .pc files will result in incorrect values.
For .pc file generation, figure out if these variables are absolute and
omit the prefix in the configured file when so.
See: https://github.com/OSGeo/PROJ/commit/ab25e4b7ed9544e668282dcd293cfaaa2e56dbdf
Diffstat (limited to 'src/lib/openjpip')
| -rw-r--r-- | src/lib/openjpip/CMakeLists.txt | 8 | ||||
| -rw-r--r-- | src/lib/openjpip/libopenjpip.pc.cmake.in | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/openjpip/CMakeLists.txt b/src/lib/openjpip/CMakeLists.txt index b3cb8ce8..aace36d4 100644 --- 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() diff --git a/src/lib/openjpip/libopenjpip.pc.cmake.in b/src/lib/openjpip/libopenjpip.pc.cmake.in index 183b68ff..fc97ef04 100644 --- 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=@bindir@ +mandir=@mandir@ +docdir=@docdir@ +libdir=@libdir@ +includedir=@includedir@ Name: openjpip Description: JPEG2000 Interactivity tools, APIs and protocols (Part 9) |
