aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey <andrey@jfhs.me>2021-07-16 20:57:20 +0200
committerGitHub <noreply@github.com>2021-07-16 11:57:20 -0700
commit5236efaa9d3bfe1f5d73ebc7d3404ac2b2bf9cef (patch)
treefb20dd7e0464c9611bc84988a42c19845fdd5edc
parent04658e4cc48b4a52d1e41674198425395a5003c6 (diff)
downloadvcpkg-5236efaa9d3bfe1f5d73ebc7d3404ac2b2bf9cef.tar.gz
vcpkg-5236efaa9d3bfe1f5d73ebc7d3404ac2b2bf9cef.zip
Fix nativefiledialog port using build time include dir (#18923)
* 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>
-rw-r--r--ports/nativefiledialog/CMakeLists.txt15
-rw-r--r--ports/nativefiledialog/CONTROL8
-rw-r--r--ports/nativefiledialog/portfile.cmake8
-rw-r--r--ports/nativefiledialog/vcpkg.json23
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/n-/nativefiledialog.json5
6 files changed, 41 insertions, 20 deletions
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(
$<$<C_COMPILER_ID:MSVC>:_CRT_SECURE_NO_WARNINGS>
)
-target_include_directories(
- nfd
- PUBLIC
+target_include_directories(nfd PRIVATE
$<BUILD_INTERFACE:
- ${CMAKE_CURRENT_LIST_DIR}/src
- ${CMAKE_CURRENT_LIST_DIR}/src/include
- >
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
-)
+ ${CMAKE_CURRENT_LIST_DIR}/src
+ ${CMAKE_CURRENT_LIST_DIR}/src/include
+ >)
+
+target_include_directories(nfd INTERFACE
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
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,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "d765a8f84ba49c18701f68b7471f1b93b7313ddc",
+ "version-date": "2019-08-28",
+ "port-version": 1
+ },
+ {
"git-tree": "b2e484cc447978109bcd69b2fa61920b2059d0f9",
"version-string": "2019-08-28",
"port-version": 0