From 721de0cbbc837c3fb7152192799c50092ed5abb8 Mon Sep 17 00:00:00 2001 From: kiwixz Date: Thu, 7 Feb 2019 21:19:10 +0000 Subject: [PATCH] [tinyfiledialogs] upgrade to 3.3.8 and export cmake config (#5294) * [tinyfiledialogs] export cmake config * [tinyfiledialogs] upgrade to 3.3.8 --- ports/tinyfiledialogs/CMakeLists.txt | 22 +++++++++++++++++++--- ports/tinyfiledialogs/CONTROL | 2 +- ports/tinyfiledialogs/portfile.cmake | 15 ++++++--------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/ports/tinyfiledialogs/CMakeLists.txt b/ports/tinyfiledialogs/CMakeLists.txt index 4adabaf9a5..34940b79d2 100644 --- a/ports/tinyfiledialogs/CMakeLists.txt +++ b/ports/tinyfiledialogs/CMakeLists.txt @@ -5,7 +5,23 @@ add_library(tinyfiledialogs tinyfiledialogs.c) install( TARGETS tinyfiledialogs - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin + EXPORT tinyfiledialogsConfig + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" +) +install( + FILES tinyfiledialogs.h + DESTINATION "${CMAKE_INSTALL_PREFIX}/include/tinyfiledialogs" +) + +export( + TARGETS tinyfiledialogs + NAMESPACE tinyfiledialogs:: + FILE "${CMAKE_CURRENT_BINARY_DIR}/tinyfiledialogsConfig.cmake" +) +install( + EXPORT tinyfiledialogsConfig + NAMESPACE tinyfiledialogs:: + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/tinyfiledialogs" ) diff --git a/ports/tinyfiledialogs/CONTROL b/ports/tinyfiledialogs/CONTROL index bb3a2ff33b..485cc43512 100644 --- a/ports/tinyfiledialogs/CONTROL +++ b/ports/tinyfiledialogs/CONTROL @@ -1,3 +1,3 @@ Source: tinyfiledialogs -Version: 3.3.7-1 +Version: 3.3.8 Description: Highly portable and cross-platform dialogs for native inputbox, passwordbox, colorpicker and more diff --git a/ports/tinyfiledialogs/portfile.cmake b/ports/tinyfiledialogs/portfile.cmake index 66f1735a88..73fd52d918 100644 --- a/ports/tinyfiledialogs/portfile.cmake +++ b/ports/tinyfiledialogs/portfile.cmake @@ -2,21 +2,20 @@ include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SHA 03d35a86696859128d41f8b967c1ef3e39c980ce) +set(SHA 21998464c84ddaa9f911d8d05378d6f23a3a3671) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SHA}) vcpkg_download_distfile(HEADERFILE URLS "https://sourceforge.net/p/tinyfiledialogs/code/ci/${SHA}/tree/tinyfiledialogs.h?format=raw" FILENAME "tinyfiledialogs-h-${SHA}" - SHA512 e3503165bcbb665c2f09c19591f28eba63e50b8d20fd4e65f31ec6a33742879c007aa7402cfd429ff92a2847534f0f0cc1b979954372be0c6578d49ed5f3e18d + SHA512 3f15192e2e2ba674308330eca88f5f2430980b93a53389125fab4de0fce775b9a0e2a0464a3a69bd86e362715c866504e752bfea402f1072005f6da3c97316d8 ) vcpkg_download_distfile(SOURCEFILE URLS "https://sourceforge.net/p/tinyfiledialogs/code/ci/${SHA}/tree/tinyfiledialogs.c?format=raw" FILENAME "tinyfiledialogs-c-${SHA}" - SHA512 263a9fcd11af3dcfd3cd7b6cfaad216cfdd94925639e613d43e7a2dbae2b4387fe8182cd72401e19b2891a08809bc68caece341df28e91b5894cc4b9ecd157f4 + SHA512 b03260ba84872b3cf4eae2fed3a1770480021e3d4109f5ef243a433da48e443b7f244b105a16ce9d5655e086774d9098628e56b1559a6862fb5add547210ca58 ) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SHA}) - configure_file(${HEADERFILE} ${SOURCE_PATH}/tinyfiledialogs.h COPYONLY) configure_file(${SOURCEFILE} ${SOURCE_PATH}/tinyfiledialogs.c COPYONLY) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -25,13 +24,11 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA ) - vcpkg_install_cmake() -vcpkg_copy_pdbs() -configure_file(${HEADERFILE} ${CURRENT_PACKAGES_DIR}/include/tinyfiledialogs.h COPYONLY) +vcpkg_fixup_cmake_targets() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/tinyfiledialogs) file(READ ${HEADERFILE} _contents) string(SUBSTRING "${_contents}" 0 1024 _contents) file(WRITE ${CURRENT_PACKAGES_DIR}/share/tinyfiledialogs/copyright "${_contents}")