Skip to content

Commit

Permalink
[openimageio] find_package support (microsoft#7588)
Browse files Browse the repository at this point in the history
* Copy find module to share; Append share to module path

* Bump version
  • Loading branch information
grdowns authored Aug 9, 2019
1 parent 9d53b86 commit 743e168
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ports/openimageio/CONTROL
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions ports/openimageio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 8 additions & 0 deletions ports/openimageio/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -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})

0 comments on commit 743e168

Please sign in to comment.