Mac :
authorDamien Plisson <damien.plisson@yahoo.fr>
Mon, 2 Nov 2009 14:03:13 +0000 (14:03 +0000)
committerDamien Plisson <damien.plisson@yahoo.fr>
Mon, 2 Nov 2009 14:03:13 +0000 (14:03 +0000)
- Updated CMake files for building with openCollada

Update of the 10.5 libs including openCollada is coming in next commit

CMakeLists.txt
source/blender/collada/CMakeLists.txt

index 4126bc860daaa4f9779e2ef194459efd5fa5734e..74c527841f542a10e8c403c588f89902651acb7b 100644 (file)
@@ -91,7 +91,7 @@ IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
        MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
 ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
 
-IF (WITH_OPENCOLLADA)
+IF (WITH_OPENCOLLADA AND NOT APPLE)
 SET(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory")
 SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA})
 SET(OPENCOLLADA_LIB OpenCollada)
@@ -101,8 +101,7 @@ SET(PCRE_LIB pcre)
 SET(EXPAT /usr CACHE FILEPATH "Expat Directory")
 SET(EXPAT_LIBPATH ${EXPAT}/lib)
 SET(EXPAT_LIB expat)
-
-ENDIF (WITH_OPENCOLLADA)
+ENDIF (WITH_OPENCOLLADA AND NOT APPLE)
 
 # For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
 # On Unix: 
@@ -517,12 +516,28 @@ IF(APPLE)
        SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
        SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
        ENDIF (WITH_COCOA)
+
        IF(WITH_OPENMP)
                SET(LLIBS "${LLIBS} -lgomp ")
                SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ")
                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
        ENDIF(WITH_OPENMP)
 
+       IF (WITH_OPENCOLLADA)
+               SET(OPENCOLLADA ${LIBDIR}/opencollada)
+               SET(OPENCOLLADA_INC ${OPENCOLLADA}/include)
+               SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
+               SET(OPENCOLLADA_LIB "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2" )
+               #pcre is bundled with openCollada
+               #SET(PCRE ${LIBDIR}/pcre)
+               #SET(PCRE_LIBPATH ${PCRE}/lib)
+               SET(PCRE_LIB pcre)
+               #native OSX libxml2 is used
+               #SET(EXPAT ${LIBDIR}/expat)
+               #SET(EXPAT_LIBPATH ${EXPAT}/lib)
+               #SET(EXPAT_LIB expat)
+       ENDIF (WITH_OPENCOLLADA)
+
        SET(SDL ${LIBDIR}/sdl)
        SET(SDL_INCLUDE_DIR ${SDL}/include)
        SET(SDL_LIBRARY SDL)
index 5a8c08a254d4bb0eed718dee2c05eedfca0c6e6e..f510e7ee9ad8f77160abdce391049f690c182825 100644 (file)
 
 FILE(GLOB SRC *.cpp)
 
+IF(APPLE)
+SET(INC
+  .
+  ../blenlib
+  ../blenkernel
+  ../windowmanager
+  ../makesdna
+  ../makesrna
+  ../editors/include
+  ../../../intern/guardedalloc
+  ${OPENCOLLADA_INC}/COLLADAStreamWriter
+  ${OPENCOLLADA_INC}/COLLADABaseUtils
+  ${OPENCOLLADA_INC}/COLLADAFramework
+  ${OPENCOLLADA_INC}/COLLADASaxFrameworkLoader 
+)
+
+ELSE(APPLE)
+
 SET(INC
   .
   ../blenlib
@@ -41,4 +59,6 @@ SET(INC
   ${OPENCOLLADA}/COLLADASaxFrameworkLoader/include 
 )
 
+ENDIF(APPLE)
+
 BLENDERLIB(bf_collada "${SRC}" "${INC}")