[mzying2001-sw] add test port (#48063)

This commit is contained in:
Saikari 2025-11-03 22:49:17 +03:00 committed by GitHub
parent 012f571749
commit d84a08d894
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,5 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
vcpkg_cmake_configure(
SOURCE_PATH "${CURRENT_PORT_DIR}/project"
)
vcpkg_cmake_build()

View File

@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.25.1)
project(mzying2001-sw-test LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(sw CONFIG REQUIRED)
add_executable(main main.cpp)
target_link_libraries(main PRIVATE sw::sw)

View File

@ -0,0 +1,13 @@
#include <sw/SimpleWindow.h>
int main()
{
sw::Window wnd;
sw::Button btn;
wnd.SetLayout<sw::FillLayout>();
btn.AddHandler(sw::ButtonBase_Clicked,
[](sw::UIElement& sender, sw::RoutedEventArgs& e) {
sw::MsgBox::Show(L"Hello, SimpleWindow!");
});
wnd.AddChild(btn);
return 0;
}

View File

@ -0,0 +1,12 @@
{
"name": "vcpkg-ci-mzying2001-sw",
"version-string": "ci",
"description": "Validates mzying2001-sw",
"dependencies": [
"mzying2001-sw",
{
"name": "vcpkg-cmake",
"host": true
}
]
}