[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22452] branches/blender2.5/blender: some fixes for netbsd with cmake
Campbell Barton
ideasman42 at gmail.com
Fri Aug 14 15:13:36 CEST 2009
Revision: 22452
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22452
Author: campbellbarton
Date: 2009-08-14 15:13:36 +0200 (Fri, 14 Aug 2009)
Log Message:
-----------
some fixes for netbsd with cmake
- CMake, use FIND_PACKAGE(Freetype) for unix/linux
- Only link with libdl.so on linux
- use statvfs rather then statfs for netbsd (size of statfs wasnt available)
- add x11 include path with ghost, glu.
Modified Paths:
--------------
branches/blender2.5/blender/CMakeLists.txt
branches/blender2.5/blender/extern/glew/CMakeLists.txt
branches/blender2.5/blender/intern/ghost/CMakeLists.txt
branches/blender2.5/blender/intern/guardedalloc/BLO_sys_types.h
branches/blender2.5/blender/intern/opennl/superlu/BLO_sys_types.h
branches/blender2.5/blender/source/blender/blenlib/intern/storage.c
branches/blender2.5/blender/source/blender/blenloader/BLO_sys_types.h
branches/blender2.5/blender/source/blender/python/intern/bpy_interface.c
branches/blender2.5/blender/source/blender/windowmanager/CMakeLists.txt
Modified: branches/blender2.5/blender/CMakeLists.txt
===================================================================
--- branches/blender2.5/blender/CMakeLists.txt 2009-08-14 12:29:55 UTC (rev 22451)
+++ branches/blender2.5/blender/CMakeLists.txt 2009-08-14 13:13:36 UTC (rev 22452)
@@ -114,20 +114,11 @@
IF(INTL_LIBRARY AND ICONV_LIBRARY)
SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
-
- FIND_PATH(FREETYPE_INC
- freetype
- PATHS
- /usr/local/include/freetype2
- /usr/include/freetype2
- /sw/include/freetype2
- /opt/local/include/freetype2
- /opt/csw/include/freetype2
- /opt/include/freetype2
- NO_DEFAULT_PATH
- )
- SET(FREETYPE_LIB freetype)
+ FIND_PACKAGE(Freetype)
+ SET(FREETYPE_INC "${FREETYPE_INCLUDE_DIR_freetype2}" CACHE STRING "")
+ SET(FREETYPE_LIB "${FREETYPE_LIBRARY}" CACHE STRING "")
+
FIND_PACKAGE(PythonLibs)
SET(PYTHON_INC "${PYTHON_INCLUDE_PATH}" CACHE STRING "")
SET(PYTHON_LIB "${PYTHON_LIBRARIES}" CACHE STRING "")
@@ -159,10 +150,10 @@
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
IF(WITH_FFTW3)
- SET(FFTW3 /usr)
- SET(FFTW3_INC ${FFTW3}/include)
- SET(FFTW3_LIB fftw3)
- SET(FFTW3_LIBPATH ${FFTW3}/lib)
+ SET(FFTW3 /usr)
+ SET(FFTW3_INC ${FFTW3}/include)
+ SET(FFTW3_LIB fftw3)
+ SET(FFTW3_LIBPATH ${FFTW3}/lib)
ENDIF(WITH_FFTW3)
SET(LIBSAMPLERATE /usr)
@@ -176,8 +167,14 @@
FIND_PACKAGE(ZLIB REQUIRED)
- SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11 -ldl")
+ # Could use ${X11_Xinput_LIB} ${X11_X11_LIB} too
+ SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11")
+ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ # BSD's dont use libdl.so
+ SET(LLIBS "${LLIBS} -ldl")
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+
IF(WITH_OPENMP)
SET(LLIBS "${LLIBS} -lgomp")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
Modified: branches/blender2.5/blender/extern/glew/CMakeLists.txt
===================================================================
--- branches/blender2.5/blender/extern/glew/CMakeLists.txt 2009-08-14 12:29:55 UTC (rev 22451)
+++ branches/blender2.5/blender/extern/glew/CMakeLists.txt 2009-08-14 13:13:36 UTC (rev 22452)
@@ -26,8 +26,13 @@
SET(INC include src)
+IF(UNIX)
+ SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
+ENDIF(UNIX)
+
SET(SRC
src/glew.c
)
BLENDERLIB(extern_glew "${SRC}" "${INC}")
+
Modified: branches/blender2.5/blender/intern/ghost/CMakeLists.txt
===================================================================
--- branches/blender2.5/blender/intern/ghost/CMakeLists.txt 2009-08-14 12:29:55 UTC (rev 22451)
+++ branches/blender2.5/blender/intern/ghost/CMakeLists.txt 2009-08-14 13:13:36 UTC (rev 22452)
@@ -24,7 +24,7 @@
#
# ***** END GPL LICENSE BLOCK *****
-SET(INC . ../string ${WINTAB_INC})
+SET(INC . ../string)
FILE(GLOB SRC intern/*.cpp)
@@ -37,6 +37,7 @@
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
ELSE(APPLE)
IF(WIN32)
+ SET(INC ${INC} ${WINTAB_INC})
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
@@ -44,6 +45,7 @@
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
ELSE(WIN32)
+ SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
Modified: branches/blender2.5/blender/intern/guardedalloc/BLO_sys_types.h
===================================================================
--- branches/blender2.5/blender/intern/guardedalloc/BLO_sys_types.h 2009-08-14 12:29:55 UTC (rev 22451)
+++ branches/blender2.5/blender/intern/guardedalloc/BLO_sys_types.h 2009-08-14 13:13:36 UTC (rev 22452)
@@ -82,7 +82,7 @@
#define _UINTPTR_T_DEFINED
#endif
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__NetBSD__)
/* Linux-i386, Linux-Alpha, Linux-ppc */
#include <stdint.h>
Modified: branches/blender2.5/blender/intern/opennl/superlu/BLO_sys_types.h
===================================================================
--- branches/blender2.5/blender/intern/opennl/superlu/BLO_sys_types.h 2009-08-14 12:29:55 UTC (rev 22451)
+++ branches/blender2.5/blender/intern/opennl/superlu/BLO_sys_types.h 2009-08-14 13:13:36 UTC (rev 22452)
@@ -83,7 +83,7 @@
#define _UINTPTR_T_DEFINED
#endif
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__NetBSD__)
/* Linux-i386, Linux-Alpha, Linux-ppc */
#include <stdint.h>
Modified: branches/blender2.5/blender/source/blender/blenlib/intern/storage.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenlib/intern/storage.c 2009-08-14 12:29:55 UTC (rev 22451)
+++ branches/blender2.5/blender/source/blender/blenlib/intern/storage.c 2009-08-14 13:13:36 UTC (rev 22452)
@@ -47,13 +47,13 @@
#include <time.h>
#include <sys/stat.h>
-#if defined (__sun__) || defined (__sun) || defined (__sgi)
+#if defined (__sun__) || defined (__sun) || defined (__sgi) || defined (__NetBSD__)
#include <sys/statvfs.h> /* Other modern unix os's should probably use this also */
#elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__))
#include <sys/statfs.h>
#endif
-#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__)
+#if defined (__FreeBSD__) || defined (__OpenBSD__)
#include <sys/param.h>
#include <sys/mount.h>
#endif
@@ -173,7 +173,7 @@
return (double) (freec*bytesps*sectorspc);
#else
-#if defined (__sun__) || defined (__sun) || defined (__sgi)
+#if defined (__sun__) || defined (__sun) || defined (__sgi) || defined (__NetBSD__)
struct statvfs disk;
#else
struct statfs disk;
@@ -195,7 +195,7 @@
if (statfs(name, &disk)) return(-1);
#endif
-#if defined (__sun__) || defined (__sun) || defined (__sgi)
+#if defined (__sun__) || defined (__sun) || defined (__sgi) || defined (__NetBSD__)
if (statvfs(name, &disk)) return(-1);
#elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__))
/* WARNING - This may not be supported by geeneric unix os's - Campbell */
Modified: branches/blender2.5/blender/source/blender/blenloader/BLO_sys_types.h
===================================================================
--- branches/blender2.5/blender/source/blender/blenloader/BLO_sys_types.h 2009-08-14 12:29:55 UTC (rev 22451)
+++ branches/blender2.5/blender/source/blender/blenloader/BLO_sys_types.h 2009-08-14 13:13:36 UTC (rev 22452)
@@ -78,7 +78,7 @@
#define _UINTPTR_T_DEFINED
#endif
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__NetBSD__)
/* Linux-i386, Linux-Alpha, Linux-ppc */
#include <stdint.h>
Modified: branches/blender2.5/blender/source/blender/python/intern/bpy_interface.c
===================================================================
--- branches/blender2.5/blender/source/blender/python/intern/bpy_interface.c 2009-08-14 12:29:55 UTC (rev 22451)
+++ branches/blender2.5/blender/source/blender/python/intern/bpy_interface.c 2009-08-14 13:13:36 UTC (rev 22452)
@@ -270,7 +270,7 @@
void BPY_end_python( void )
{
- fprintf(stderr, "Ending Python!\n");
+ // fprintf(stderr, "Ending Python!\n");
PyGILState_Ensure(); /* finalizing, no need to grab the state */
@@ -296,7 +296,7 @@
printf("\n");
- fprintf(stderr, "Ending Python Done!\n");
+ // fprintf(stderr, "Ending Python Done!\n");
#endif
Modified: branches/blender2.5/blender/source/blender/windowmanager/CMakeLists.txt
===================================================================
--- branches/blender2.5/blender/source/blender/windowmanager/CMakeLists.txt 2009-08-14 12:29:55 UTC (rev 22451)
+++ branches/blender2.5/blender/source/blender/windowmanager/CMakeLists.txt 2009-08-14 13:13:36 UTC (rev 22452)
@@ -40,6 +40,7 @@
../gpu
../blenfont
${SDL_INC}
+ ${OPENGL_INCLUDE_DIR}
)
IF(WITH_INTERNATIONAL)
More information about the Bf-blender-cvs
mailing list