aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffin Downs <35574547+grdowns@users.noreply.github.com>2019-08-08 17:46:04 -0700
committerGitHub <noreply@github.com>2019-08-08 17:46:04 -0700
commit743e168ef5c7705e44d1d5cab5b9cca22328345e (patch)
tree2b4b293c573bbe4986e0a6373ebc4cae1713f258
parent9d53b869a59572e088383f36e0a46795c0dbc667 (diff)
downloadvcpkg-743e168ef5c7705e44d1d5cab5b9cca22328345e.tar.gz
vcpkg-743e168ef5c7705e44d1d5cab5b9cca22328345e.zip
[openimageio] find_package support (#7588)
* Copy find module to share; Append share to module path * Bump version
-rw-r--r--ports/openimageio/CONTROL2
-rw-r--r--ports/openimageio/portfile.cmake3
-rw-r--r--ports/openimageio/vcpkg-cmake-wrapper.cmake8
3 files changed, 12 insertions, 1 deletions
diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL
index 3b864bea0..94ae8654e 100644
--- a/ports/openimageio/CONTROL
+++ b/ports/openimageio/CONTROL
@@ -1,5 +1,5 @@
Source: openimageio
-Version: 2019-08-08
+Version: 2019-08-08-1
Homepage: https://github.com/OpenImageIO/oiio
Description: A library for reading and writing images, and a bunch of related classes, utilities, and application
Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map, boost-stacktrace
diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake
index 3053af3fa..7284d58b8 100644
--- a/ports/openimageio/portfile.cmake
+++ b/ports/openimageio/portfile.cmake
@@ -71,6 +71,9 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+file(COPY ${SOURCE_PATH}/src/cmake/modules/FindOpenImageIO.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/openimageio)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/openimageio/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/openimageio/copyright)
diff --git a/ports/openimageio/vcpkg-cmake-wrapper.cmake b/ports/openimageio/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 000000000..82dc991f0
--- /dev/null
+++ b/ports/openimageio/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,8 @@
+set(OPENIMAGEIO_PREV_MODULE_PATH ${CMAKE_MODULE_PATH})
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+
+if(NOT OPENIMAGEIO_LIBRARIES)
+ _find_package(${ARGS})
+endif()
+
+set(CMAKE_MODULE_PATH ${OPENIMAGEIO_PREV_MODULE_PATH})