diff options
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | cmake/modules/UseWinLibs.cmake | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 73acf6044e..5301607719 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -465,6 +465,9 @@ foreach(PACKAGE ${PACKAGELIST}) endif() endforeach() +# Provide Windows system lib names +include( UseWinLibs ) + #packaging include(CPackConfig.txt) diff --git a/cmake/modules/UseWinLibs.cmake b/cmake/modules/UseWinLibs.cmake new file mode 100644 index 0000000000..c5d986e072 --- /dev/null +++ b/cmake/modules/UseWinLibs.cmake @@ -0,0 +1,17 @@ +# +# $Id$ +# + +# Right now this is a more or less inelegant hack to get Windows +# builds going with MSVC + +if( WIN32 ) + + # We might need something like "if (CMAKE_COMPILER_ID MATCHES "MSVC")" + # here to support other compilers on Windows. + + set( WIN_SETARGV_OBJECT setargv.obj ) + + set( WS_LINK_FLAGS ${WS_LINK_FLAGS} "${WIN_SETARGV_OBJECT}" ) + +endif() |