summaryrefslogtreecommitdiff
path: root/lib/jxl_threads.cmake
diff options
context:
space:
mode:
authorjiyong.min <jiyong.min@samsung.com>2022-05-16 14:06:25 +0900
committerjiyong.min <jiyong.min@samsung.com>2022-05-16 17:30:06 +0900
commitb2051fff838fd13eda203439f58679cbefea065e (patch)
tree9609083253d0bc408ccd0bea761aee083d3cedfd /lib/jxl_threads.cmake
parent2cfcf8e1f81f73bef7036aa401264e72d358fdb2 (diff)
downloadlibjxl-b2051fff838fd13eda203439f58679cbefea065e.tar.gz
libjxl-b2051fff838fd13eda203439f58679cbefea065e.tar.bz2
libjxl-b2051fff838fd13eda203439f58679cbefea065e.zip
- Allow adding prefix for pkg-config https://github.com/libjxl/libjxl/pull/1403 Change-Id: Ib56b3a62229206a37d97316d448a7b02fb6fcfc9
Diffstat (limited to 'lib/jxl_threads.cmake')
-rw-r--r--lib/jxl_threads.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/jxl_threads.cmake b/lib/jxl_threads.cmake
index 85ceda4..491f938 100644
--- a/lib/jxl_threads.cmake
+++ b/lib/jxl_threads.cmake
@@ -93,6 +93,20 @@ endif() # TARGET_SUPPORTS_SHARED_LIBS AND NOT JPEGXL_STATIC
### Add a pkg-config file for libjxl_threads.
+
+# Allow adding prefix if CMAKE_INSTALL_INCLUDEDIR not absolute.
+if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
+ set(PKGCONFIG_TARGET_INCLUDES "${CMAKE_INSTALL_INCLUDEDIR}")
+else()
+ set(PKGCONFIG_TARGET_INCLUDES "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
+endif()
+# Allow adding prefix if CMAKE_INSTALL_LIBDIR not absolute.
+if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
+ set(PKGCONFIG_TARGET_LIBS "${CMAKE_INSTALL_LIBDIR}")
+else()
+ set(PKGCONFIG_TARGET_LIBS "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
+endif()
+
set(JPEGXL_THREADS_LIBRARY_REQUIRES "")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/threads/libjxl_threads.pc.in"
"libjxl_threads.pc" @ONLY)