[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29055] trunk/blender: [#21842] Beta patch to restore cmake MinGW compilation

Campbell Barton ideasman42 at gmail.com
Fri May 28 23:25:23 CEST 2010


Revision: 29055
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29055
Author:   campbellbarton
Date:     2010-05-28 23:25:23 +0200 (Fri, 28 May 2010)

Log Message:
-----------
[#21842] Beta patch to restore cmake MinGW compilation
from Riakiotakis Antonis (psy-fi) 

with modifications.

notes:
- needed to remove quotes around filepaths for copying.
- WITH_JACK, doesnt link
- WITH_FFMPEG, doesnt build
- WITH_RAYOPTIMIZATION, gave an error for me. (no mmx support)

Modified Paths:
--------------
    trunk/blender/CMakeLists.txt
    trunk/blender/source/blender/windowmanager/intern/wm.c
    trunk/blender/source/creator/CMakeLists.txt

Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt	2010-05-28 20:53:06 UTC (rev 29054)
+++ trunk/blender/CMakeLists.txt	2010-05-28 21:25:23 UTC (rev 29055)
@@ -1,4 +1,4 @@
- # $Id$
+# $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 # This program is free software; you can redistribute it and/or
@@ -287,120 +287,35 @@
 	SET(PYTHON_LIB python31)
 	SET(PYTHON_LIBPATH ${PYTHON}/lib)
 
-	SET(OPENAL ${LIBDIR}/openal)
-	SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
-	SET(OPENAL_LIBRARY wrap_oal)
-	SET(OPENAL_LIBPATH ${OPENAL}/lib)
+	IF(WITH_OPENAL)
+		SET(OPENAL ${LIBDIR}/openal)
+		SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
+		SET(OPENAL_LIBRARY wrap_oal)
+		SET(OPENAL_LIBPATH ${OPENAL}/lib)
+	ENDIF(WITH_OPENAL)
 
-	IF(WITH_JACK)
-		SET(JACK ${LIBDIR}/jack)
-		SET(JACK_INC ${JACK}/include/jack ${JACK}/include)
-		SET(JACK_LIB libjack)
-		SET(JACK_LIBPATH ${JACK}/lib)
-	ENDIF(WITH_JACK)
-
 	IF(WITH_SNDFILE)
 		SET(SNDFILE ${LIBDIR}/sndfile)
 		SET(SNDFILE_INC ${SNDFILE}/include)
 		SET(SNDFILE_LIB libsndfile-1)
 		SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
 	ENDIF(WITH_SNDFILE)
-
-	IF(CMAKE_CL_64)
-		SET(PNG_LIBRARIES libpng)
-	ELSE(CMAKE_CL_64)
-		SET(PNG_LIBRARIES libpng_st)
-	ENDIF(CMAKE_CL_64)
-	SET(JPEG_LIBRARY libjpeg)
-
-	SET(ZLIB ${LIBDIR}/zlib)
-	SET(ZLIB_INC ${ZLIB}/include)
-	IF(CMAKE_CL_64)
-		SET(ZLIB_LIBRARIES libz)
-	ELSE(CMAKE_CL_64)
-		SET(ZLIB_LIBRARIES zlib)
-	ENDIF(CMAKE_CL_64)
-	SET(ZLIB_LIBPATH ${ZLIB}/lib)
   
-	SET(PTHREADS ${LIBDIR}/pthreads)
-	SET(PTHREADS_INC ${PTHREADS}/include)
-	SET(PTHREADS_LIB pthreadVC2)
-	SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
-  
 	SET(ICONV ${LIBDIR}/iconv)
 	SET(ICONV_INC ${ICONV}/include)
 	SET(ICONV_LIB iconv)
 	SET(ICONV_LIBPATH ${ICONV}/lib)
-  
-	IF(WITH_FFTW3)
-		SET(FFTW3 ${LIBDIR}/fftw3)
-		SET(FFTW3_INC ${FFTW3}/include)
-		SET(FFTW3_LIB libfftw)
-		SET(FFTW3_LIBPATH ${FFTW3}/lib)
-	ENDIF(WITH_FFTW3)
-  
-	SET(GETTEXT ${LIBDIR}/gettext)
-	SET(GETTEXT_INC ${GETTEXT}/include)
-	IF(CMAKE_CL_64)
-		SET(GETTEXT_LIB gettext)
-	ELSE(CMAKE_CL_64)
-		SET(GETTEXT_LIB gnu_gettext)
-	ENDIF(CMAKE_CL_64)
-	SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
 
-	SET(FREETYPE ${LIBDIR}/freetype)
-	SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
-	SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
-	SET(FREETYPE_LIBRARY freetype2ST)
-  
-	SET(OPENEXR ${LIBDIR}/openexr)
-	SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
-	SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
-	IF (MSVC80)
-		SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
-	ELSE (MSVC80)
-		SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
-	ENDIF(MSVC80)
-	IF (MSVC90)
-		SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
-	ENDIF(MSVC90)
-
-  
 	SET(QUICKTIME ${LIBDIR}/QTDevWin)
 	SET(QUICKTIME_INC ${QUICKTIME}/CIncludes)
 	SET(QUICKTIME_LIB qtmlClient)
 	SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
 
-	SET(FFMPEG ${LIBDIR}/ffmpeg)
-	SET(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc)
-	SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
-	SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
-
 	SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
 	SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
 	SET(LIBSAMPLERATE_LIB libsamplerate)
 	SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
 
-	IF(CMAKE_CL_64)
-		SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
-	ELSE(CMAKE_CL_64)
-		SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
-	ENDIF(CMAKE_CL_64)
-
-	SET(CMAKE_CXX_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
-	SET(CMAKE_CXX_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
-	SET(CMAKE_CXX_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
-	SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
-	SET(CMAKE_C_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
-	SET(CMAKE_C_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
-	SET(CMAKE_C_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
-	SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
-
-	IF(WITH_OPENMP)
-		SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ")
-		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ")
-	ENDIF(WITH_OPENMP)
-
 	SET(SDL ${LIBDIR}/sdl)
 	SET(SDL_INCLUDE_DIR ${SDL}/include)
 	SET(SDL_LIBRARY SDL)
@@ -414,30 +329,224 @@
 	SET(JPEG_INC "${JPEG}/include")
 	SET(JPEG_LIBPATH ${JPEG}/lib)
 
-	SET(TIFF ${LIBDIR}/tiff)
-	SET(TIFF_INCLUDE_DIR ${TIFF}/include)
-	SET(TIFF_LIBRARY libtiff)
-	SET(TIFF_LIBPATH ${TIFF}/lib)
-  
 	SET(WINTAB_INC ${LIBDIR}/wintab/include) 
 
-	SET(OPENCOLLADA ${LIBDIR}/opencollada)
-	SET(OPENCOLLADA_INC ${OPENCOLLADA}/include)
-	SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-	SET(OPENCOLLADA_LIB OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser UTF xml2 buffer ftoa)
-	#pcre is bundled with openCollada
-	#SET(PCRE ${LIBDIR}/pcre)
-	#SET(PCRE_LIBPATH ${PCRE}/lib)
-	SET(PCRE_LIB pcre)
+	IF(MSVC)
+		IF(CMAKE_CL_64)
+			SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
+		ELSE(CMAKE_CL_64)
+			SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
+		ENDIF(CMAKE_CL_64)
+		
+		SET(CMAKE_CXX_FLAGS "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305" CACHE STRING "MSVC MT C++ flags " FORCE)
+		SET(CMAKE_C_FLAGS   "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305" CACHE STRING "MSVC MT C++ flags " FORCE)
 
+		SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
+		SET(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+		SET(CMAKE_CXX_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+		SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+		SET(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
+		SET(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+		SET(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+		SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+		
+		IF(WITH_OPENMP)
+			SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ")
+			SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ")
+		ENDIF(WITH_OPENMP)
+		
+		SET(GETTEXT ${LIBDIR}/gettext)
+		SET(GETTEXT_INC ${GETTEXT}/include)
+		SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
+		IF(CMAKE_CL_64)
+			SET(GETTEXT_LIB gettext)
+		ELSE(CMAKE_CL_64)
+			SET(GETTEXT_LIB gnu_gettext)
+		ENDIF(CMAKE_CL_64)
 
-	IF(CMAKE_CL_64)
-		SET(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
-	ELSE(CMAKE_CL_64)
-		SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
-	ENDIF(CMAKE_CL_64)
-  
-	SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
+		IF(CMAKE_CL_64)
+			SET(PNG_LIBRARIES libpng)
+		ELSE(CMAKE_CL_64)
+			SET(PNG_LIBRARIES libpng_st)
+		ENDIF(CMAKE_CL_64)
+		SET(JPEG_LIBRARY libjpeg)
+
+		SET(ZLIB ${LIBDIR}/zlib)
+		SET(ZLIB_INC ${ZLIB}/include)
+		SET(ZLIB_LIBPATH ${ZLIB}/lib)
+		IF(CMAKE_CL_64)
+			SET(ZLIB_LIBRARIES libz)
+		ELSE(CMAKE_CL_64)
+			SET(ZLIB_LIBRARIES zlib)
+		ENDIF(CMAKE_CL_64)
+
+		SET(PTHREADS ${LIBDIR}/pthreads)
+		SET(PTHREADS_INC ${PTHREADS}/include)
+		SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
+		SET(PTHREADS_LIB pthreadVC2)
+		
+		SET(FREETYPE ${LIBDIR}/freetype)
+		SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
+		SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
+		SET(FREETYPE_LIBRARY freetype2ST)
+
+		IF(WITH_FFTW3)
+			SET(FFTW3 ${LIBDIR}/fftw3)
+			SET(FFTW3_LIB libfftw)
+			SET(FFTW3_INC ${FFTW3}/include)
+			SET(FFTW3_LIBPATH ${FFTW3}/lib)
+		ENDIF(WITH_FFTW3)
+
+		IF(WITH_OPENCOLLADA)
+			SET(OPENCOLLADA ${LIBDIR}/opencollada)
+			SET(OPENCOLLADA_INC ${OPENCOLLADA}/include)
+			SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
+			SET(OPENCOLLADA_LIB OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser UTF xml2 buffer ftoa)
+			#pcre is bundled with openCollada
+			#SET(PCRE ${LIBDIR}/pcre)
+			#SET(PCRE_LIBPATH ${PCRE}/lib)
+			SET(PCRE_LIB pcre)
+		ENDIF(WITH_OPENCOLLADA)
+		
+		IF(WITH_FFMPEG)
+			SET(FFMPEG ${LIBDIR}/ffmpeg)
+			SET(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc)
+			SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
+			SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+		ENDIF(WITH_FFMPEG)
+
+		IF(WITH_OPENEXR)
+			SET(OPENEXR ${LIBDIR}/openexr)
+			SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
+			SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
+			IF (MSVC80)
+				SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
+			ELSE (MSVC80)
+				SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
+			ENDIF(MSVC80)
+			IF (MSVC90)

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list