Build: require OpenJPEG 2.x minimum, remove bundled version.

* WITH_SYSTEM_OPENJPEG is removed and is now always on, this was already
  the case for macOS and Windows.
* This should not break existing Linx builds. If there is no new enough
  OpenJPEG installed, CMake will no find libopenjp2 and WITH_IMAGE_OPENJPEG
  will be disabled.
* install_deps.sh was updated with new package names, since distributions
  put this version in a new package.

Differential Revision: https://developer.blender.org/D3663
This commit is contained in:
Brecht Van Lommel
2018-08-30 14:20:19 +02:00
parent bf8aac0d49
commit a1651ddc98
61 changed files with 9 additions and 18310 deletions

View File

@@ -167,7 +167,6 @@ option_defaults_init(
_init_FFTW3
_init_GAMEENGINE
_init_OPENSUBDIV
_init_SYSTEM_OPENJPG
)
# customize...
@@ -184,13 +183,11 @@ if(UNIX AND NOT APPLE)
set(_init_SDL OFF)
set(_init_FFTW3 OFF)
set(_init_OPENSUBDIV OFF)
set(_init_SYSTEM_OPENJPG OFF)
elseif(WIN32)
set(_init_JACK OFF)
elseif(APPLE)
set(_init_JACK OFF)
set(_init_OPENSUBDIV OFF)
set(_init_SYSTEM_OPENJPG OFF)
endif()
@@ -304,9 +301,6 @@ else()
endif()
# (unix defaults to System OpenJPEG On)
option(WITH_SYSTEM_OPENJPEG "Use the operating systems OpenJPEG library" ${_init_SYSTEM_OPENJPG})
if(UNIX AND NOT APPLE)
option(WITH_SYSTEM_EIGEN3 "Use the systems Eigen3 library" OFF)
endif()
@@ -1019,16 +1013,11 @@ else()
unset(_SYSTEM_BIG_ENDIAN)
endif()
if(WITH_IMAGE_OPENJPEG)
if(WITH_SYSTEM_OPENJPEG)
# dealt with above
set(OPENJPEG_DEFINES "")
else()
set(OPENJPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/libopenjpeg")
set(OPENJPEG_DEFINES "-DOPJ_STATIC")
endif()
# Special handling of Windows platform where openjpeg is always static.
if(WIN32)
set(OPENJPEG_DEFINES "-DOPJ_STATIC")
else()
set(OPENJPEG_DEFINES "")
endif()
endif()
@@ -1751,7 +1740,6 @@ if(FIRST_RUN)
info_cfg_option(WITH_MEM_JEMALLOC)
info_cfg_option(WITH_MEM_VALGRIND)
info_cfg_option(WITH_SYSTEM_GLEW)
info_cfg_option(WITH_SYSTEM_OPENJPEG)
info_cfg_text("Image Formats:")
info_cfg_option(WITH_OPENIMAGEIO)