aboutsummaryrefslogtreecommitdiff
path: root/ports/openjpeg
diff options
context:
space:
mode:
Diffstat (limited to 'ports/openjpeg')
-rw-r--r--ports/openjpeg/portfile.cmake12
-rw-r--r--ports/openjpeg/vcpkg.json2
2 files changed, 11 insertions, 3 deletions
diff --git a/ports/openjpeg/portfile.cmake b/ports/openjpeg/portfile.cmake
index 6885513ba..348b2594f 100644
--- a/ports/openjpeg/portfile.cmake
+++ b/ports/openjpeg/portfile.cmake
@@ -39,8 +39,16 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets()
-if(VCPKG_TARGET_IS_WINDOWS)
- # TODO: remove -lm from *.pc files
+if(VCPKG_TARGET_IS_WINDOWS AND (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL MinGW))
+ if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libopenjp2.pc" "-lm" "")
+ endif()
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libopenjp2.pc" "-lm" "")
+else()
+ if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libopenjp2.pc" "-lm" "-lm -pthread")
+ endif()
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libopenjp2.pc" "-lm" "-lm -pthread")
endif()
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m)
diff --git a/ports/openjpeg/vcpkg.json b/ports/openjpeg/vcpkg.json
index d54e271dc..f910c2cc4 100644
--- a/ports/openjpeg/vcpkg.json
+++ b/ports/openjpeg/vcpkg.json
@@ -1,7 +1,7 @@
{
"name": "openjpeg",
"version-semver": "2.3.1",
- "port-version": 3,
+ "port-version": 4,
"description": "OpenJPEG is an open-source JPEG 2000 codec written in C language. It has been developed in order to promote the use of JPEG 2000, a still-image compression standard from the Joint Photographic Experts Group (JPEG). Since April 2015, it is officially recognized by ISO/IEC and ITU-T as a JPEG 2000 Reference Software.",
"homepage": "https://github.com/uclouvain/openjpeg",
"features": {