[jasper] update to 2.0.14, fix UWP

This commit is contained in:
Mikhail Paulyshka 2017-11-07 20:15:17 +03:00
parent 9d2f9739ae
commit e58f3ed58e
3 changed files with 52 additions and 17 deletions

View File

@ -1,4 +1,4 @@
Source: jasper Source: jasper
Version: 2.0.13-1 Version: 2.0.14-1
Description: Open source implementation of the JPEG-2000 Part-1 standard Description: Open source implementation of the JPEG-2000 Part-1 standard
Build-Depends: libjpeg-turbo Build-Depends: libjpeg-turbo

View File

@ -0,0 +1,32 @@
From bad33461a302ed8db02e0d9875e7b59b9e8f6032 Mon Sep 17 00:00:00 2001
From: Mikhail Paulyshka <me@mixaill.tk>
Date: Tue, 7 Nov 2017 20:10:31 +0300
Subject: [PATCH] Fixed build for Windows 10 UWP
---
src/libjasper/CMakeLists.txt | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/libjasper/CMakeLists.txt b/src/libjasper/CMakeLists.txt
index 234ae67..9d0a522 100644
--- a/src/libjasper/CMakeLists.txt
+++ b/src/libjasper/CMakeLists.txt
@@ -145,6 +145,15 @@ target_include_directories(libjasper BEFORE PRIVATE
set_target_properties(libjasper PROPERTIES OUTPUT_NAME jasper)
set_target_properties(libjasper PROPERTIES LINKER_LANGUAGE C)
+if(MSVC)
+ target_compile_definitions(libjasper PRIVATE
+ "-D_CRT_SECURE_NO_WARNINGS")
+ target_compile_definitions(libjasper PRIVATE
+ "-D_CRT_SECURE_NO_DEPRECATE")
+ target_compile_definitions(libjasper PRIVATE
+ "-D_CRT_NONSTDC_NO_DEPRECATE")
+endif()
+
if (UNIX)
set_target_properties(libjasper PROPERTIES
VERSION ${JAS_SO_NAME} SOVERSION ${JAS_SO_VERSION})
--
2.14.1.windows.1

View File

@ -1,13 +1,22 @@
include(vcpkg_common_functions) include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO mdadams/jasper REPO mdadams/jasper
REF version-2.0.13 REF version-2.0.14
SHA512 8c09a7b773e739a2594cd1002fe66f79ea4336f7de7c97267ab976c06ba075468a7f3c8731dff13a98221cd11d3f2bf8dcddb3fc2c2fc7d7c5ba402bcd3f9fd8 SHA512 6b270cb1eb55f777f30016f3258e5e2297627e7d086334814c308464f5a4552c23241b0fdbc81ea715a6f4746294657f96c1cb6ceb320629ce57db7e81d84940
HEAD_REF master) HEAD_REF master)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static) vcpkg_apply_patches(
set(JASPER_LINKAGE -DJAS_ENABLE_SHARED=OFF) SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/jasper-fix-uwp.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(JAS_ENABLE_SHARED ON)
else()
set(JAS_ENABLE_SHARED OFF)
endif() endif()
vcpkg_configure_cmake( vcpkg_configure_cmake(
@ -18,24 +27,18 @@ vcpkg_configure_cmake(
-DJAS_ENABLE_LIBJPEG=ON -DJAS_ENABLE_LIBJPEG=ON
-DJAS_ENABLE_OPENGL=OFF # not needed for the library -DJAS_ENABLE_OPENGL=OFF # not needed for the library
-DJAS_ENABLE_DOC=OFF -DJAS_ENABLE_DOC=OFF
${JASPER_LINKAGE}) -DJAS_ENABLE_PROGRAMS=OFF
-DJAS_ENABLE_SHARED=${JAS_ENABLE_SHARED}
)
vcpkg_install_cmake() vcpkg_install_cmake()
vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
else()
file(GLOB EXECS ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(REMOVE ${EXECS})
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share)
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jasper) file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jasper)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/jasper/LICENSE ${CURRENT_PACKAGES_DIR}/share/jasper/copyright) file(RENAME ${CURRENT_PACKAGES_DIR}/share/jasper/LICENSE ${CURRENT_PACKAGES_DIR}/share/jasper/copyright)