Build: Fix issues w/ Ninja Multi-Config generator
- Fix an issue whereby a build with ENABLE_SHARED=0 could not be
installed when using the Ninja Multi-Config CMake generator.
- Fix an issue whereby a Windows installer could not be built when using
the Ninja Multi-Config CMake generator.
- Fix an issue whereby the Java regression tests failed when using the
Ninja Multi-Config CMake generator.
Based on:
4f169deeb0
Closes #626
This commit is contained in:
@@ -40,6 +40,15 @@ set(LIBJPEG_TURBO_VERSION_NUMBER ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_REVIS
|
|||||||
# application bundles would break our iOS packages.)
|
# application bundles would break our iOS packages.)
|
||||||
set(CMAKE_MACOSX_BUNDLE FALSE)
|
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")
|
string(TIMESTAMP DEFAULT_BUILD "%Y%m%d")
|
||||||
set(BUILD ${DEFAULT_BUILD} CACHE STRING "Build string (default: ${DEFAULT_BUILD})")
|
set(BUILD ${DEFAULT_BUILD} CACHE STRING "Build string (default: ${DEFAULT_BUILD})")
|
||||||
|
|
||||||
@@ -734,7 +743,7 @@ add_executable(strtest strtest.c)
|
|||||||
|
|
||||||
add_subdirectory(md5)
|
add_subdirectory(md5)
|
||||||
|
|
||||||
if(MSVC_IDE OR XCODE)
|
if(GENERATOR_IS_MULTI_CONFIG)
|
||||||
set(OBJDIR "\${CTEST_CONFIGURATION_TYPE}/")
|
set(OBJDIR "\${CTEST_CONFIGURATION_TYPE}/")
|
||||||
else()
|
else()
|
||||||
set(OBJDIR "")
|
set(OBJDIR "")
|
||||||
@@ -1468,7 +1477,7 @@ if(WITH_TURBOJPEG)
|
|||||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
if(NOT ENABLE_SHARED)
|
if(NOT ENABLE_SHARED)
|
||||||
if(MSVC_IDE OR XCODE)
|
if(GENERATOR_IS_MULTI_CONFIG)
|
||||||
set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}")
|
set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}")
|
||||||
else()
|
else()
|
||||||
set(DIR ${CMAKE_CURRENT_BINARY_DIR})
|
set(DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
@@ -1486,7 +1495,7 @@ if(ENABLE_STATIC)
|
|||||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
if(NOT ENABLE_SHARED)
|
if(NOT ENABLE_SHARED)
|
||||||
if(MSVC_IDE OR XCODE)
|
if(GENERATOR_IS_MULTI_CONFIG)
|
||||||
set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}")
|
set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}")
|
||||||
else()
|
else()
|
||||||
set(DIR ${CMAKE_CURRENT_BINARY_DIR})
|
set(DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|||||||
11
ChangeLog.md
11
ChangeLog.md
@@ -1,3 +1,14 @@
|
|||||||
|
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
|
2.1.4
|
||||||
=====
|
=====
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ if(WITH_JAVA)
|
|||||||
set(INST_DEFS ${INST_DEFS} -DJAVA)
|
set(INST_DEFS ${INST_DEFS} -DJAVA)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC_IDE)
|
if(GENERATOR_IS_MULTI_CONFIG)
|
||||||
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=${CMAKE_CFG_INTDIR}\\")
|
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=${CMAKE_CFG_INTDIR}\\")
|
||||||
else()
|
else()
|
||||||
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=")
|
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=")
|
||||||
|
|||||||
Reference in New Issue
Block a user