Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-12-26 18:01:17 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-12-26 18:01:17 +0300
commit4415e52009b5387e7386887588b9c9d9665989c8 (patch)
tree95bcda030e66ad0b3c28ea53a2350581d620ce35
parent4332a56742786f67f284af59bd60788bb288072b (diff)
CMake: Fix errors building by MinGW
Some libraries are nto updated for MinGW hence build system needs some exceptions for this compiler.
-rw-r--r--CMakeLists.txt7
-rw-r--r--source/creator/CMakeLists.txt48
2 files changed, 40 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14248d6da3a..ca23e760ff0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1585,8 +1585,13 @@ elseif(WIN32)
if(WITH_SDL)
set(SDL ${LIBDIR}/sdl)
set(SDL_INCLUDE_DIR ${SDL}/include)
- set(SDL_LIBRARY SDL2)
set(SDL_LIBPATH ${SDL}/lib)
+ # MinGW TODO: Update MinGW to SDL2
+ if(NOT CMAKE_COMPILER_IS_GNUCC)
+ set(SDL_LIBRARY SDL2)
+ else()
+ set(SDL_LIBRARY SDL)
+ endif()
endif()
# Audio IO
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)