mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 04:43:02 +08:00
[tinyexr] update to 1.0.1 and fix compiling with clang on android (#28670)
* tinyexr: Update to 1.0.1 and add miniz dep * tinyexr: fix android build Prevent clang warnings from erroring out the build
This commit is contained in:
parent
6aacba2d7d
commit
b6d9a1e6f8
@ -1,5 +1,5 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3613642..93fb6c1 100644
|
||||
index 6d03e7e..be416f5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -7,6 +7,20 @@ set(SAMPLE_TARGET "test_tinyexr")
|
||||
@ -22,8 +22,31 @@ index 3613642..93fb6c1 100644
|
||||
+
|
||||
# options
|
||||
option(TINYEXR_BUILD_SAMPLE "Build a sample" ON)
|
||||
option(TINYEXR_USE_MINIZ "Use miniz" ON)
|
||||
@@ -28,11 +42,8 @@ set(TINYEXR_SOURCES
|
||||
)
|
||||
|
||||
@@ -60,3 +74,20 @@ if (TINYEXR_BUILD_SAMPLE)
|
||||
if(TINYEXR_USE_MINIZ)
|
||||
- enable_language(C)
|
||||
- add_library(miniz STATIC deps/miniz/miniz.c)
|
||||
- target_include_directories(miniz PUBLIC deps/miniz)
|
||||
- set_target_properties(miniz PROPERTIES FOLDER "deps")
|
||||
- list(APPEND TINYEXR_EXT_LIBRARIES miniz)
|
||||
+ find_package(miniz CONFIG REQUIRED)
|
||||
+ list(APPEND TINYEXR_EXT_LIBRARIES miniz::miniz)
|
||||
endif()
|
||||
|
||||
add_library(${BUILD_TARGET} ${TINYEXR_SOURCES} ${TINYEXR_DEP_SOURCES})
|
||||
@@ -43,7 +54,7 @@ target_link_libraries(${BUILD_TARGET} ${TINYEXR_EXT_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
|
||||
# Increase warning level for clang.
|
||||
IF (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
- set_source_files_properties(${TINYEXR_SOURCES} PROPERTIES COMPILE_FLAGS "-Weverything -Werror -Wno-padded -Wno-c++98-compat-pedantic -Wno-documentation -Wno-unused-member-function")
|
||||
+ set_source_files_properties(${TINYEXR_SOURCES} PROPERTIES COMPILE_FLAGS "-Weverything -Wno-padded -Wno-c++98-compat-pedantic -Wno-documentation -Wno-unused-member-function")
|
||||
ENDIF ()
|
||||
|
||||
if (TINYEXR_BUILD_SAMPLE)
|
||||
@@ -72,3 +83,32 @@ if (TINYEXR_BUILD_SAMPLE)
|
||||
endif(WIN32)
|
||||
|
||||
endif (TINYEXR_BUILD_SAMPLE)
|
||||
@ -40,7 +63,31 @@ index 3613642..93fb6c1 100644
|
||||
+)
|
||||
+
|
||||
+install(EXPORT ${BUILD_TARGET}Targets
|
||||
+ FILE ${BUILD_TARGET}Config.cmake
|
||||
+ FILE ${BUILD_TARGET}Targets.cmake
|
||||
+ NAMESPACE unofficial::${BUILD_TARGET}::
|
||||
+ DESTINATION "${INSTALL_CMAKE_DIR}"
|
||||
+)
|
||||
+
|
||||
+include(CMakePackageConfigHelpers)
|
||||
+configure_package_config_file(
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/${BUILD_TARGET}Config.cmake
|
||||
+ INSTALL_DESTINATION "${INSTALL_CMAKE_DIR}"
|
||||
+)
|
||||
+
|
||||
+install(
|
||||
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/${BUILD_TARGET}Config.cmake
|
||||
+ DESTINATION "${INSTALL_CMAKE_DIR}"
|
||||
+)
|
||||
diff --git a/Config.cmake.in b/Config.cmake.in
|
||||
new file mode 100644
|
||||
index 0000000..2e33c1d
|
||||
--- /dev/null
|
||||
+++ b/Config.cmake.in
|
||||
@@ -0,0 +1,6 @@
|
||||
+@PACKAGE_INIT@
|
||||
+
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(miniz CONFIG REQUIRED)
|
||||
+
|
||||
+include("${CMAKE_CURRENT_LIST_DIR}/@BUILD_TARGET@Targets.cmake")
|
||||
|
@ -3,21 +3,20 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO syoyo/tinyexr
|
||||
REF v1.0.0
|
||||
SHA512 5c7dc7201ea57d98505ece22161dc72c284b3db1a7993e46317254dfc42b0f0e76a59227c3cc601fd8a347f0d3aedf2e5f7d7eb9434068face94f503b94711fd
|
||||
REF v1.0.1
|
||||
SHA512 ba3bc09e7c2a93016b260849eb365a05fe1113c55f824767a19a20e3a6ff2a09dd686aa15094dd6c4508e68915dc8eb4a0ccc9778de73d9b55354701e7820e76
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fixtargets.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DTINYEXR_BUILD_SAMPLE=OFF
|
||||
)
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets()
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,7 +1,18 @@
|
||||
{
|
||||
"name": "tinyexr",
|
||||
"version-string": "1.0.0",
|
||||
"port-version": 1,
|
||||
"version": "1.0.1",
|
||||
"description": "Library to load and save OpenEXR(.exr) images",
|
||||
"homepage": "https://github.com/syoyo/tinyexr"
|
||||
"homepage": "https://github.com/syoyo/tinyexr",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": [
|
||||
"miniz",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -7537,8 +7537,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"tinyexr": {
|
||||
"baseline": "1.0.0",
|
||||
"port-version": 1
|
||||
"baseline": "1.0.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"tinyfiledialogs": {
|
||||
"baseline": "3.8.8",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "d0381d495cb1b502e1b5ccaafb2409f75c0726a3",
|
||||
"version": "1.0.1",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "81548356751317d12ff579d7c7749d073e5d0fb6",
|
||||
"version-string": "1.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user