diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e4b83b0..44a8188a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,15 @@ set(LIBJPEG_TURBO_VERSION_NUMBER ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_REVIS # application bundles would break our iOS packages.) set(CMAKE_MACOSX_BUNDLE FALSE) +get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY + GENERATOR_IS_MULTI_CONFIG) +# If the GENERATOR_IS_MULTI_CONFIG property doesn't exist (CMake < 3.9), then +# set the GENERATOR_IS_MULTI_CONFIG variable manually if the generator is +# Visual Studio or Xcode (the only multi-config generators in CMake < 3.9). +if(NOT GENERATOR_IS_MULTI_CONFIG AND (MSVC_IDE OR XCODE)) + set(GENERATOR_IS_MULTI_CONFIG TRUE) +endif() + string(TIMESTAMP DEFAULT_BUILD "%Y%m%d") set(BUILD ${DEFAULT_BUILD} CACHE STRING "Build string (default: ${DEFAULT_BUILD})") @@ -270,6 +279,16 @@ if(NOT WITH_JPEG8) report_option(WITH_MEM_SRCDST "In-memory source/destination managers") endif() +# 0: Original libjpeg v6b/v7/v8 API/ABI +# +# libjpeg v6b/v7 API/ABI emulation: +# 1: + In-memory source/destination managers (libjpeg-turbo 1.3.x) +# 2: + Partial image decompression functions (libjpeg-turbo 1.5.x) +# 3: + ICC functions (libjpeg-turbo 2.0.x) +# +# libjpeg v8 API/ABI emulation: +# 1: + Partial image decompression functions (libjpeg-turbo 1.5.x) +# 2: + ICC functions (libjpeg-turbo 2.0.x) set(SO_AGE 2) if(WITH_MEM_SRCDST) set(SO_AGE 3) @@ -320,8 +339,19 @@ message(STATUS "libjpeg API shared library version = ${SO_MAJOR_VERSION}.${SO_AG # names of functions whenever they are modified in a backward-incompatible # manner, it is always backward-ABI-compatible with itself, so the major and # minor SO versions don't change. However, we increase the middle number (the -# SO "age") whenever functions are added to the API. +# SO "age") whenever functions are added to the API, because adding functions +# affects forward API/ABI compatibility. set(TURBOJPEG_SO_MAJOR_VERSION 0) +# 0: TurboJPEG 1.3.x API +# 1: TurboJPEG 1.4.x API +# The TurboJPEG 1.5.x API modified some of the function prototypes, adding +# the const keyword in front of pointers to unmodified buffers, but that did +# not affect forward API/ABI compatibility. +# 2: TurboJPEG 2.0.x API +# The TurboJPEG 2.1.x API modified the behavior of the tjDecompressHeader3() +# function so that it accepts "abbreviated table specification" (AKA +# "tables-only") datastreams as well as JPEG images, but that did not affect +# forward API/ABI compatibility. set(TURBOJPEG_SO_AGE 2) set(TURBOJPEG_SO_VERSION 0.${TURBOJPEG_SO_AGE}.0) @@ -735,7 +765,7 @@ add_executable(strtest strtest.c) add_subdirectory(md5) -if(MSVC_IDE OR XCODE) +if(GENERATOR_IS_MULTI_CONFIG) set(OBJDIR "\${CTEST_CONFIGURATION_TYPE}/") else() set(OBJDIR "") @@ -1562,7 +1592,7 @@ if(WITH_TURBOJPEG) INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) if(NOT ENABLE_SHARED) - if(MSVC_IDE OR XCODE) + if(GENERATOR_IS_MULTI_CONFIG) set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}") else() set(DIR ${CMAKE_CURRENT_BINARY_DIR}) @@ -1580,7 +1610,7 @@ if(ENABLE_STATIC) INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) if(NOT ENABLE_SHARED) - if(MSVC_IDE OR XCODE) + if(GENERATOR_IS_MULTI_CONFIG) set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}") else() set(DIR ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/ChangeLog.md b/ChangeLog.md index 5b58b1ad..694e18bc 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -21,10 +21,21 @@ tables. have been removed. +2.1.5 +===== + +### Significant changes relative to 2.1.4: + +1. Fixed issues in the build system whereby, when using the Ninja Multi-Config +CMake generator, a static build of libjpeg-turbo (a build in which +`ENABLE_SHARED` is `0`) could not be installed, a Windows installer could not +be built, and the Java regression tests failed. + + 2.1.4 ===== -### Significant changes relative to 2.1.3 +### Significant changes relative to 2.1.3: 1. Fixed a regression introduced in 2.1.3 that caused build failures with Visual Studio 2010. @@ -59,7 +70,7 @@ virtual array access") under certain circumstances. 2.1.3 ===== -### Significant changes relative to 2.1.2 +### Significant changes relative to 2.1.2: 1. Fixed a regression introduced by 2.0 beta1[7] whereby cjpeg compressed PGM input files into full-color JPEG images unless the `-grayscale` option was @@ -83,7 +94,7 @@ be reproduced using the libjpeg API, not using djpeg. 2.1.2 ===== -### Significant changes relative to 2.1.1 +### Significant changes relative to 2.1.1: 1. Fixed a regression introduced by 2.1 beta1[13] that caused the remaining GAS implementations of AArch64 (Arm 64-bit) Neon SIMD functions (which are used @@ -115,7 +126,7 @@ image contains incomplete or corrupt image data. 2.1.1 ===== -### Significant changes relative to 2.1.0 +### Significant changes relative to 2.1.0: 1. Fixed a regression introduced in 2.1.0 that caused build failures with non-GCC-compatible compilers for Un*x/Arm platforms. @@ -144,7 +155,7 @@ transform a specially-crafted malformed JPEG image. 2.1.0 ===== -### Significant changes relative to 2.1 beta1 +### Significant changes relative to 2.1 beta1: 1. Fixed a regression introduced by 2.1 beta1[6(b)] whereby attempting to decompress certain progressive JPEG images with one or more component planes of diff --git a/cmakescripts/BuildPackages.cmake b/cmakescripts/BuildPackages.cmake index eb2cf6ac..abf6a90c 100644 --- a/cmakescripts/BuildPackages.cmake +++ b/cmakescripts/BuildPackages.cmake @@ -94,7 +94,7 @@ if(WITH_12BIT) set(INST_DEFS ${INST_DEFS} -D12BIT) endif() -if(MSVC_IDE) +if(GENERATOR_IS_MULTI_CONFIG) set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=${CMAKE_CFG_INTDIR}\\") else() set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=")