mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[libjpeg-turbo] Upgrades 2019.05.08 (#6482)
* [libjpeg_turbo] Upgrades 2019.05.08 * Remove debug/bin * Update patch * Add black line
This commit is contained in:
parent
2be78a87c9
commit
b021f9db4a
@ -1,3 +1,3 @@
|
||||
Source: libjpeg-turbo
|
||||
Version: 2.0.1-1
|
||||
Version: 2.0.2
|
||||
Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems.
|
||||
|
@ -1,238 +1,248 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index efeb51a..5c7d829 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -147,6 +147,12 @@ option(ENABLE_SHARED "Build shared libraries" TRUE)
|
||||
boolean_number(ENABLE_SHARED)
|
||||
option(ENABLE_STATIC "Build static libraries" TRUE)
|
||||
boolean_number(ENABLE_STATIC)
|
||||
+option(ENABLE_EXECUTABLES "Build executables" TRUE)
|
||||
+boolean_number(ENABLE_EXECUTABLES)
|
||||
+option(INSTALL_DOCS "Install doc files" TRUE)
|
||||
+boolean_number(INSTALL_DOCS)
|
||||
+option(INSTALL_HEADERS "Install header files" TRUE)
|
||||
+boolean_number(INSTALL_HEADERS)
|
||||
option(REQUIRE_SIMD "Generate a fatal error if SIMD extensions are not available for this platform (default is to fall back to a non-SIMD build)" FALSE)
|
||||
boolean_number(REQUIRE_SIMD)
|
||||
option(WITH_12BIT "Encode/decode JPEG images with 12-bit samples (implies WITH_ARITH_DEC=0 WITH_ARITH_ENC=0 WITH_JAVA=0 WITH_SIMD=0 WITH_TURBOJPEG=0 )" FALSE)
|
||||
@@ -593,17 +599,19 @@ if(WITH_TURBOJPEG)
|
||||
LINK_FLAGS "${TJMAPFLAG}${TJMAPFILE}")
|
||||
endif()
|
||||
|
||||
- add_executable(tjunittest tjunittest.c tjutil.c md5/md5.c md5/md5hl.c)
|
||||
- target_link_libraries(tjunittest turbojpeg)
|
||||
+ if(ENABLE_EXECUTABLES)
|
||||
+ add_executable(tjunittest tjunittest.c tjutil.c md5/md5.c md5/md5hl.c)
|
||||
+ target_link_libraries(tjunittest turbojpeg)
|
||||
|
||||
- add_executable(tjbench tjbench.c tjutil.c)
|
||||
- target_link_libraries(tjbench turbojpeg)
|
||||
- if(UNIX)
|
||||
- target_link_libraries(tjbench m)
|
||||
- endif()
|
||||
+ add_executable(tjbench tjbench.c tjutil.c)
|
||||
+ target_link_libraries(tjbench turbojpeg)
|
||||
+ if(UNIX)
|
||||
+ target_link_libraries(tjbench m)
|
||||
+ endif()
|
||||
|
||||
- add_executable(tjexample tjexample.c)
|
||||
- target_link_libraries(tjexample turbojpeg)
|
||||
+ add_executable(tjexample tjexample.c)
|
||||
+ target_link_libraries(tjexample turbojpeg)
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_STATIC)
|
||||
@@ -616,14 +624,16 @@ if(WITH_TURBOJPEG)
|
||||
set_target_properties(turbojpeg-static PROPERTIES OUTPUT_NAME turbojpeg)
|
||||
endif()
|
||||
|
||||
- add_executable(tjunittest-static tjunittest.c tjutil.c md5/md5.c
|
||||
- md5/md5hl.c)
|
||||
- target_link_libraries(tjunittest-static turbojpeg-static)
|
||||
+ if(ENABLE_EXECUTABLES)
|
||||
+ add_executable(tjunittest-static tjunittest.c tjutil.c md5/md5.c
|
||||
+ md5/md5hl.c)
|
||||
+ target_link_libraries(tjunittest-static turbojpeg-static)
|
||||
|
||||
- add_executable(tjbench-static tjbench.c tjutil.c)
|
||||
- target_link_libraries(tjbench-static turbojpeg-static)
|
||||
- if(UNIX)
|
||||
- target_link_libraries(tjbench-static m)
|
||||
+ add_executable(tjbench-static tjbench.c tjutil.c)
|
||||
+ target_link_libraries(tjbench-static turbojpeg-static)
|
||||
+ if(UNIX)
|
||||
+ target_link_libraries(tjbench-static m)
|
||||
+ endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -639,7 +649,7 @@ else()
|
||||
set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c)
|
||||
endif()
|
||||
|
||||
-if(ENABLE_STATIC)
|
||||
+if(ENABLE_STATIC AND ENABLE_EXECUTABLES)
|
||||
add_executable(cjpeg-static cjpeg.c cdjpeg.c rdgif.c rdppm.c rdswitch.c
|
||||
${CJPEG_BMP_SOURCES})
|
||||
set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
@@ -655,9 +665,11 @@ if(ENABLE_STATIC)
|
||||
set_property(TARGET jpegtran-static PROPERTY COMPILE_FLAGS "${USE_SETMODE}")
|
||||
endif()
|
||||
|
||||
-add_executable(rdjpgcom rdjpgcom.c)
|
||||
+if(ENABLE_EXECUTABLES)
|
||||
+ add_executable(rdjpgcom rdjpgcom.c)
|
||||
|
||||
-add_executable(wrjpgcom wrjpgcom.c)
|
||||
+ add_executable(wrjpgcom wrjpgcom.c)
|
||||
+endif()
|
||||
|
||||
|
||||
###############################################################################
|
||||
@@ -1326,26 +1338,32 @@ set(EXE ${CMAKE_EXECUTABLE_SUFFIX})
|
||||
|
||||
if(WITH_TURBOJPEG)
|
||||
if(ENABLE_SHARED)
|
||||
- install(TARGETS turbojpeg tjbench
|
||||
+ install(TARGETS turbojpeg
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+ if(ENABLE_EXECUTABLES)
|
||||
+ install(TARGETS tjbench
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+ endif()
|
||||
endif()
|
||||
if(ENABLE_STATIC)
|
||||
install(TARGETS turbojpeg-static ARCHIVE
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
- if(NOT ENABLE_SHARED)
|
||||
+ if(NOT ENABLE_SHARED AND ENABLE_EXECUTABLES)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tjbench-static${EXE}
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME tjbench${EXE})
|
||||
endif()
|
||||
endif()
|
||||
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg.h
|
||||
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
+ if(INSTALL_HEADERS)
|
||||
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg.h
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_STATIC)
|
||||
install(TARGETS jpeg-static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
- if(NOT ENABLE_SHARED)
|
||||
+ if(NOT ENABLE_SHARED AND ENABLE_EXECUTABLES)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cjpeg-static${EXE}
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME cjpeg${EXE})
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/djpeg-static${EXE}
|
||||
@@ -1355,21 +1373,25 @@ if(ENABLE_STATIC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+if(ENABLE_EXECUTABLES)
|
||||
+ install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+endif()
|
||||
|
||||
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.txt
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/tjexample.c
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/libjpeg.txt
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/structure.txt
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/usage.txt ${CMAKE_CURRENT_SOURCE_DIR}/wizard.txt
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
-if(WITH_JAVA)
|
||||
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/java/TJExample.java
|
||||
- DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
+if(INSTALL_DOCS)
|
||||
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.txt
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/tjexample.c
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/libjpeg.txt
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/structure.txt
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/usage.txt ${CMAKE_CURRENT_SOURCE_DIR}/wizard.txt
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
+ if(WITH_JAVA)
|
||||
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/java/TJExample.java
|
||||
+ DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
-if(UNIX OR MINGW)
|
||||
+if((UNIX OR MINGW) AND INSTALL_DOCS)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cjpeg.1
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/djpeg.1 ${CMAKE_CURRENT_SOURCE_DIR}/jpegtran.1
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rdjpgcom.1
|
||||
@@ -1380,10 +1402,12 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libjpeg.pc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libturbojpeg.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
|
||||
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/jerror.h ${CMAKE_CURRENT_SOURCE_DIR}/jmorecfg.h
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h
|
||||
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
+if(INSTALL_HEADERS)
|
||||
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerror.h ${CMAKE_CURRENT_SOURCE_DIR}/jmorecfg.h
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
+endif()
|
||||
|
||||
include(cmakescripts/BuildPackages.cmake)
|
||||
|
||||
diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt
|
||||
index 2bab832..afbb56a 100755
|
||||
--- a/sharedlib/CMakeLists.txt
|
||||
+++ b/sharedlib/CMakeLists.txt
|
||||
@@ -70,24 +70,33 @@ else()
|
||||
set(DJPEG_BMP_SOURCES ../wrbmp.c ../wrtarga.c)
|
||||
endif()
|
||||
|
||||
-add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdgif.c ../rdppm.c
|
||||
- ../rdswitch.c ${CJPEG_BMP_SOURCES})
|
||||
-set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
-target_link_libraries(cjpeg jpeg)
|
||||
+if(ENABLE_EXECUTABLES)
|
||||
+ add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdgif.c ../rdppm.c
|
||||
+ ../rdswitch.c ${CJPEG_BMP_SOURCES})
|
||||
+ set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
+ target_link_libraries(cjpeg jpeg)
|
||||
|
||||
-add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c
|
||||
- ../wrgif.c ../wrppm.c ${DJPEG_BMP_SOURCES})
|
||||
-set_property(TARGET djpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
-target_link_libraries(djpeg jpeg)
|
||||
+ add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c
|
||||
+ ../wrgif.c ../wrppm.c ${DJPEG_BMP_SOURCES})
|
||||
+ set_property(TARGET djpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
+ target_link_libraries(djpeg jpeg)
|
||||
|
||||
-add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c)
|
||||
-target_link_libraries(jpegtran jpeg)
|
||||
-set_property(TARGET jpegtran PROPERTY COMPILE_FLAGS "${USE_SETMODE}")
|
||||
+ add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c)
|
||||
+ target_link_libraries(jpegtran jpeg)
|
||||
+ set_property(TARGET jpegtran PROPERTY COMPILE_FLAGS "${USE_SETMODE}")
|
||||
|
||||
-add_executable(jcstest ../jcstest.c)
|
||||
-target_link_libraries(jcstest jpeg)
|
||||
+ add_executable(jcstest ../jcstest.c)
|
||||
+ target_link_libraries(jcstest jpeg)
|
||||
+endif()
|
||||
|
||||
-install(TARGETS jpeg cjpeg djpeg jpegtran
|
||||
+install(TARGETS jpeg
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+
|
||||
+if(ENABLE_EXECUTABLES)
|
||||
+ install(TARGETS cjpeg djpeg jpegtran
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+endif()
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b9d2d40..c868862 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -143,6 +143,12 @@ option(ENABLE_SHARED "Build shared libraries" TRUE)
|
||||
boolean_number(ENABLE_SHARED)
|
||||
option(ENABLE_STATIC "Build static libraries" TRUE)
|
||||
boolean_number(ENABLE_STATIC)
|
||||
+option(ENABLE_EXECUTABLES "Build executables" TRUE)
|
||||
+boolean_number(ENABLE_EXECUTABLES)
|
||||
+option(INSTALL_DOCS "Install doc files" TRUE)
|
||||
+boolean_number(INSTALL_DOCS)
|
||||
+option(INSTALL_HEADERS "Install header files" TRUE)
|
||||
+boolean_number(INSTALL_HEADERS)
|
||||
option(REQUIRE_SIMD "Generate a fatal error if SIMD extensions are not available for this platform (default is to fall back to a non-SIMD build)" FALSE)
|
||||
boolean_number(REQUIRE_SIMD)
|
||||
option(WITH_12BIT "Encode/decode JPEG images with 12-bit samples (implies WITH_ARITH_DEC=0 WITH_ARITH_ENC=0 WITH_JAVA=0 WITH_SIMD=0 WITH_TURBOJPEG=0 )" FALSE)
|
||||
@@ -593,18 +599,20 @@ if(WITH_TURBOJPEG)
|
||||
LINK_FLAGS "${TJMAPFLAG}${TJMAPFILE}")
|
||||
endif()
|
||||
|
||||
- add_executable(tjunittest tjunittest.c tjutil.c md5/md5.c md5/md5hl.c)
|
||||
- target_link_libraries(tjunittest turbojpeg)
|
||||
+ if(ENABLE_EXECUTABLES)
|
||||
+ add_executable(tjunittest tjunittest.c tjutil.c md5/md5.c md5/md5hl.c)
|
||||
+ target_link_libraries(tjunittest turbojpeg)
|
||||
|
||||
- add_executable(tjbench tjbench.c tjutil.c)
|
||||
- target_link_libraries(tjbench turbojpeg)
|
||||
- if(UNIX)
|
||||
- target_link_libraries(tjbench m)
|
||||
- endif()
|
||||
+ add_executable(tjbench tjbench.c tjutil.c)
|
||||
+ target_link_libraries(tjbench turbojpeg)
|
||||
+ if(UNIX)
|
||||
+ target_link_libraries(tjbench m)
|
||||
+ endif()
|
||||
|
||||
- add_executable(tjexample tjexample.c)
|
||||
- target_link_libraries(tjexample turbojpeg)
|
||||
- endif()
|
||||
+ add_executable(tjexample tjexample.c)
|
||||
+ target_link_libraries(tjexample turbojpeg)
|
||||
+ endif()
|
||||
+ endif()
|
||||
|
||||
if(ENABLE_STATIC)
|
||||
add_library(turbojpeg-static STATIC ${JPEG_SOURCES} $<TARGET_OBJECTS:simd>
|
||||
@@ -616,14 +624,16 @@ if(WITH_TURBOJPEG)
|
||||
set_target_properties(turbojpeg-static PROPERTIES OUTPUT_NAME turbojpeg)
|
||||
endif()
|
||||
|
||||
- add_executable(tjunittest-static tjunittest.c tjutil.c md5/md5.c
|
||||
- md5/md5hl.c)
|
||||
- target_link_libraries(tjunittest-static turbojpeg-static)
|
||||
+ if(ENABLE_EXECUTABLES)
|
||||
+ add_executable(tjunittest-static tjunittest.c tjutil.c md5/md5.c
|
||||
+ md5/md5hl.c)
|
||||
+ target_link_libraries(tjunittest-static turbojpeg-static)
|
||||
|
||||
- add_executable(tjbench-static tjbench.c tjutil.c)
|
||||
- target_link_libraries(tjbench-static turbojpeg-static)
|
||||
- if(UNIX)
|
||||
- target_link_libraries(tjbench-static m)
|
||||
+ add_executable(tjbench-static tjbench.c tjutil.c)
|
||||
+ target_link_libraries(tjbench-static turbojpeg-static)
|
||||
+ if(UNIX)
|
||||
+ target_link_libraries(tjbench-static m)
|
||||
+ endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -639,7 +649,7 @@ else()
|
||||
set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c)
|
||||
endif()
|
||||
|
||||
-if(ENABLE_STATIC)
|
||||
+if(ENABLE_STATIC AND ENABLE_EXECUTABLES)
|
||||
add_executable(cjpeg-static cjpeg.c cdjpeg.c rdgif.c rdppm.c rdswitch.c
|
||||
${CJPEG_BMP_SOURCES})
|
||||
set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
@@ -655,9 +665,10 @@ if(ENABLE_STATIC)
|
||||
set_property(TARGET jpegtran-static PROPERTY COMPILE_FLAGS "${USE_SETMODE}")
|
||||
endif()
|
||||
|
||||
-add_executable(rdjpgcom rdjpgcom.c)
|
||||
-
|
||||
-add_executable(wrjpgcom wrjpgcom.c)
|
||||
+if(ENABLE_EXECUTABLES)
|
||||
+ add_executable(rdjpgcom rdjpgcom.c)
|
||||
+ add_executable(wrjpgcom wrjpgcom.c)
|
||||
+endif()
|
||||
|
||||
|
||||
###############################################################################
|
||||
@@ -1328,10 +1339,14 @@ set(EXE ${CMAKE_EXECUTABLE_SUFFIX})
|
||||
|
||||
if(WITH_TURBOJPEG)
|
||||
if(ENABLE_SHARED)
|
||||
- install(TARGETS turbojpeg tjbench
|
||||
+ install(TARGETS turbojpeg
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+ if(ENABLE_EXECUTABLES)
|
||||
+ install(TARGETS tjbench
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+ endif()
|
||||
if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND
|
||||
CMAKE_C_LINKER_SUPPORTS_PDB)
|
||||
install(FILES "$<TARGET_PDB_FILE:turbojpeg>"
|
||||
@@ -1341,7 +1356,7 @@ if(WITH_TURBOJPEG)
|
||||
if(ENABLE_STATIC)
|
||||
install(TARGETS turbojpeg-static ARCHIVE
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
- if(NOT ENABLE_SHARED)
|
||||
+ if(NOT ENABLE_SHARED AND ENABLE_EXECUTABLES)
|
||||
if(MSVC_IDE)
|
||||
set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}")
|
||||
else()
|
||||
@@ -1351,13 +1366,15 @@ if(WITH_TURBOJPEG)
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME tjbench${EXE})
|
||||
endif()
|
||||
endif()
|
||||
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg.h
|
||||
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
+ if(INSTALL_HEADERS)
|
||||
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg.h
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_STATIC)
|
||||
install(TARGETS jpeg-static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
- if(NOT ENABLE_SHARED)
|
||||
+ if(NOT ENABLE_SHARED AND ENABLE_EXECUTABLES)
|
||||
if(MSVC_IDE)
|
||||
set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}")
|
||||
else()
|
||||
@@ -1372,21 +1389,25 @@ if(ENABLE_STATIC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+if(ENABLE_EXECUTABLES)
|
||||
+ install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+endif()
|
||||
|
||||
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.txt
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/tjexample.c
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/libjpeg.txt
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/structure.txt
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/usage.txt ${CMAKE_CURRENT_SOURCE_DIR}/wizard.txt
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
-if(WITH_JAVA)
|
||||
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/java/TJExample.java
|
||||
- DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
+if(INSTALL_DOCS)
|
||||
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.txt
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/tjexample.c
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/libjpeg.txt
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/structure.txt
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/usage.txt ${CMAKE_CURRENT_SOURCE_DIR}/wizard.txt
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
+ if(WITH_JAVA)
|
||||
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/java/TJExample.java
|
||||
+ DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
-if(UNIX OR MINGW)
|
||||
+if((UNIX OR MINGW) AND INSTALL_DOCS)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cjpeg.1
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/djpeg.1 ${CMAKE_CURRENT_SOURCE_DIR}/jpegtran.1
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rdjpgcom.1
|
||||
@@ -1397,10 +1418,12 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libjpeg.pc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libturbojpeg.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
|
||||
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/jerror.h ${CMAKE_CURRENT_SOURCE_DIR}/jmorecfg.h
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h
|
||||
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
+if(INSTALL_HEADERS)
|
||||
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerror.h ${CMAKE_CURRENT_SOURCE_DIR}/jmorecfg.h
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
+endif()
|
||||
|
||||
include(cmakescripts/BuildPackages.cmake)
|
||||
|
||||
diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt
|
||||
index a5c4e39..794c2af 100644
|
||||
--- a/sharedlib/CMakeLists.txt
|
||||
+++ b/sharedlib/CMakeLists.txt
|
||||
@@ -71,27 +71,35 @@ else()
|
||||
set(DJPEG_BMP_SOURCES ../wrbmp.c ../wrtarga.c)
|
||||
endif()
|
||||
|
||||
-add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdgif.c ../rdppm.c
|
||||
- ../rdswitch.c ${CJPEG_BMP_SOURCES})
|
||||
-set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
-target_link_libraries(cjpeg jpeg)
|
||||
+if(ENABLE_EXECUTABLES)
|
||||
+ add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdgif.c ../rdppm.c
|
||||
+ ../rdswitch.c ${CJPEG_BMP_SOURCES})
|
||||
+ set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
+ target_link_libraries(cjpeg jpeg)
|
||||
|
||||
-add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c
|
||||
- ../wrgif.c ../wrppm.c ${DJPEG_BMP_SOURCES})
|
||||
-set_property(TARGET djpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
-target_link_libraries(djpeg jpeg)
|
||||
+ add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c
|
||||
+ ../wrgif.c ../wrppm.c ${DJPEG_BMP_SOURCES})
|
||||
+ set_property(TARGET djpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||
+ target_link_libraries(djpeg jpeg)
|
||||
|
||||
-add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c)
|
||||
-target_link_libraries(jpegtran jpeg)
|
||||
-set_property(TARGET jpegtran PROPERTY COMPILE_FLAGS "${USE_SETMODE}")
|
||||
+ add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c)
|
||||
+ target_link_libraries(jpegtran jpeg)
|
||||
+ set_property(TARGET jpegtran PROPERTY COMPILE_FLAGS "${USE_SETMODE}")
|
||||
|
||||
-add_executable(jcstest ../jcstest.c)
|
||||
-target_link_libraries(jcstest jpeg)
|
||||
+ add_executable(jcstest ../jcstest.c)
|
||||
+ target_link_libraries(jcstest jpeg)
|
||||
+endif()
|
||||
|
||||
-install(TARGETS jpeg cjpeg djpeg jpegtran
|
||||
+install(TARGETS jpeg
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+if(ENABLE_EXECUTABLES)
|
||||
+ install(TARGETS cjpeg djpeg jpegtran
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+endif()
|
||||
if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND
|
||||
CMAKE_C_LINKER_SUPPORTS_PDB)
|
||||
install(FILES "$<TARGET_PDB_FILE:jpeg>"
|
||||
|
@ -3,8 +3,8 @@ include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libjpeg-turbo/libjpeg-turbo
|
||||
REF 2.0.1
|
||||
SHA512 d456515dcda7c5e2e257c9fd1441f3a5cff0d33281237fb9e3584bbec08a181c4b037947a6f87d805977ec7528df39b12a5d32f6e8db878a62bcc90482f86e0e
|
||||
REF 2.0.2
|
||||
SHA512 4dcde37ba014500cee69f7d49b359112655c177cf2c0003b4693bfe25f8a55147e9a87f58d31b4fc952a7faed6fecd5087220fd879110ade326922991f11c423
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
add-options-for-exes-docs-headers.patch
|
||||
@ -54,6 +54,8 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/jpegd.lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpegd.lib")
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
else(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg.lib")
|
||||
@ -66,12 +68,21 @@ file(COPY
|
||||
${SOURCE_PATH}/LICENSE.md
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo
|
||||
)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/copyright)
|
||||
vcpkg_copy_pdbs()
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jpeg)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man)
|
||||
|
||||
file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
||||
file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
||||
if(EXE OR DEBUG_EXE)
|
||||
file(REMOVE ${EXE} ${DEBUG_EXE})
|
||||
endif()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jpeg)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_test_cmake(PACKAGE_NAME JPEG MODULE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user