[Bf-committers] Error on compilation with cmake for windows
(Ry)akiotakis (An)tonis
kalast at gmail.com
Wed Apr 14 16:47:01 CEST 2010
On 14 April 2010 14:36, lguillaume <lecocqguillaume at gmail.com> wrote:
> Hi,
>
> Since a few days, I can't compile blender 2.5 on vc++ express 9 with cmake.
> There is 2 errors about the need of pthreads.h
>
> I correct the cmakefile with the patch :
>
> Index: source/blender/gpu/CMakeLists.txt
> ===================================================================
> --- source/blender/gpu/CMakeLists.txt (revision 28190)
> +++ source/blender/gpu/CMakeLists.txt (working copy)
> @@ -28,8 +28,12 @@
>
> SET(INC
> . ../blenlib ../blenkernel ../makesdna ../include
> - ../../../extern/glew/include ../../../intern/guardedalloc
> ../../../intern/smoke/extern ../imbuf)
> + ../../../extern/glew/include ../../../intern/guardedalloc
> ../../../intern/smoke/extern ../imbuf )
>
> +IF(WIN32)
> + SET(INC ${INC} ${PTHREADS_INC})
> +ENDIF(WIN32)
> +
> ADD_DEFINITIONS(-DGLEW_STATIC)
>
> BLENDERLIB(bf_gpu "${SRC}" "${INC}")
> Index: source/creator/CMakeLists.txt
> ===================================================================
> --- source/creator/CMakeLists.txt (revision 28190)
> +++ source/creator/CMakeLists.txt (working copy)
> @@ -49,8 +49,10 @@
> ../../extern/glew/include
> )
>
> +IF(WIN32)
> + INCLUDE_DIRECTORIES(${PTHREADS_INC})
> +ENDIF(WIN32)
>
> -
> IF(WITH_QUICKTIME)
> ADD_DEFINITIONS(-DWITH_QUICKTIME)
> ENDIF(WITH_QUICKTIME)
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
>
Same here, MinGW/Scons. The fix is, along similar lines:
Index: source/blender/gpu/SConscript
===================================================================
--- source/blender/gpu/SConscript (revision 28190)
+++ source/blender/gpu/SConscript (working copy)
@@ -9,5 +9,7 @@
incs += ' #/extern/glew/include #intern/guardedalloc
#intern/smoke/extern ../imbuf .'
incs += ' ' + env['BF_OPENGL_INC']
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
+ incs += ' ' + env['BF_PTHREADS_INC']
env.BlenderLib ( 'bf_gpu', sources, Split(incs), defines = defs,
libtype=['core','player'], priority=[160,110] )
Index: source/creator/SConscript
===================================================================
--- source/creator/SConscript (revision 28190)
+++ source/creator/SConscript (working copy)
@@ -11,6 +11,10 @@
incs += ' ../kernel/gen_system #/extern/glew/include ../blender/gpu'
incs += ' ' + env['BF_OPENGL_INC']
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
+
defs = []
if env['WITH_BF_QUICKTIME']:
incs += ' ' + env['BF_QUICKTIME_INC']
Thanks Guillaume!
More information about the Bf-committers
mailing list