Skip to content

Commit

Permalink
Support MinGW in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHelmut committed Mar 23, 2024
1 parent f1ba08c commit 8a46d0b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/cmake/packaging/Windows.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Use main entry for Windows GUI app.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /subsystem:windows /entry:mainCRTStartup")
if (MINGW)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-subsystem,windows")
# Static link MinGW standard libraries
set(CMAKE_CXX_STANDARD_LIBRARIES
"-static-libgcc -static-libstdc++ -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive")
else ()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /subsystem:windows /entry:mainCRTStartup")
endif ()

# Copy .dll files on Windows to the target App build folder.
# For development:
Expand Down

0 comments on commit 8a46d0b

Please sign in to comment.