From 5236efaa9d3bfe1f5d73ebc7d3404ac2b2bf9cef Mon Sep 17 00:00:00 2001 From: Andrey Date: Fri, 16 Jul 2021 20:57:20 +0200 Subject: Fix nativefiledialog port using build time include dir (#18923) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix nativefiledialog port using build time include dir * Update ports/nativefiledialog/vcpkg.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/nativefiledialog/vcpkg.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update versions/n-/nativefiledialog.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update versions/baseline.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update tree hash * Update versions/n-/nativefiledialog.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> --- ports/nativefiledialog/CMakeLists.txt | 15 +++++++-------- ports/nativefiledialog/CONTROL | 8 -------- ports/nativefiledialog/portfile.cmake | 8 +++++--- ports/nativefiledialog/vcpkg.json | 23 +++++++++++++++++++++++ versions/baseline.json | 2 +- versions/n-/nativefiledialog.json | 5 +++++ 6 files changed, 41 insertions(+), 20 deletions(-) delete mode 100644 ports/nativefiledialog/CONTROL create mode 100644 ports/nativefiledialog/vcpkg.json diff --git a/ports/nativefiledialog/CMakeLists.txt b/ports/nativefiledialog/CMakeLists.txt index 8f5b79dfb..30c9814b1 100644 --- a/ports/nativefiledialog/CMakeLists.txt +++ b/ports/nativefiledialog/CMakeLists.txt @@ -45,15 +45,14 @@ target_compile_definitions( $<$:_CRT_SECURE_NO_WARNINGS> ) -target_include_directories( - nfd - PUBLIC +target_include_directories(nfd PRIVATE $ - $ -) + ${CMAKE_CURRENT_LIST_DIR}/src + ${CMAKE_CURRENT_LIST_DIR}/src/include + >) + +target_include_directories(nfd INTERFACE + $) if (GTK3_FOUND) target_include_directories(nfd PUBLIC ${GTK3_INCLUDE_DIRS}) diff --git a/ports/nativefiledialog/CONTROL b/ports/nativefiledialog/CONTROL deleted file mode 100644 index afe283577..000000000 --- a/ports/nativefiledialog/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: nativefiledialog -Version: 2019-08-28 -Description: A tiny, neat C library that portably invokes native file open and save dialogs -Homepage: https://github.com/mlabbe/nativefiledialog -Supports: !uwp - -Feature: zenity -Description: Using Zenity backend on Linux diff --git a/ports/nativefiledialog/portfile.cmake b/ports/nativefiledialog/portfile.cmake index f0f8762be..c31caab40 100644 --- a/ports/nativefiledialog/portfile.cmake +++ b/ports/nativefiledialog/portfile.cmake @@ -19,18 +19,20 @@ vcpkg_check_features( INVERTED_FEATURES "zenity" NFD_GTK_BACKEND ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT} CONFIG_PATH share/unofficial-${PORT}) +vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/nativefiledialog/vcpkg.json b/ports/nativefiledialog/vcpkg.json new file mode 100644 index 000000000..a9fb97379 --- /dev/null +++ b/ports/nativefiledialog/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "nativefiledialog", + "version-date": "2019-08-28", + "port-version": 1, + "description": "A tiny, neat C library that portably invokes native file open and save dialogs", + "homepage": "https://github.com/mlabbe/nativefiledialog", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "zenity": { + "description": "Using Zenity backend on Linux" + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 9a3c6efaa..573e31559 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4294,7 +4294,7 @@ }, "nativefiledialog": { "baseline": "2019-08-28", - "port-version": 0 + "port-version": 1 }, "nccl": { "baseline": "2.4.6", diff --git a/versions/n-/nativefiledialog.json b/versions/n-/nativefiledialog.json index 2a73212d1..29df598c1 100644 --- a/versions/n-/nativefiledialog.json +++ b/versions/n-/nativefiledialog.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d765a8f84ba49c18701f68b7471f1b93b7313ddc", + "version-date": "2019-08-28", + "port-version": 1 + }, { "git-tree": "b2e484cc447978109bcd69b2fa61920b2059d0f9", "version-string": "2019-08-28", -- cgit v1.2.3