svn merge ^/trunk/blender -r49644:49653
authorCampbell Barton <ideasman42@gmail.com>
Tue, 7 Aug 2012 13:38:35 +0000 (13:38 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 7 Aug 2012 13:38:35 +0000 (13:38 +0000)
1  2 
CMakeLists.txt

diff --combined CMakeLists.txt
index 194be8682cd87878d071123cf2b3faaba995b0d6,5f3638094244832c2db74b9821f618f6ed0c5193..f01c625af10f72bd5359e1a8cc1953fb3b72d7c9
@@@ -130,7 -130,6 +130,7 @@@ option(WITH_FFTW3         "Enable FFTW
  option(WITH_BULLET        "Enable Bullet (Physics Engine)" ON)
  option(WITH_GAMEENGINE    "Enable Game Engine" ON)
  option(WITH_PLAYER        "Build Player" OFF)
 +option(WITH_OPENCOLORIO   "Enable OpenColorIO color management" ON)
  option(WITH_COMPOSITOR    "Enable the tile based nodal compositor" ON)
  
  # GHOST Windowing Library Options
@@@ -671,24 -670,6 +671,24 @@@ if(UNIX AND NOT APPLE
                endif()
        endif()
  
 +      if(WITH_OPENCOLORIO)
 +              # use lib dir if available and nothing else specified
 +              if(LIBDIR AND NOT OPENCOLORIO_ROOT_DIR)
 +                      set(OPENCOLORIO_ROOT_DIR ${LIBDIR}/ocio)
 +              endif()
 +
 +              find_package(OpenColorIO)
 +
 +              set(OPENCOLORIO_LIBRARIES ${OPENCOLORIO_LIBRARIES})
 +              set(OPENCOLORIO_LIBPATH)  # TODO, remove and reference the absolute path everywhere
 +              set(OPENCOLORIO_DEFINITIONS)
 +
 +              if(NOT OPENCOLORIO_FOUND)
 +                      set(WITH_OPENCOLORIO OFF)
 +                      message(STATUS "OpenColorIO not found")
 +              endif()
 +      endif()
 +
        # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
        set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread -lstdc++")
  
@@@ -1031,14 -1012,6 +1031,14 @@@ elseif(WIN32
                        set(OPENIMAGEIO_DEFINITIONS)
                endif()
  
 +              if(WITH_OPENCOLORIO)
 +                      set(OPENCOLORIO ${LIBDIR}/opencolorio)
 +                      set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
 +                      set(OPENCOLORIO_LIBRARIES OpenColorIO)
 +                      set_lib_path(OPENCOLORIO_LIBPATH "opencolorio/lib")
 +                      set(OPENCOLORIO_DEFINITIONS)
 +              endif()
 +
                set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib")
  
                # MSVC only, Mingw doesnt need
                        set(OPENIMAGEIO_DEFINITIONS)
                endif()
                
 +              if(WITH_OPENCOLORIO)
 +                      set(OPENCOLORIO ${LIBDIR}/opencolorio)
 +                      set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
 +                      set(OPENCOLORIO_LIBRARIES OpenColorIO)
 +                      set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
 +                      set(OPENCOLORIO_DEFINITIONS)
 +              endif()
 +
                set(PLATFORM_LINKFLAGS "-Xlinker --stack=2097152")
  
                ## DISABLE - causes linking errors 
@@@ -1462,14 -1427,6 +1462,14 @@@ elseif(APPLE
                set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
        endif()
  
 +      if(WITH_OPENCOLORIO)
 +              set(OPENCOLORIO ${LIBDIR}/opencolorio)
 +              set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
 +              set(OPENCOLORIO_LIBRARIES OpenColorIO tinyxml yaml-cpp)
 +              set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
 +              set(OPENCOLORIO_DEFINITIONS "-DOCIO_STATIC_BUILD")
 +      endif()
 +
        set(EXETYPE MACOSX_BUNDLE)
  
        set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
@@@ -1523,9 -1480,14 +1523,14 @@@ endif(
  
  
  # set the endian define
- if(MSVC OR ${XCODE_VERSION} VERSION_GREATER 4.3) # no more ppc support in xcode > 4.3
+ if(MSVC)
        # for some reason this fails on msvc
        add_definitions(-D__LITTLE_ENDIAN__)
+ elseif(APPLE)
+       if (${XCODE_VERSION} VERSION_GREATER 4.3)
+               # no more ppc support in xcode > 4.3
+               add_definitions(-D__LITTLE_ENDIAN__)
+       endif()
  else()
        include(TestBigEndian)
        test_big_endian(_SYSTEM_BIG_ENDIAN)
@@@ -1833,7 -1795,6 +1838,7 @@@ if(FIRST_RUN
        info_cfg_option(WITH_INTERNATIONAL)
        info_cfg_option(WITH_INPUT_NDOF)
        info_cfg_option(WITH_CYCLES)
 +      info_cfg_option(WITH_OPENCOLORIO)
  
        info_cfg_text("Compiler Options:")
        info_cfg_option(WITH_BUILDINFO)