mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 05:01:37 +08:00
54 lines
1.4 KiB
CMake
54 lines
1.4 KiB
CMake
|
include(vcpkg_common_functions)
|
||
|
|
||
|
vcpkg_from_github(
|
||
|
OUT_SOURCE_PATH SOURCE_PATH
|
||
|
REPO OpenImageIO/oiio
|
||
|
REF Release-1.7.15
|
||
|
SHA512 5b83961a77de36082e0a3abeac8015f9455504680d7437777524a9ac17ac7994df2a2ad1af86a884cf17c1afcd71a36a30e24711cba8d8a30511c05e36d7fadc
|
||
|
HEAD_REF master
|
||
|
)
|
||
|
|
||
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||
|
set(BUILDSTATIC ON)
|
||
|
set(LINKSTATIC ON)
|
||
|
else()
|
||
|
set(BUILDSTATIC OFF)
|
||
|
set(LINKSTATIC OFF)
|
||
|
endif()
|
||
|
|
||
|
vcpkg_configure_cmake(
|
||
|
SOURCE_PATH ${SOURCE_PATH}
|
||
|
PREFER_NINJA
|
||
|
OPTIONS
|
||
|
-DOIIO_BUILD_TOOLS=OFF
|
||
|
-DOIIO_BUILD_TESTS=OFF
|
||
|
-DHIDE_SYMBOLS=ON
|
||
|
-DUSE_FFMPEG=OFF
|
||
|
-DUSE_FIELD3D=OFF
|
||
|
-DUSE_FREETYPE=OFF
|
||
|
-DUSE_GIF=OFF
|
||
|
-DUSE_LIBRAW=OFF
|
||
|
-DUSE_NUKE=OFF
|
||
|
-DUSE_OCIO=OFF
|
||
|
-DUSE_OPENCV=OFF
|
||
|
-DUSE_OPENJPEG=OFF
|
||
|
-DUSE_PTEX=OFF
|
||
|
-DUSE_PYTHON=OFF
|
||
|
-DUSE_QT=OFF
|
||
|
-DBUILDSTATIC=${BUILDSTATIC}
|
||
|
-DLINKSTATIC=${LINKSTATIC}
|
||
|
)
|
||
|
|
||
|
vcpkg_install_cmake()
|
||
|
|
||
|
vcpkg_copy_pdbs()
|
||
|
|
||
|
# Clean
|
||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc)
|
||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
|
||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||
|
|
||
|
# Handle copyright
|
||
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openimageio)
|
||
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/openimageio/LICENSE ${CURRENT_PACKAGES_DIR}/share/openimageio/copyright)
|