Skip to content

Commit

Permalink
Ensure that all post-build checks have skip policies.
Browse files Browse the repository at this point in the history
Also audit for:
* Consistently following the 'IDE error format' pointing to portfile.cmake.
* Consistently referring to the correct skip policy in the error message where applicable.
* Printing paths and other information relative to ${CURRENT_PACKAGES_DIR} or similar as appropriate.
* Debug before release.
* Don't duplicate messages when a problem happens for both debug and release.

Drive by bugfix:

    if (!build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT))
    {
        error_count += check_crt_linkage_of_libs(
            build_info, false, debug_libs, debug_lib_info.value_or_exit(VCPKG_LINE_INFO), msg_sink);
    }

was wrong; ONLY_RELEASE_CRT should mean 'these should all be release', not 'we aren't even going to look at debug'.

It is fixed to:

    error_count += check_crt_linkage_of_libs(build_info.crt_linkage,
                                              build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT),
                                              debug_libs,
                                              debug_lib_info.value_or_exit(VCPKG_LINE_INFO),
                                              msg_sink);

here.

Drive-by bugfix:
EMPTY_INCLUDE_FOLDER should not block CMAKE_HELPER_PORT from checking that the include folder is, in fact, empty.

Drive-by bugfix:
        if (!violations.empty())
        {
            msg_sink.println_warning(msgPortBugRestrictedHeaderPaths);
            print_paths(msg_sink, violations);
            msg_sink.println(msgPortBugRestrictedHeaderPaths);     // <-- duplicate!
            return LintStatus::PROBLEM_DETECTED;
        }

Drive-by bugfix:
There were duplicate checks for the lib/cmake and debug/lib/cmake directories which even printed the same message; these have been merged.

Drive-by bugfix:
The existing copyright check emitted nonsense output that included full absolute paths like:
warning: The software license must be available at ${CURRENT_PACKAGES_DIR}/share/cmdline/copyright. vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/D:/b/cmdline//LICENSE")
since at least microsoft#1116
That check has been basically rewritten to use vcpkg_install_copyright if there's only one src directory, and otherwise give up and print them all

Drive-by bugfix:
Several of the outdated CRTs didn't have the debug versions listed. Also, P was duplicated and there was no R for VC6.
  • Loading branch information
BillyONeal committed May 8, 2024
1 parent 6081c15 commit 7f59eca
Show file tree
Hide file tree
Showing 69 changed files with 2,796 additions and 807 deletions.
77 changes: 66 additions & 11 deletions azure-pipelines/e2e-assets/test-dll-port-template/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,69 @@
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/debug/test_dll.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/debug/test_dll.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/release/test_dll.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/release/test_dll.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/test.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")

file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(TOUCH "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")

if(release-only IN_LIST FEATURES AND NOT bad-release-only IN_LIST FEATURES)
set(VCPKG_BUILD_TYPE release)
endif()

if(NOT install-no-lib-release IN_LIST FEATURES AND NOT debug-only IN_LIST FEATURES)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/release/test_dll.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
endif()

if(NOT install-no-lib-debug IN_LIST FEATURES AND NOT release-only IN_LIST FEATURES)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/debug/test_dll.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
endif()

if(install-to-lib IN_LIST FEATURES)
if(NOT debug-only IN_LIST FEATURES)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/release/test_dll.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
endif()
if(NOT release-only IN_LIST FEATURES)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/debug/test_dll.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
endif()
else()
if(NOT debug-only IN_LIST FEATURES)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/release/test_dll.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
endif()
if(NOT release-only IN_LIST FEATURES)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/debug/test_dll.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
endif()

if(extra-debug IN_LIST FEATURES)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/debug/test_dll.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" RENAME "test_dll2.lib")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/debug/test_dll.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin" RENAME "test_dll2.dll")
endif()

if(extra-release IN_LIST FEATURES)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/release/test_dll.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" RENAME "test_dll2.lib")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/release/test_dll.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin" RENAME "test_dll2.dll")
endif()

if(policy-skip-architecture-check IN_LIST FEATURES)
set(VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK enabled)
endif()
if(policy-skip-appcontainer-check IN_LIST FEATURES)
set(VCPKG_POLICY_SKIP_APPCONTAINER_CHECK enabled)
endif()
if(policy-allow-dlls-in-lib IN_LIST FEATURES)
set(VCPKG_POLICY_ALLOW_DLLS_IN_LIB enabled)
endif()
if(policy-allow-kernel32-from-xbox IN_LIST FEATURES)
set(VCPKG_POLICY_ALLOW_KERNEL32_FROM_XBOX enabled)
endif()
if(policy-dlls-in-static-library IN_LIST FEATURES)
set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled)
endif()
if(policy-mismatched-number-of-binaries IN_LIST FEATURES)
set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled)
endif()
if(policy-dlls-without-libs IN_LIST FEATURES)
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
endif()
57 changes: 56 additions & 1 deletion azure-pipelines/e2e-assets/test-dll-port-template/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,59 @@
{
"name": "test-dll",
"version": "1.0.0"
"version": "1.0.0",
"features": {
"bad-release-only": {
"description": "Install only the release versions, but don't set the build type",
"dependencies": [
{
"name": "test-dll",
"features": [
"release-only"
]
}
]
},
"debug-only": {
"description": "Install only the debug versions"
},
"extra-debug": {
"description": "Install an extra debug DLL"
},
"extra-release": {
"description": "Install an extra release DLL"
},
"install-to-lib": {
"description": "Incorrectly install the DLL to lib instead of bin"
},
"install-no-lib-debug": {
"description": "Incorrectly install no import lib for debug only"
},
"install-no-lib-release": {
"description": "Incorrectly install no import lib for release only"
},
"policy-allow-dlls-in-lib": {
"description": "Turn on VCPKG_POLICY_ALLOW_DLLS_IN_LIB"
},
"policy-allow-kernel32-from-xbox": {
"description": "Turn on VCPKG_POLICY_ALLOW_KERNEL32_FROM_XBOX"
},
"policy-dlls-in-static-library": {
"description": "Turn on VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY"
},
"policy-skip-appcontainer-check": {
"description": "Turn on VCPKG_POLICY_SKIP_APPCONTAINER_CHECK"
},
"policy-skip-architecture-check": {
"description": "Turn on VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK"
},
"policy-mismatched-number-of-binaries": {
"description": "Turn on VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES"
},
"policy-dlls-without-libs": {
"description": "Turn on VCPKG_POLICY_DLLS_WITHOUT_LIBS"
},
"release-only": {
"description": "Install only the release versions"
}
}
}
4 changes: 4 additions & 0 deletions azure-pipelines/e2e-assets/test-exe-port-template/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mkdir "%~dp0debug"
mkdir "%~dp0release"
cl /MDd "%~dp0test.c" /Fo"%~dp0debug\test.obj" /Fe"%~dp0debug\test_exe.exe"
cl /MD "%~dp0test.c" /Fo"%~dp0release\test.obj" /Fe"%~dp0release\test_exe.exe"
17 changes: 17 additions & 0 deletions azure-pipelines/e2e-assets/test-exe-port-template/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(TOUCH "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")

if(release-only IN_LIST FEATURES)
set(VCPKG_BUILD_TYPE release)
else()
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/debug/test_exe.exe" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()

file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/release/test_exe.exe" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")

if(policy-allow-exes-in-bin IN_LIST FEATURES)
set(VCPKG_POLICY_ALLOW_EXES_IN_BIN enabled)
endif()
7 changes: 7 additions & 0 deletions azure-pipelines/e2e-assets/test-exe-port-template/test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <stdio.h>

int main()
{
puts("hello world");
return 0;
}
12 changes: 12 additions & 0 deletions azure-pipelines/e2e-assets/test-exe-port-template/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "test-exe",
"version": "1.0.0",
"features": {
"release-only": {
"description": "Only install release binaries"
},
"policy-allow-exes-in-bin": {
"description": "Turn on VCPKG_POLICY_ALLOW_EXES_IN_BIN"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdir "%~dp0debug"
mkdir "%~dp0release"
cl /c /DNDEBUG /MD "%~dp0test.c" /Fo"%~dp0debug\test.obj"
lib "%~dp0debug\test.obj" /OUT:"%~dp0debug\test_lib.lib"
cl /c /DNDEBUG /MD "%~dp0test.c" /Fo"%~dp0release\test.obj"
lib "%~dp0release\test.obj" /OUT:"%~dp0release\test_lib.lib"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/debug/test_lib.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/release/test_lib.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/test.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(TOUCH "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
if (policy-skip-crt-linkage-check IN_LIST FEATURES)
set(VCPKG_POLICY_SKIP_CRT_LINKAGE_CHECK enabled)
endif()
if (policy-only-release-crt IN_LIST FEATURES)
set(VCPKG_POLICY_ONLY_RELEASE_CRT enabled)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <stdio.h>

int __cdecl test_fn() {
puts("You called the static lib function!");
return 42;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int __cdecl test_fn();
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "test-lib",
"version": "1.0.0",
"features": {
"policy-skip-crt-linkage-check": {
"description": "Turn on VCPKG_POLICY_SKIP_CRT_LINKAGE_CHECK"
},
"policy-only-release-crt": {
"description": "Turn on VCPKG_POLICY_ONLY_RELEASE_CRT"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ file(COPY "${CMAKE_CURRENT_LIST_DIR}/release/test_lib.lib" DESTINATION "${CURREN
file(COPY "${CMAKE_CURRENT_LIST_DIR}/both/both_lib.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/test.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(TOUCH "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
if (policy-skip-crt-linkage-check IN_LIST FEATURES)
set(VCPKG_POLICY_SKIP_CRT_LINKAGE_CHECK enabled)
endif()
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"name": "test-lib",
"version": "1.0.0"
"version": "1.0.0",
"features": {
"policy-skip-crt-linkage-check": {
"description": "Turn on VCPKG_POLICY_SKIP_CRT_LINKAGE_CHECK"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/lib"
"${CURRENT_PACKAGES_DIR}/lib")
file(TOUCH "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
if(policy IN_LIST FEATURES)
set(VCPKG_POLICY_DLLS_WITHOUT_EXPORTS enabled)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"name": "vcpkg-cmake",
"host": true
}
]
],
"features": {
"policy": {
"description": "Turn on VCPKG_POLICY_DLLS_WITHOUT_EXPORTS"
}
}
}
5 changes: 5 additions & 0 deletions azure-pipelines/e2e-ports/vcpkg-msvc-2013/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:: This must be run from a Visual Studio 2013 command prompt
mkdir "%~dp0debug"
mkdir "%~dp0release"
cl /MDd "%~dp0test.c" "%~dp0test.def" /Fo"%~dp0debug\test.obj" /Fe"%~dp0debug\test_dll.dll" /link /DLL
cl /MD "%~dp0test.c" "%~dp0test.def" /Fo"%~dp0release\test.obj" /Fe"%~dp0release\test_dll.dll" /link /DLL
Binary file not shown.
Binary file not shown.
23 changes: 23 additions & 0 deletions azure-pipelines/e2e-ports/vcpkg-msvc-2013/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "MIT License.")

file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include/vcpkg-msvc-2013")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/test.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vcpkg-msvc-2013")

if(release-only IN_LIST FEATURES)
set(VCPKG_BUILD_TYPE "release")
else()
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/debug/test_dll.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/debug/test_dll.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
endif()

file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/release/test_dll.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/release/test_dll.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")

if(policy IN_LIST FEATURES)
set(VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT enabled)
endif()
Binary file not shown.
Binary file not shown.
17 changes: 17 additions & 0 deletions azure-pipelines/e2e-ports/vcpkg-msvc-2013/test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <windows.h>
#include <stdio.h>

BOOLEAN WINAPI DllMain(HINSTANCE hDllHandle, DWORD nReason, LPVOID Reserved)
{
(void)Reserved;
if (nReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls( hDllHandle );
}

return TRUE;
}

int __cdecl export_me() {
puts("You called the exported function!");
return 42;
}
4 changes: 4 additions & 0 deletions azure-pipelines/e2e-ports/vcpkg-msvc-2013/test.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
LIBRARY test_dll

EXPORTS
export_me
1 change: 1 addition & 0 deletions azure-pipelines/e2e-ports/vcpkg-msvc-2013/test.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// empty test header
12 changes: 12 additions & 0 deletions azure-pipelines/e2e-ports/vcpkg-msvc-2013/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "vcpkg-msvc-2013",
"version": "1",
"features": {
"policy": {
"description": "Set VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT"
},
"release-only": {
"description": "Only install the release DLL"
}
}
}
26 changes: 26 additions & 0 deletions azure-pipelines/e2e-ports/vcpkg-policy-copyright/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)

if(copyright-directory IN_LIST FEATURES)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright/LICENSE.txt" "this is some license text")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright/COPYING" "this is some different license text")
else()
# Intentionally do not create "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright"
endif()

if(source IN_LIST FEATURES)
set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/v1.16.3-6f5be3c3eb.clean")
file(MAKE_DIRECTORY "${SOURCE_PATH}")
file(WRITE "${SOURCE_PATH}/LICENSE.txt" "this is some license text")
endif()

if(source2 IN_LIST FEATURES)
set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/v1.3.1-2e5db616bf.clean")
file(MAKE_DIRECTORY "${SOURCE_PATH}")
file(WRITE "${SOURCE_PATH}/LICENSE.txt" "this is some license text")
file(WRITE "${SOURCE_PATH}/COPYING" "this is some different license text")
endif()

if (policy IN_LIST FEATURES)
set(VCPKG_POLICY_SKIP_COPYRIGHT_CHECK enabled)
endif()
18 changes: 18 additions & 0 deletions azure-pipelines/e2e-ports/vcpkg-policy-copyright/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "vcpkg-policy-copyright",
"version": "1",
"features": {
"policy": {
"description": "enable VCPKG_POLICY_SKIP_COPYRIGHT_CHECK"
},
"source": {
"description": "Create a source so that ${SOURCE_PATH} can be assumed to work"
},
"source2": {
"description": "Create another source so that ${SOURCE_PATH} can't be assumed to work"
},
"copyright-directory": {
"description": "create ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright as a directory"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "this is some license text")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/empty-directory")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/root/empty-inner-directory")
if (policy IN_LIST FEATURES)
set(VCPKG_POLICY_ALLOW_EMPTY_FOLDERS enabled)
endif()
Loading

0 comments on commit 7f59eca

Please sign in to comment.