diff options
| author | Francisco Facioni <francisco@remyrobotics.com> | 2021-04-29 01:38:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-28 17:38:07 -0700 |
| commit | 5014989b543c07ef78377a80885c527f83e7f441 (patch) | |
| tree | 1f0a3e2721bfc0b83d27bed798312144ad9e11e5 | |
| parent | 47c63128dd463b206906598b1707556152d8b7da (diff) | |
| download | vcpkg-5014989b543c07ef78377a80885c527f83e7f441.tar.gz vcpkg-5014989b543c07ef78377a80885c527f83e7f441.zip | |
[tinyexr] update version and add targets (#17360)
* [tinyexr] upgrade to 1.0.0 and add targets
* [tinyexr] Disable building sample
Co-authored-by: Stefano Sinigardi <stesinigardi@hotmail.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
| -rw-r--r-- | ports/tinyexr/CONTROL | 2 | ||||
| -rw-r--r-- | ports/tinyexr/copyright | 5 | ||||
| -rw-r--r-- | ports/tinyexr/fixtargets.patch | 46 | ||||
| -rw-r--r-- | ports/tinyexr/portfile.cmake | 19 | ||||
| -rw-r--r-- | versions/baseline.json | 2 | ||||
| -rw-r--r-- | versions/t-/tinyexr.json | 5 |
6 files changed, 68 insertions, 11 deletions
diff --git a/ports/tinyexr/CONTROL b/ports/tinyexr/CONTROL index bd3f25fb6..c2be25a5f 100644 --- a/ports/tinyexr/CONTROL +++ b/ports/tinyexr/CONTROL @@ -1,4 +1,4 @@ Source: tinyexr
-Version: 2020-03-15
+Version: 1.0.0
Homepage: https://github.com/syoyo/tinyexr
Description: Library to load and save OpenEXR(.exr) images
diff --git a/ports/tinyexr/copyright b/ports/tinyexr/copyright deleted file mode 100644 index 975a80794..000000000 --- a/ports/tinyexr/copyright +++ /dev/null @@ -1,5 +0,0 @@ -3-clause BSD - -tinyexr uses miniz, which is developed by Rich Geldreich richgel99@gmail.com, and licensed under public domain. - -tinyexr tools uses stb, which is licensed under public domain: https://github.com/nothings/stb tinyexr uses some code from OpenEXR, which is licensed under 3-clause BSD license.
\ No newline at end of file diff --git a/ports/tinyexr/fixtargets.patch b/ports/tinyexr/fixtargets.patch new file mode 100644 index 000000000..e06f1831e --- /dev/null +++ b/ports/tinyexr/fixtargets.patch @@ -0,0 +1,46 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3613642..93fb6c1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,6 +7,20 @@ set(SAMPLE_TARGET "test_tinyexr") + + project(${BUILD_TARGET} CXX) + ++set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") ++set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") ++set(INSTALL_INCLUDE_DIR "include" CACHE PATH "Path where headers will be installed") ++set(INSTALL_CMAKE_DIR "share/tinyexr" CACHE PATH "Path where cmake configs will be installed") ++ ++# Make relative paths absolute (needed later on) ++set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) ++foreach(p LIB BIN INCLUDE CMAKE) ++ set(var INSTALL_${p}_DIR) ++ if(NOT IS_ABSOLUTE "${${var}}") ++ set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") ++ endif() ++endforeach() ++ + # options + option(TINYEXR_BUILD_SAMPLE "Build a sample" ON) + +@@ -60,3 +74,20 @@ if (TINYEXR_BUILD_SAMPLE) + endif(WIN32) + + endif (TINYEXR_BUILD_SAMPLE) ++ ++target_include_directories(${BUILD_TARGET} PUBLIC $<INSTALL_INTERFACE:${RELATIVE_INSTALL_INCLUDE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>) ++set_target_properties(${BUILD_TARGET} PROPERTIES PUBLIC_HEADER "${PROJECT_SOURCE_DIR}/tinyexr.h") ++ ++install(TARGETS ${BUILD_TARGET} EXPORT ${BUILD_TARGET}Targets ++ RUNTIME DESTINATION "${INSTALL_BIN_DIR}" ++ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ++ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" ++ PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}" ++ COMPONENT dev ++) ++ ++install(EXPORT ${BUILD_TARGET}Targets ++ FILE ${BUILD_TARGET}Config.cmake ++ NAMESPACE unofficial::${BUILD_TARGET}:: ++ DESTINATION "${INSTALL_CMAKE_DIR}" ++) diff --git a/ports/tinyexr/portfile.cmake b/ports/tinyexr/portfile.cmake index e8cfaf156..fe1dcce4f 100644 --- a/ports/tinyexr/portfile.cmake +++ b/ports/tinyexr/portfile.cmake @@ -1,12 +1,23 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO syoyo/tinyexr - REF fdaeecbbc1bac1a417c6af2f4dab43d3840ed036 - SHA512 0d875e197bc82dd5addb8e08e9ba1a9a02e108cc9dd14e5ea17de032cda5ad599f6d10d6c7959d545e05ab30d6daa34f98061f23faeb1c15caf96b6cb76483a3 + REF v1.0.0 + SHA512 5c7dc7201ea57d98505ece22161dc72c284b3db1a7993e46317254dfc42b0f0e76a59227c3cc601fd8a347f0d3aedf2e5f7d7eb9434068face94f503b94711fd HEAD_REF master + PATCHES + fixtargets.patch ) -file(COPY ${SOURCE_PATH}/tinyexr.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTINYEXR_BUILD_SAMPLE=OFF +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyexr) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/versions/baseline.json b/versions/baseline.json index c2fdf2137..85a257391 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6029,7 +6029,7 @@ "port-version": 0 }, "tinyexr": { - "baseline": "2020-03-15", + "baseline": "1.0.0", "port-version": 0 }, "tinyfiledialogs": { diff --git a/versions/t-/tinyexr.json b/versions/t-/tinyexr.json index 1c45ea800..4bf4a7ad0 100644 --- a/versions/t-/tinyexr.json +++ b/versions/t-/tinyexr.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "b64261d4bf58c8ec08386f29bf15aaebd52ddc8d", + "version-string": "1.0.0", + "port-version": 0 + }, + { "git-tree": "b230e702351b9e07a6128a062e21ef06957a58ef", "version-string": "2020-03-15", "port-version": 0 |
