Skip to content

Commit 597ec7a

Browse files
author
Gabriel Løsnesløkken
committed
Possible to open .exe file directly
1 parent fdb42dc commit 597ec7a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,10 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/Dependencies/SFML/ DESTINATION ${CMAKE_BINAR
8383
# Automatically copy Asset folder into executable build/assets folder
8484
add_custom_target(copy_assets COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/Assets ${CMAKE_BINARY_DIR}/Assets)
8585

86-
add_dependencies(TetrisExam copy_assets)
86+
add_dependencies(TetrisExam copy_assets)
87+
88+
# Link everything statically into the exe
89+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++ -static")
90+
91+
# Remove terminal window
92+
set(CMAKE_EXE_LINKER_FLAGS "-mwindows")

0 commit comments

Comments
 (0)