Skip to content

Commit 824ff7c

Browse files
committed
cmake: Mark Windows builds as WIN32_EXECUTABLE.
Otherwise you'll get a console window when you start the .exe
1 parent edb7ad8 commit 824ff7c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ if(DIRKSIMPLE_SDL)
188188
set_target_properties(dirksimple PROPERTIES LINK_FLAGS "${IPO_FLAG} -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s ASSERTIONS=0 -s EXPORTED_RUNTIME_METHODS=['addRunDependency','removeRunDependency'] -s DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=['$autoResumeAudioContext','$dynCall']")
189189
endif()
190190

191+
# This is safe to set on all platforms. Otherwise your SDL app will have a terminal window pop up with it on Windows.
192+
set_property(TARGET dirksimple PROPERTY WIN32_EXECUTABLE TRUE)
193+
191194
if(NOT DIRKSIMPLE_FORCE_BASE_DIR STREQUAL "")
192195
set_target_properties(dirksimple PROPERTIES COMPILE_DEFINITIONS "DIRKSIMPLE_FORCE_BASE_DIR=${DIRKSIMPLE_FORCE_BASE_DIR}")
193196
endif()

0 commit comments

Comments
 (0)