Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): Add libjpeg-turbo recipe #4392

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions src/cmake/build_libjpeg-turbo.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/Academ SoftwareFoundation/OpenImageIO

set_cache (libjpeg-turbo_BUILD_VERSION 3.0.3 "libjpeg-turbo version for local builds")
set (libjpeg-turbo_GIT_REPOSITORY "https://github.com/libjpeg-turbo/libjpeg-turbo")
set (libjpeg-turbo_GIT_TAG "${libjpeg-turbo_BUILD_VERSION}")
set_cache (libjpeg-turbo_BUILD_SHARED_LIBS OFF #${LOCAL_BUILD_SHARED_LIBS_DEFAULT}
DOC "Should a local libjpeg-turbo build, if necessary, build shared libraries" ADVANCED)

string (MAKE_C_IDENTIFIER ${libjpeg-turbo_BUILD_VERSION} libjpeg-turbo_VERSION_IDENT)

build_dependency_with_cmake(libjpeg-turbo
VERSION ${libjpeg-turbo_BUILD_VERSION}
GIT_REPOSITORY ${libjpeg-turbo_GIT_REPOSITORY}
GIT_TAG ${libjpeg-turbo_GIT_TAG}
CMAKE_ARGS
-D ENABLE_SHARED=${libjpeg-turbo_BUILD_SHARED_LIBS}
-D WITH_JPEG8=1
-D CMAKE_INSTALL_LIBDIR=lib
-D CMAKE_POSITION_INDEPENDENT_CODE=1

)
# Set some things up that we'll need for a subsequent find_package to work
set (libjpeg-turbo_ROOT ${libjpeg-turbo_LOCAL_INSTALL_DIR})


# Signal to caller that we need to find again at the installed location
set (libjpeg-turbo_REFIND TRUE)
set (libjpeg-turbo_REFIND_ARGS CONFIG)

if (libjpeg-turbo_BUILD_SHARED_LIBS)
install_local_dependency_libs (libjpeg-turbo libjpeg-turbo)
endif ()
Loading