mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-10 15:25:18 -06:00
parent
43f4288fdc
commit
96c861f906
14 changed files with 581 additions and 84 deletions
32
deps/OpenEXR/OpenEXR.cmake
vendored
32
deps/OpenEXR/OpenEXR.cmake
vendored
|
@ -1,3 +1,34 @@
|
|||
# Check if we're building for arm on x86_64 and just for OpenEXR, build fat
|
||||
# binaries. We need this because it compiles some code to generate other
|
||||
# source and we need to be able to run the executables. When we link the
|
||||
# library, the x86_64 part will be ignored.
|
||||
if (APPLE AND IS_CROSS_COMPILE)
|
||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64" AND ${CMAKE_OSX_ARCHITECTURES} MATCHES "arm")
|
||||
set(_openexr_arch arm64^^x86_64)
|
||||
set(_openxr_list_sep LIST_SEPARATOR ^^)
|
||||
set(_cmake_openexr_arch -DCMAKE_OSX_ARCHITECTURES:STRING=${_openexr_arch})
|
||||
else()
|
||||
set(_openexr_arch ${CMAKE_OSX_ARCHITECTURES})
|
||||
set(_cmake_openexr_arch -DCMAKE_OSX_ARCHITECTURES:STRING=${_openexr_arch})
|
||||
endif()
|
||||
ExternalProject_Add(dep_OpenEXR
|
||||
EXCLUDE_FROM_ALL ON
|
||||
URL https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip
|
||||
URL_HASH SHA256=0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de
|
||||
INSTALL_DIR ${DESTDIR}/usr/local
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/OpenEXR
|
||||
${_openxr_list_sep}
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}/usr/local
|
||||
-DBUILD_SHARED_LIBS:BOOL=OFF
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DBUILD_TESTING=OFF
|
||||
-DPYILMBASE_ENABLE:BOOL=OFF
|
||||
-DOPENEXR_VIEWERS_ENABLE:BOOL=OFF
|
||||
-DOPENEXR_BUILD_UTILS:BOOL=OFF
|
||||
${_cmake_openexr_arch}
|
||||
)
|
||||
else()
|
||||
bambustudio_add_cmake_project(OpenEXR
|
||||
# GIT_REPOSITORY https://github.com/openexr/openexr.git
|
||||
URL https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip
|
||||
|
@ -11,6 +42,7 @@ bambustudio_add_cmake_project(OpenEXR
|
|||
-DOPENEXR_VIEWERS_ENABLE:BOOL=OFF
|
||||
-DOPENEXR_BUILD_UTILS:BOOL=OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
add_debug_dep(dep_OpenEXR)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue