From 14116bc279f62e9afb3fe4d02df44844f2a25160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Wed, 18 Sep 2024 00:20:28 -0600 Subject: [PATCH] fix: create a GUI application on Windows, not Console (#2067) --- examples/cpp-sdl/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/cpp-sdl/CMakeLists.txt b/examples/cpp-sdl/CMakeLists.txt index be853b368..c5f4f956c 100644 --- a/examples/cpp-sdl/CMakeLists.txt +++ b/examples/cpp-sdl/CMakeLists.txt @@ -7,6 +7,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") add_executable(${PROJECT_NAME} src/main.cc) +if (MSVC) + set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE TRUE) +endif() + target_link_libraries( ${PROJECT_NAME} PRIVATE SDL2::SDL2