Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nativefiledialog port using build time include dir #18923

Merged
merged 7 commits into from
Jul 16, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions ports/nativefiledialog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
8 changes: 0 additions & 8 deletions ports/nativefiledialog/CONTROL

This file was deleted.

8 changes: 5 additions & 3 deletions ports/nativefiledialog/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
23 changes: 23 additions & 0 deletions ports/nativefiledialog/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "nativefiledialog",
"version-string": "2019-08-28",
jfhs marked this conversation as resolved.
Show resolved Hide resolved
"port-version": 2,
jfhs marked this conversation as resolved.
Show resolved Hide resolved
"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"
}
}
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4286,7 +4286,7 @@
},
"nativefiledialog": {
"baseline": "2019-08-28",
"port-version": 0
"port-version": 2
jfhs marked this conversation as resolved.
Show resolved Hide resolved
},
"nccl": {
"baseline": "2.4.6",
Expand Down
10 changes: 10 additions & 0 deletions versions/n-/nativefiledialog.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"versions": [
{
"git-tree": "bcb4c6b297cce40942c05838842ddf0b40b78811",
"version-string": "2019-08-28",
"port-version": 2
},
jfhs marked this conversation as resolved.
Show resolved Hide resolved
{
"git-tree": "03f4dfbad900edcd63e45f26139483495f0c4efb",
"version-string": "2019-08-28",
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
"port-version": 1
},
{
"git-tree": "b2e484cc447978109bcd69b2fa61920b2059d0f9",
"version-string": "2019-08-28",
Expand Down