Fixes for CMake.
authorChris Want <cwant@ualberta.ca>
Tue, 22 Jan 2008 05:34:53 +0000 (05:34 +0000)
committerChris Want <cwant@ualberta.ca>
Tue, 22 Jan 2008 05:34:53 +0000 (05:34 +0000)
CMakeLists.txt
extern/CMakeLists.txt
extern/binreloc/CMakeLists.txt
source/blender/blenlib/CMakeLists.txt
source/creator/CMakeLists.txt

index 16818b4..1804eb5 100644 (file)
@@ -67,7 +67,6 @@ OPTION(WITH_OPENEXR           "Enable OpenEXR Support (http://www.openexr.com)"       OFF)
 OPTION(WITH_FFMPEG             "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)"   OFF)
 OPTION(WITH_OPENAL             "Enable OpenAL Support (http://www.openal.org)" ON)
 OPTION(YESIAMSTUPID            "Enable execution on 64-bit platforms"                                  OFF)
-OPTION(WITH_BINRELOC           "Enable binreloc filepath support"                              OFF)
 
 IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
   MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
@@ -257,9 +256,6 @@ IF(WIN32)
   SET(FFMPEG_LIB avcodec-51 avformat-51 avutil-49)
   SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
 
-  SET(BINRELC ${LIBDIR}/binreloc)
-  SET(BINRELC_INC ${BINRELOC}/include)
-
   SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
   IF(WITH_OPENAL)
     SET(LLIBS ${LLIBS} dxguid)
@@ -370,6 +366,11 @@ IF(APPLE)
   SET(EXETYPE MACOSX_BUNDLE)
 ENDIF(APPLE)
 
+IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+  SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
+  SET(BINRELOC_INC ${BINRELOC}/include)
+ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+
 #-----------------------------------------------------------------------------
 # Common.
 SET(VERSE_INC ${CMAKE_SOURCE_DIR}/extern/verse/dist)
index 1842aa0..db2584d 100644 (file)
@@ -43,6 +43,6 @@ IF(WITH_VERSE)
   SUBDIRS(verse)
 ENDIF(WITH_VERSE)
 
-if(WITH_BINRELOC)
+IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
   SUBDIRS(binreloc)
-ENDIF(WITH_BINRELOC)
+ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
index ee4dccf..78dc65d 100644 (file)
@@ -22,5 +22,5 @@ SET(INC ./include ${WINTAB_INC})
 ADD_DEFINITIONS(-DWITH_BINRELOC)
 FILE(GLOB SRC *.c)
 
-BLENDERLIB(binreloc "${SRC}" "${INC}")
+BLENDERLIB(extern_binreloc "${SRC}" "${INC}")
 #, libtype=['core','player'], priority = [25,15] ) 
index 4812cad..ac2f323 100644 (file)
@@ -36,6 +36,13 @@ SET(INC
   ${ZLIB_INC}
 )
 
+IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+SET(INC
+  ${INC}
+  ${BINRELOC_INC}
+)
+ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+
 IF(WITH_VERSE)
   ADD_DEFINITIONS(-DWITH_VERSE)
   SET(INC ${INC} ${VERSE_INC})
index 4f11ea6..2b566d7 100644 (file)
@@ -42,16 +42,18 @@ INCLUDE_DIRECTORIES(../../intern/guardedalloc
   ../blender/makesdna
   ../kernel/gen_messaging
   ../kernel/gen_system
-  ../../extern/binreloc/include
 )
 
+
+
 IF(WITH_QUICKTIME)
   ADD_DEFINITIONS(-DWITH_QUICKTIME)
 ENDIF(WITH_QUICKTIME)
 
-IF(WITH_BINRELOC)
+IF(LINUX)
   ADD_DEFINITIONS(-DWITH_BINRELOC)
-endif(WITH_BINRELOC)
+  INCLUDE_DIRECTORIES(${BINRELOC_INC})
+endif(LINUX)
 
 IF(YESIAMSTUPID)
   ADD_DEFINITIONS(-DYESIAMSTUPID)
@@ -196,6 +198,10 @@ FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
 
 SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} src blender_python blender_render blender_radiosity blender_IK bf_elbeem)
 
+IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+  SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
+ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+
 IF(UNIX)
   # Sort libraries
   SET(BLENDER_SORTED_LIBS
@@ -259,6 +265,7 @@ IF(UNIX)
     bf_moto 
     blender_python
     bf_quicktime
+    extern_binreloc
   )
 
   FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})