diff options
| author | Andre Weissflog <floooh@gmail.com> | 2026-01-19 18:13:34 +0100 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2026-01-19 18:13:34 +0100 |
| commit | 1f2f9479807a841389254325abdca0dae04c524c (patch) | |
| tree | 93d261550a797a7cddaf2e6b2e723dd6576a9165 | |
| parent | 876d0ff9f829dc3da953eef6932942101dc73136 (diff) | |
tests: add windows+vulkan to test compilation
| -rw-r--r-- | tests/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | tests/CMakePresets.json | 32 | ||||
| -rw-r--r-- | tests/test_win.cmd | 4 |
3 files changed, 43 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 084900cd..69133da5 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -117,6 +117,9 @@ elseif (OSX_MACOS) endif() elseif (WINDOWS) set(exe_type WIN32) + if (SOKOL_BACKEND STREQUAL SOKOL_VULKAN) + set(system_libs ${system_libs} vulkan-1) + endif() endif() macro(configure_common target) @@ -128,6 +131,10 @@ macro(configure_common target) target_link_libraries(${target} PRIVATE ${system_libs}) target_include_directories(${target} PRIVATE ../.. ../../util) target_include_directories(${target} PRIVATE ../ext) + if (WINDOWS AND SOKOL_BACKEND STREQUAL SOKOL_VULKAN) + target_include_directories(${target} PUBLIC $ENV{VULKAN_SDK}/Include) + target_link_directories(${target} PUBLIC $ENV{VULKAN_SDK}/Lib) + endif() endmacro() macro(configure_osx_properties target) diff --git a/tests/CMakePresets.json b/tests/CMakePresets.json index d8a41850..2f9a64c7 100644 --- a/tests/CMakePresets.json +++ b/tests/CMakePresets.json @@ -468,6 +468,28 @@ } }, { + "name": "win_vk", + "binaryDir": "build/win_vk", + "cacheVariables": { + "SOKOL_BACKEND": "SOKOL_VULKAN" + } + }, + { + "name": "win_vk_analyze", + "generator": "Ninja", + "binaryDir": "build/win_vk_analyze", + "cacheVariables": { + "SOKOL_BACKEND": "SOKOL_VULKAN", + "CMAKE_BUILD_TYPE": "Debug", + "USE_ANALYZER": { + "type": "BOOL", + "value": "ON" + }, + "CMAKE_C_COMPILER": "clang", + "CMAKE_CXX_COMPILER": "clang++" + } + }, + { "name": "win_gl", "binaryDir": "build/win_gl", "cacheVariables": { @@ -694,6 +716,16 @@ "configurePreset": "android_release" }, { + "name": "win_vk_debug", + "configurePreset": "win_vk", + "configuration": "Debug" + }, + { + "name": "win_vk_release", + "configurePreset": "win_vk", + "configuration": "Release" + }, + { "name": "win_gl_debug", "configurePreset": "win_gl", "configuration": "Debug" diff --git a/tests/test_win.cmd b/tests/test_win.cmd index d4c16a7e..91691773 100644 --- a/tests/test_win.cmd +++ b/tests/test_win.cmd @@ -1,3 +1,7 @@ +cmake --preset win_vk || exit /b 10 +cmake --build --preset win_vk_debug || exit /b 10 +cmake --build --preset win_vk_release || exit /b 10 + cmake --preset win_gl || exit /b 10 cmake --build --preset win_gl_debug || exit /b 10 cmake --build --preset win_gl_release || exit /b 10 |