diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-11-03 14:36:23 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-11-03 14:36:23 +0100 |
commit | df3cc42631ebb93add3fcd52f5e4d5e493fb4b3f (patch) | |
tree | 41c5df7eb1889e265fcb6ebbaab37149b3bd2956 /cmake | |
parent | 881a8e27fc82b440c66253aecb9110d44f26248f (diff) | |
download | tigervnc-df3cc42631ebb93add3fcd52f5e4d5e493fb4b3f.tar.gz tigervnc-df3cc42631ebb93add3fcd52f5e4d5e493fb4b3f.zip |
Handle mingw circular dependencies in base libraries
Our link order should now match the built-in library list.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/StaticBuild.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index 7679f458..df12db41 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -101,7 +101,11 @@ if(BUILD_STATIC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nodefaultlibs") set(STATIC_BASE_LIBRARIES "-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic") if(WIN32) - set(STATIC_BASE_LIBRARIES "${STATIC_BASE_LIBRARIES} -lmingw32 -lmoldname -lmingwex -lgcc -lgcc_eh -lmsvcrt -lkernel32") + set(STATIC_BASE_LIBRARIES "${STATIC_BASE_LIBRARIES} -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt") + set(STATIC_BASE_LIBRARIES "${STATIC_BASE_LIBRARIES} -luser32 -lkernel32 -ladvapi32 -lshell32") + # mingw has some fun circular dependencies that requires us to link + # these things again + set(STATIC_BASE_LIBRARIES "${STATIC_BASE_LIBRARIES} -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt") else() set(STATIC_BASE_LIBRARIES "${STATIC_BASE_LIBRARIES} -lgcc -lgcc_eh -lc") endif() |