Skip to content

Commit

Permalink
Windows: create a GUI application, not Console
Browse files Browse the repository at this point in the history
This prevents an empty console to be opened when we launch this program
from Windows Explorer.
  • Loading branch information
certik committed Sep 17, 2024
1 parent dc9b79e commit 26bd77d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/cpp-sdl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 26bd77d

Please sign in to comment.