diff options
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d2ff628..68fb5b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -304,6 +304,10 @@ if(libADLMIDI_SHARED) list(APPEND libADLMIDI_INSTALLS ADLMIDI_shared) if(WIN32) target_compile_definitions(ADLMIDI_shared PRIVATE "-DADLMIDI_BUILD_DLL") + if(CMAKE_COMPILER_IS_GNUCXX) + set_property(TARGET ADLMIDI_shared APPEND_STRING PROPERTY LINK_FLAGS " -static-libgcc -static-libstdc++") + set_property(TARGET ADLMIDI_shared APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,-Bdynamic,--no-whole-archive") + endif() endif() if(WITH_EMBEDDED_BANKS AND WITH_GENADLDATA) add_dependencies(ADLMIDI_shared gen-adldata-run) |