diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-12-26 18:01:17 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-12-26 18:01:17 +0300 |
commit | 4415e52009b5387e7386887588b9c9d9665989c8 (patch) | |
tree | 95bcda030e66ad0b3c28ea53a2350581d620ce35 /source | |
parent | 4332a56742786f67f284af59bd60788bb288072b (diff) |
CMake: Fix errors building by MinGW
Some libraries are nto updated for MinGW hence build system
needs some exceptions for this compiler.
Diffstat (limited to 'source')
-rw-r--r-- | source/creator/CMakeLists.txt | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 49fb4fe82eb..d084aeac9bd 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -623,17 +623,20 @@ elseif(WIN32) if(WITH_PYTHON) string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION}) - install( - FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.dll ${LIBDIR}/python/lib/sqlite3.dll - DESTINATION "." - CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel - ) + # MinGW TODO: This bit of Python configuration diverges from MSVC + if(NOT CMAKE_COMPILER_IS_GNUCC) + install( + FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.dll ${LIBDIR}/python/lib/sqlite3.dll + DESTINATION "." + CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel + ) - install( - FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}_d.dll ${LIBDIR}/python/lib/sqlite3_d.dll - DESTINATION "." - CONFIGURATIONS Debug - ) + install( + FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}_d.dll ${LIBDIR}/python/lib/sqlite3_d.dll + DESTINATION "." + CONFIGURATIONS Debug + ) + endif() if(WITH_PYTHON_INSTALL) # note, as far as python is concerned 'RelWithDebInfo' is not debug since its without debug flags. @@ -793,13 +796,30 @@ elseif(WIN32) ${LIBDIR}/openal/lib/OpenAL32.dll DESTINATION "." ) + # MinGW TODO: Need to update to a newer OpenAL version + # which does not depend on wrap_oal.dll + if(CMAKE_COMPILER_IS_GNUCC) + install( + FILES + ${LIBDIR}/openal/lib/wrap_oal.dll + DESTINATION "." + ) + endif() endif() if(WITH_SDL) - install( - FILES ${LIBDIR}/sdl/lib/SDL2.dll - DESTINATION "." - ) + #MinGW TODO: Update to SDL2 + if(NOT CMAKE_COMPILER_IS_GNUCC) + install( + FILES ${LIBDIR}/sdl/lib/SDL2.dll + DESTINATION "." + ) + else() + install( + FILES ${LIBDIR}/sdl/lib/SDL.dll + DESTINATION "." + ) + endif() endif() if(WITH_SYSTEM_AUDASPACE) |