2017-06-30 05:56:12 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO OpenImageIO/oiio
|
2018-06-13 01:32:58 +08:00
|
|
|
REF Release-1.8.12
|
|
|
|
SHA512 2475792ff475d34b47b6af5ca71c6cf6d9d8c60452a506b1bf740b9dbb20ea72109117dc9a531b8302095de99f6280172723f26e23dc6e038256cbb43b697145
|
2017-06-30 05:56:12 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2018-05-02 06:55:59 +08:00
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/ext")
|
|
|
|
file(MAKE_DIRECTORY "${SOURCE_PATH}/ext/robin-map/tsl")
|
|
|
|
|
2017-06-30 05:56:12 +08:00
|
|
|
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}
|
2018-05-02 06:55:59 +08:00
|
|
|
-DBUILD_MISSING_PYBIND11=OFF
|
|
|
|
-DBUILD_MISSING_DEPS=OFF
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
|
2017-06-30 05:56:12 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
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)
|
2018-03-19 20:26:33 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
2017-06-30 05:56:12 +08:00
|
|
|
|
|
|
|
# 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)
|