Merge PR #4429: FIX(client): define and export "MumbleMain" also in debug builds

This commit is contained in:
Davide Beatrici 2020-08-18 08:08:34 +02:00 committed by GitHub
commit 43975f3a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -246,6 +246,8 @@ set(MUMBLE_SOURCES
if(static AND WIN32)
# On Windows, building a static client means building the main app into a DLL.
add_library(mumble SHARED ${MUMBLE_SOURCES})
add_compile_definitions(mumble PRIVATE "MUMBLEAPP_DLL")
set_target_properties(mumble PROPERTIES OUTPUT_NAME "mumble_app")
if(MINGW)
# Remove "lib" prefix.

View File

@ -76,7 +76,7 @@ extern int os_early_init();
extern HWND mumble_mw_hwnd;
#endif // Q_OS_WIN
#if defined(Q_OS_WIN) && !defined(QT_NO_DEBUG)
#if defined(Q_OS_WIN) && !defined(MUMBLEAPP_DLL)
extern "C" __declspec(dllexport) int main(int argc, char **argv) {
#else
int main(int argc, char **argv) {
@ -759,7 +759,7 @@ int main(int argc, char **argv) {
return res;
}
#if defined(Q_OS_WIN) && defined(QT_NO_DEBUG)
#if defined(Q_OS_WIN) && defined(MUMBLEAPP_DLL)
extern "C" __declspec(dllexport) int MumbleMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdArg, int cmdShow) {
Q_UNUSED(instance)
Q_UNUSED(prevInstance)