1
1
This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/build_files/build_environment/cmake/jpeg.cmake
Ray molenkamp b9c37608a9 Build: upgrade many library dependencies to new versions for Blender 3.2
This only updates the build system, precompiled libraries for the various
platforms will be committed over the coming week.

New:
fmt 8.0.0
level_zero v1.7.15
pystring v1.1.3
robinmap v0.6.2
webp 1.2.2

Updated:
alembic 1.8.3
blosc 1.21.1
boost 1.78.0
embree 3.13.3
ffmpeg 5.0
fftw 3.3.10
flac 1.3.4
imath 3.1.4
ispc v1.17.0
jpeg 2.1.3
ogg 1.3.5
oidn 1.4.3
openal 1.21.1
opencolorio 2.1.1
openexr 3.1.4
openimageio v2.3.13.0
openjpeg 2.4.0
opensubdiv v3_4_4
openvdb 9.0.0
osl 1.11.17.0
sdl 2.0.20
tbb 2020_u3
tiff 4.3.0
usd 22.03
vorbis 1.3.7
vpx 1.11.0
x264 35fe20d1b
zlib 1.2.12

Implemented by Ray Molenkamp, Sybren Stüvel and Brecht Van Lommel.

Ref T95206
2022-04-20 16:42:16 +02:00

55 lines
1.4 KiB
CMake

# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
# cmake for windows
set(JPEG_EXTRA_ARGS
-DNASM=${NASM_PATH}
-DWITH_JPEG8=ON
-DCMAKE_DEBUG_POSTFIX=d
-DWITH_CRT_DLL=On
-DENABLE_SHARED=OFF
-DENABLE_STATIC=ON
)
ExternalProject_Add(external_jpeg
URL file://${PACKAGE_DIR}/${JPEG_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${JPEG_HASH_TYPE}=${JPEG_HASH}
PREFIX ${BUILD_DIR}/jpeg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpeg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpeg
)
if(BUILD_MODE STREQUAL Release)
set(JPEG_LIBRARY jpeg-static${LIBEXT})
else()
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_jpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpeg/lib/${JPEG_LIBRARY} ${LIBDIR}/jpeg/lib/jpeg${LIBEXT}
DEPENDEES install
)
endif()
else(WIN32)
# cmake for unix
set(JPEG_EXTRA_ARGS
-DWITH_JPEG8=ON
-DENABLE_STATIC=ON
-DENABLE_SHARED=OFF
-DCMAKE_INSTALL_LIBDIR=${LIBDIR}/jpeg/lib)
ExternalProject_Add(external_jpeg
URL file://${PACKAGE_DIR}/${JPEG_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${JPEG_HASH_TYPE}=${JPEG_HASH}
PREFIX ${BUILD_DIR}/jpeg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpeg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpeg
)
set(JPEG_LIBRARY libjpeg${LIBEXT})
endif()