diff options
author | jiyong.min <jiyong.min@samsung.com> | 2022-05-16 14:06:25 +0900 |
---|---|---|
committer | jiyong.min <jiyong.min@samsung.com> | 2022-05-16 17:30:06 +0900 |
commit | b2051fff838fd13eda203439f58679cbefea065e (patch) | |
tree | 9609083253d0bc408ccd0bea761aee083d3cedfd | |
parent | 2cfcf8e1f81f73bef7036aa401264e72d358fdb2 (diff) | |
download | libjxl-b2051fff838fd13eda203439f58679cbefea065e.tar.gz libjxl-b2051fff838fd13eda203439f58679cbefea065e.tar.bz2 libjxl-b2051fff838fd13eda203439f58679cbefea065e.zip |
Apply the patch for pkg-config due to 64-bit build dependence errortizen_7.0_m2_releasesubmit/tizen/20220524.041755accepted/tizen/unified/20230307.163821accepted/tizen/unified/20220525.134623accepted/tizen/7.0/unified/hotfix/20221116.110957accepted/tizen/7.0/unified/20221110.060017tizen_7.0_hotfixtizen_7.0accepted/tizen_7.0_unified_hotfixaccepted/tizen_7.0_unified
- Allow adding prefix for pkg-config
https://github.com/libjxl/libjxl/pull/1403
Change-Id: Ib56b3a62229206a37d97316d448a7b02fb6fcfc9
-rw-r--r-- | lib/jxl.cmake | 14 | ||||
-rw-r--r-- | lib/jxl/libjxl.pc.in | 4 | ||||
-rw-r--r-- | lib/jxl_threads.cmake | 14 | ||||
-rw-r--r-- | lib/threads/libjxl_threads.pc.in | 4 |
4 files changed, 32 insertions, 4 deletions
diff --git a/lib/jxl.cmake b/lib/jxl.cmake index 3a98030..3acc413 100644 --- a/lib/jxl.cmake +++ b/lib/jxl.cmake @@ -568,6 +568,20 @@ set(JPEGXL_LIBRARY_REQUIRES if(NOT JPEGXL_ENABLE_SKCMS) set(JPEGXL_LIBRARY_REQUIRES "${JPEGXL_LIBRARY_REQUIRES} lcms2") endif() + +# 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() + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/jxl/libjxl.pc.in" "libjxl.pc" @ONLY) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libjxl.pc" diff --git a/lib/jxl/libjxl.pc.in b/lib/jxl/libjxl.pc.in index 5dca2ac..a2a6cb5 100644 --- a/lib/jxl/libjxl.pc.in +++ b/lib/jxl/libjxl.pc.in @@ -1,7 +1,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} -libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ +libdir=@PKGCONFIG_TARGET_LIBS@ +includedir=@PKGCONFIG_TARGET_INCLUDES@ Name: libjxl Description: Loads and saves JPEG XL files 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) diff --git a/lib/threads/libjxl_threads.pc.in b/lib/threads/libjxl_threads.pc.in index 8a3275c..4abd783 100644 --- a/lib/threads/libjxl_threads.pc.in +++ b/lib/threads/libjxl_threads.pc.in @@ -1,7 +1,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} -libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ +libdir=@PKGCONFIG_TARGET_LIBS@ +includedir=@PKGCONFIG_TARGET_INCLUDES@ Name: libjxl_threads Description: JPEG XL multi-thread runner using std::threads. |