Update build files to use the new lib locations for MinGW. For builders: you will...
authorAntony Riakiotakis <kalast@gmail.com>
Mon, 23 Apr 2012 01:11:42 +0000 (01:11 +0000)
committerAntony Riakiotakis <kalast@gmail.com>
Mon, 23 Apr 2012 01:11:42 +0000 (01:11 +0000)
to build with MinGW past this commit.

CMakeLists.txt
build_files/scons/config/win32-mingw-config.py

index a0935917c8a205332b865c01bc639800c654ce83..1595e78ea4ceb7c172413720544bb3cca1967bef 100644 (file)
@@ -735,14 +735,18 @@ elseif(WIN32)
        # this file is included anyway when building under Windows with cl.exe
        #  include(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
 
-       set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
+       if(CMAKE_COMPILER_IS_GNUCC)
+               set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
+       else()
+               set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
 
-       # Setup 64bit and 64bit windows systems
-       if(CMAKE_CL_64)
-               message("64 bit compiler detected.")
-               set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
+               # Setup 64bit and 64bit windows systems
+               if(CMAKE_CL_64)
+                       message("64 bit compiler detected.")
+                       set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
+               endif()
        endif()
-
+               
        add_definitions(-DWIN32)
 
        if(WITH_INTERNATIONAL)
@@ -990,25 +994,26 @@ elseif(WIN32)
 
                set(PLATFORM_LINKFLAGS_DEBUG "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
 
-       else()
-               # keep GCC specific stuff here
-               if(CMAKE_COMPILER_IS_GNUCC)
-                       set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi")
-                       set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
+       elseif(CMAKE_COMPILER_IS_GNUCC)
+       # keep GCC specific stuff here
+               set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
+               
+               set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi")
+               set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
+
+               add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
 
-                       add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
-               endif()
 
                add_definitions(-DFREE_WINDOWS)
 
                if(WITH_INTERNATIONAL)
-                       set(GETTEXT ${LIBDIR}/gcc/gettext)
+                       set(GETTEXT ${LIBDIR}/gettext)
                        set(GETTEXT_INCLUDE_DIRS ${GETTEXT}/include)
                        set(GETTEXT_LIBPATH ${GETTEXT}/lib)
                        set(GETTEXT_LIBRARIES intl)
                endif()
                
-               set(PNG "${LIBDIR}/gcc/png")
+               set(PNG "${LIBDIR}/png")
                set(PNG_INCLUDE_DIR "${PNG}/include")
                set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
 
@@ -1025,26 +1030,26 @@ elseif(WIN32)
                set(PTHREADS_LIBPATH ${PTHREADS}/lib)
                set(PTHREADS_LIBRARIES pthreadGC2)
 
-               set(FREETYPE ${LIBDIR}/gcc/freetype)
+               set(FREETYPE ${LIBDIR}/freetype)
                set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
                set(FREETYPE_LIBPATH ${FREETYPE}/lib)
                set(FREETYPE_LIBRARY freetype)
 
                if(WITH_FFTW3)
-                       set(FFTW3 ${LIBDIR}/gcc/fftw3)
+                       set(FFTW3 ${LIBDIR}/fftw3)
                        set(FFTW3_LIBRARIES fftw3)
                        set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
                        set(FFTW3_LIBPATH ${FFTW3}/lib)
                endif()
 
                if(WITH_OPENCOLLADA)
-                       set(OPENCOLLADA ${LIBDIR}/gcc/opencollada)
+                       set(OPENCOLLADA ${LIBDIR}/opencollada)
                        set(OPENCOLLADA_INCLUDE_DIRS
-                               ${LIBDIR}/gcc/opencollada/include/COLLADAStreamWriter/include
-                               ${LIBDIR}/gcc/opencollada/include/COLLADABaseUtils/include
-                               ${LIBDIR}/gcc/opencollada/include/COLLADAFramework/include
-                               ${LIBDIR}/gcc/opencollada/include/COLLADASaxFrameworkLoader/include
-                               ${LIBDIR}/gcc/opencollada/include/GeneratedSaxParser/include
+                               ${LIBDIR}/opencollada/include/COLLADAStreamWriter/include
+                               ${LIBDIR}/opencollada/include/COLLADABaseUtils/include
+                               ${LIBDIR}/opencollada/include/COLLADAFramework/include
+                               ${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader/include
+                               ${LIBDIR}/opencollada/include/GeneratedSaxParser/include
                        )
                        set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
                        set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
@@ -1059,14 +1064,14 @@ elseif(WIN32)
                endif()
 
                if(WITH_IMAGE_OPENEXR)
-                       set(OPENEXR ${LIBDIR}/gcc/openexr)
+                       set(OPENEXR ${LIBDIR}/openexr)
                        set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
                        set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
                        set(OPENEXR_LIBPATH ${OPENEXR}/lib)
                endif()
 
                if(WITH_IMAGE_TIFF)
-                       set(TIFF ${LIBDIR}/gcc/tiff)
+                       set(TIFF ${LIBDIR}/tiff)
                        set(TIFF_LIBRARY tiff)
                        set(TIFF_INCLUDE_DIR ${TIFF}/include)
                        set(TIFF_LIBPATH ${TIFF}/lib)
@@ -1103,12 +1108,12 @@ elseif(WIN32)
                                boost_regex-${BOOST_POSTFIX} boost_system-${BOOST_POSTFIX} boost_thread-${BOOST_POSTFIX}
                                debug boost_date_time-${BOOST_DEBUG_POSTFIX} boost_filesystem-${BOOST_DEBUG_POSTFIX}
                                boost_regex-${BOOST_DEBUG_POSTFIX} boost_system-${BOOST_DEBUG_POSTFIX} boost_thread-${BOOST_DEBUG_POSTFIX})
-                       set(BOOST_LIBPATH ${BOOST}/lib/gcc)
+                       set(BOOST_LIBPATH ${BOOST}/lib)
                        set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB -DBOOST_THREAD_USE_LIB ")
                endif()
                        
                if(WITH_OPENIMAGEIO)
-                       set(OPENIMAGEIO ${LIBDIR}/gcc/openimageio)
+                       set(OPENIMAGEIO ${LIBDIR}/openimageio)
                        set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
                        set(OPENIMAGEIO_LIBRARIES OpenImageIO)
                        set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
index 855f643129a23ccb5163da45ae65176ff0ed125a..576415559878a83fda2837bcef0e3d0fc11680e7 100644 (file)
@@ -1,4 +1,4 @@
-LCGDIR = '#../lib/windows'
+LCGDIR = '#../lib/mingw32'
 LIBDIR = "${LCGDIR}"
 
 BF_PYTHON = LIBDIR + '/python'
@@ -48,7 +48,7 @@ BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
 
 WITH_BF_OPENEXR = True
 WITH_BF_STATICOPENEXR = False
-BF_OPENEXR = LIBDIR + '/gcc/openexr'
+BF_OPENEXR = LIBDIR + '/openexr'
 BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
 BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
 BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
@@ -64,13 +64,13 @@ BF_JPEG_LIB = 'liblibjpeg'
 BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
 
 WITH_BF_PNG = True
-BF_PNG = LIBDIR + '/gcc/png'
+BF_PNG = LIBDIR + '/png'
 BF_PNG_INC = '${BF_PNG}/include'
 BF_PNG_LIB = 'png'
 BF_PNG_LIBPATH = '${BF_PNG}/lib'
 
 WITH_BF_TIFF = True
-BF_TIFF = LIBDIR + '/gcc/tiff'
+BF_TIFF = LIBDIR + '/tiff'
 BF_TIFF_INC = '${BF_TIFF}/include'
 BF_TIFF_LIB = 'tiff'
 BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
@@ -83,7 +83,7 @@ BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
 
 WITH_BF_INTERNATIONAL = True
 
-BF_GETTEXT = LIBDIR + '/gcc/gettext'
+BF_GETTEXT = LIBDIR + '/gettext'
 BF_GETTEXT_INC = '${BF_GETTEXT}/include'
 BF_GETTEXT_LIB = 'intl'
 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
@@ -95,7 +95,7 @@ BF_OPENJPEG_INC = '${BF_OPENJPEG}'
 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
 
 WITH_BF_FFTW3 = True
-BF_FFTW3 = LIBDIR + '/gcc/fftw3'
+BF_FFTW3 = LIBDIR + '/fftw3'
 BF_FFTW3_INC = '${BF_FFTW3}/include'
 BF_FFTW3_LIB = 'fftw3'
 BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
@@ -112,7 +112,7 @@ BF_BULLET_LIB = 'extern_bullet'
 BF_WINTAB = LIBDIR + '/wintab'
 BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
 
-BF_FREETYPE = LIBDIR + '/gcc/freetype'
+BF_FREETYPE = LIBDIR + '/freetype'
 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
 BF_FREETYPE_LIB = 'freetype'
 BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
@@ -145,7 +145,7 @@ BF_COLLADA = '#source/blender/collada'
 BF_COLLADA_INC = '${BF_COLLADA}'
 BF_COLLADA_LIB = 'bf_collada'
 
-BF_OPENCOLLADA = LIBDIR + '/gcc/opencollada'
+BF_OPENCOLLADA = LIBDIR + '/opencollada'
 BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
 BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa'
 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
@@ -154,7 +154,7 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
 WITH_BF_CYCLES = True 
 
 WITH_BF_OIIO = True
-BF_OIIO = LIBDIR + '/gcc/openimageio'
+BF_OIIO = LIBDIR + '/openimageio'
 BF_OIIO_INC = BF_OIIO + '/include'
 BF_OIIO_LIB = 'OpenImageIO'
 BF_OIIO_LIBPATH = BF_OIIO + '/lib'
@@ -163,7 +163,7 @@ WITH_BF_BOOST = True
 BF_BOOST = LIBDIR + '/boost'
 BF_BOOST_INC = BF_BOOST + '/include'
 BF_BOOST_LIB = 'boost_date_time-mgw46-mt-s-1_47 boost_filesystem-mgw46-mt-s-1_47 boost_regex-mgw46-mt-s-1_47 boost_system-mgw46-mt-s-1_47 boost_thread-mgw46-mt-s-1_47'
-BF_BOOST_LIBPATH = BF_BOOST + '/lib/gcc'
+BF_BOOST_LIBPATH = BF_BOOST + '/lib'
 
 #Ray trace optimization
 WITH_BF_RAYOPTIMIZATION = True