forked from AcademySoftwareFoundation/OpenImageIO
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Larry Gritz <[email protected]>
- Loading branch information
Showing
9 changed files
with
274 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright Contributors to the OpenImageIO project. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# https://github.com/AcademySoftwareFoundation/OpenImageIO | ||
|
||
|
||
defs="" | ||
for arg in "$@" | ||
do | ||
echo "Building $arg" | ||
defs+=" -DBUILD_${arg}=ON" | ||
done | ||
|
||
|
||
if [[ "$defs" != "" ]]; then | ||
cmake -S src/cmake/dependencies -B build/deps/depbuild -DCMAKE_INSTALL_PREFIX=build/deps/dist $defs | ||
cmake --build build/deps/depbuild | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Copyright Contributors to the OpenImageIO project. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# https://github.com/AcademySoftwareFoundation/OpenImageIO | ||
|
||
cmake_minimum_required (VERSION 3.18.2) | ||
|
||
project (OpenImageIO_Dependencies | ||
LANGUAGES CXX C) | ||
|
||
list (APPEND CMAKE_MODULE_PATH | ||
"${PROJECT_SOURCE_DIR}/.." | ||
) | ||
|
||
# Utilities | ||
include(set_utils) | ||
|
||
include(ExternalProject) | ||
|
||
option (VERBOSE "Print lots of messages while compiling" ON) | ||
set (CMAKE_MESSAGE_LOG_LEVEL $<IF:$<BOOL:${VERBOSE}>,"VERBOSE","STATUS"> | ||
CACHE STRING "CMake log level to display") | ||
|
||
set_cache (CMAKE_CXX_STANDARD 17 "C++ standard to use") | ||
if (NOT CMAKE_BUILD_TYPE) | ||
set (CMAKE_BUILD_TYPE "Release") | ||
endif () | ||
message (STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}") | ||
set_if_not (CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
|
||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) | ||
set (CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/dist" CACHE PATH | ||
"Installation location" FORCE) | ||
endif() | ||
message (STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}") | ||
|
||
set (prefix_paths ${CMAKE_INSTALL_PREFIX} ${CMAKE_PREFIX_PATH}) | ||
set (BUILDER_COMMON_CMAKE_ARGS | ||
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} | ||
-D CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} | ||
-D CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} | ||
# -D CMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} | ||
-D CMAKE_IGNORE_PREFIX_PATH=${CMAKE_IGNORE_PREFIX_PATH} | ||
-D CMAKE_FIND_FRAMEWORK=${CMAKE_FIND_FRAMEWORK} | ||
-D CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} | ||
-D CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} | ||
-D CMAKE_C_FLAGS=${CMAKE_C_FLAGS} | ||
-D CMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE} | ||
-D CMAKE_COMPILE_WARNING_AS_ERROR=OFF | ||
-D BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} | ||
-D CMAKE_MSVC_RUNTIME_LIBRARY=${CMAKE_MSVC_RUNTIME_LIBRARY} | ||
-D CMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE} | ||
-D CMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} | ||
-D CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} | ||
) | ||
|
||
set_option (BUILD_all "Build all dependencies unconditionally" OFF VERBOSE) | ||
|
||
set (ALL_DEPS | ||
ZLIB | ||
Imath | ||
OpenEXR | ||
) | ||
|
||
# set_cache (BUILD_Imath OFF "Build Imath library") | ||
# if (BUILD_Imath OR BUILD_all) | ||
# include (${PROJECT_SOURCE_DIR}/build_Imath.cmake) | ||
# endif () | ||
|
||
foreach (dep IN LISTS ALL_DEPS) | ||
set_cache (BUILD_${dep} ${BUILD_all} "Build ${dep} library" VERBOSE) | ||
if (BUILD_${dep} OR BUILD_all) | ||
include (${PROJECT_SOURCE_DIR}/build_${dep}.cmake) | ||
set (${dep}_ROOT ${CMAKE_INSTALL_PREFIX}) | ||
message(STATUS "Set ${dep}_ROOT = ${${dep}_ROOT}") | ||
endif () | ||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Copyright Contributors to the OpenImageIO project. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# https://github.com/AcademySoftwareFoundation/OpenImageIO | ||
|
||
|
||
set_cache (Imath_BUILD_VERSION 3.1.10 "Imath version for local builds") | ||
set_cache (Imath_GIT_REPOSITORY "https://github.com/AcademySoftwareFoundation/Imath" "Repo URL") | ||
set_cache (Imath_GIT_TAG "v${Imath_BUILD_VERSION}" "Git tag to checkout") | ||
|
||
set_if_not (LOCAL_BUILD_SHARED_LIBS_DEFAULT OFF) | ||
set_cache (Imath_BUILD_SHARED_LIBS ${LOCAL_BUILD_SHARED_LIBS_DEFAULT} | ||
DOC "Should a local Imath build, if necessary, build shared libraries" ADVANCED) | ||
# string (MAKE_C_IDENTIFIER ${Imath_BUILD_VERSION} Imath_VERSION_IDENT) | ||
|
||
|
||
ExternalProject_Add(Imath | ||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/Imath | ||
GIT_REPOSITORY ${Imath_GIT_REPOSITORY} | ||
GIT_TAG ${Imath_GIT_TAG} | ||
CMAKE_ARGS | ||
${BUILDER_COMMON_CMAKE_ARGS} | ||
-D BUILD_SHARED_LIBS=${Imath_BUILD_SHARED_LIBS} | ||
# Don't build unnecessary parts of Imath | ||
-D BUILD_TESTING=OFF | ||
-D IMATH_BUILD_EXAMPLES=OFF | ||
-D IMATH_BUILD_PYTHON=OFF | ||
-D IMATH_BUILD_TESTING=OFF | ||
-D IMATH_BUILD_TOOLS=OFF | ||
-D IMATH_INSTALL_DOCS=OFF | ||
-D IMATH_INSTALL_PKG_CONFIG=OFF | ||
-D IMATH_INSTALL_TOOLS=OFF | ||
) | ||
|
||
|
||
# string (MAKE_C_IDENTIFIER ${Imath_BUILD_VERSION} Imath_VERSION_IDENT) | ||
# | ||
# build_dependency_with_cmake(Imath | ||
# VERSION ${Imath_BUILD_VERSION} | ||
# GIT_REPOSITORY ${Imath_GIT_REPOSITORY} | ||
# GIT_TAG ${Imath_GIT_TAG} | ||
# CMAKE_ARGS | ||
# -D BUILD_SHARED_LIBS=${Imath_BUILD_SHARED_LIBS} | ||
# # Don't built unnecessary parts of Imath | ||
# -D BUILD_TESTING=OFF | ||
# -D IMATH_BUILD_EXAMPLES=OFF | ||
# -D IMATH_BUILD_PYTHON=OFF | ||
# -D IMATH_BUILD_TESTING=OFF | ||
# -D IMATH_BUILD_TOOLS=OFF | ||
# -D IMATH_INSTALL_DOCS=OFF | ||
# -D IMATH_INSTALL_PKG_CONFIG=OFF | ||
# -D IMATH_INSTALL_TOOLS=OFF | ||
# # Give the library a custom name and symbol namespace so it can't | ||
# # conflict with any others in the system or linked into the same app. | ||
# # not needed -D IMATH_NAMESPACE_CUSTOM=1 | ||
# # not needed -D IMATH_INTERNAL_NAMESPACE=${PROJ_NAMESPACE_V}_Imath_${Imath_VERSION_IDENT} | ||
# -D IMATH_LIB_SUFFIX=_v${Imath_VERSION_IDENT}_${PROJ_NAMESPACE_V} | ||
# ) | ||
# | ||
# | ||
# # Signal to caller that we need to find again at the installed location | ||
# set (Imath_REFIND TRUE) | ||
# set (Imath_REFIND_ARGS CONFIG) | ||
# set (Imath_REFIND_VERSION ${Imath_BUILD_VERSION}) | ||
# | ||
# if (Imath_BUILD_SHARED_LIBS) | ||
# install_local_dependency_libs (Imath Imath) | ||
# endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Copyright Contributors to the OpenImageIO project. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# https://github.com/AcademySoftwareFoundation/OpenImageIO | ||
|
||
|
||
set_cache (OpenEXR_BUILD_VERSION 3.2.4 "OpenEXR version for local builds") | ||
set_cache (OpenEXR_GIT_REPOSITORY "https://github.com/AcademySoftwareFoundation/OpenEXR" "Repo URL") | ||
set_cache (OpenEXR_GIT_TAG "v${OpenEXR_BUILD_VERSION}" "Git tag to checkout") | ||
|
||
set_if_not (LOCAL_BUILD_SHARED_LIBS_DEFAULT OFF) | ||
set_cache (OpenEXR_BUILD_SHARED_LIBS ${LOCAL_BUILD_SHARED_LIBS_DEFAULT} | ||
DOC "Should a local OpenEXR build, if necessary, build shared libraries" ADVANCED) | ||
# string (MAKE_C_IDENTIFIER ${OpenEXR_BUILD_VERSION} OpenEXR_VERSION_IDENT) | ||
|
||
|
||
ExternalProject_Add(OpenEXR | ||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/OpenEXR | ||
GIT_REPOSITORY ${OpenEXR_GIT_REPOSITORY} | ||
GIT_TAG ${OpenEXR_GIT_TAG} | ||
# DEPENDS Imath | ||
CMAKE_ARGS | ||
-D BUILD_SHARED_LIBS=${Imath_BUILD_SHARED_LIBS} | ||
-D OPENEXR_FORCE_INTERNAL_DEFLATE=ON | ||
# Don't built unnecessary parts of OpenEXR | ||
-D BUILD_TESTING=OFF | ||
-D BUILD_WEBSITE=OFF | ||
-D OPENEXR_BUILD_EXAMPLES=OFF | ||
-D OPENEXR_BUILD_PYTHON=OFF | ||
-D OPENEXR_BUILD_SHARED_LIBS=OFF | ||
-D OPENEXR_BUILD_TOOLS=OFF | ||
-D OPENEXR_BUILD_WEBSITE=OFF | ||
-D OPENEXR_INSTALL_DOCS=OFF | ||
-D OPENEXR_INSTALL_PKG_CONFIG=OFF | ||
-D OPENEXR_INSTALL_TOOLS=OFF | ||
-D IMATH_ROOT=${Imath_ROOT} | ||
${BUILDER_COMMON_CMAKE_ARGS} | ||
# Give the library a custom name and symbol namespace so it can't | ||
# conflict with any others in the system or linked into the same app. | ||
# -D OPENEXR_NAMESPACE_CUSTOM=1 | ||
# -D ILMTHREAD_NAMESPACE_CUSTOM=1 | ||
# -D IEX_NAMESPACE_CUSTOM=1 | ||
# -D OPENEXR_INTERNAL_IMF_NAMESPACE=${PROJ_NAMESPACE_V}_Imf_${OpenEXR_VERSION_IDENT} | ||
# -D ILMTHREAD_INTERNAL_NAMESPACE=${PROJ_NAMESPACE_V}_IlmThread_${OpenEXR_VERSION_IDENT} | ||
# -D Iex_INTERNAL_NAMESPACE=${PROJ_NAMESPACE_V}_Iex_${OpenEXR_VERSION_IDENT} | ||
# -D OPENEXR_LIB_SUFFIX=_v${OpenEXR_VERSION_IDENT}_${PROJ_NAMESPACE_V} | ||
) | ||
|
||
|
||
# # Signal to caller that we need to find again at the installed location | ||
# set (OpenEXR_REFIND TRUE) | ||
# set (OpenEXR_REFIND_ARGS CONFIG) | ||
# set (OpenEXR_REFIND_VERSION ${OpenEXR_BUILD_VERSION}) | ||
# | ||
# if (OpenEXR_BUILD_SHARED_LIBS) | ||
# install_local_dependency_libs (OpenEXR OpenEXR) | ||
# install_local_dependency_libs (OpenEXR IlmThread) | ||
# install_local_dependency_libs (OpenEXR Iex) | ||
# endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.