[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37985] branches/cycles/intern/cycles: Cycles: OS X build system changes to use lib/ openimageio and boost.
Brecht Van Lommel
brechtvanlommel at pandora.be
Thu Jun 30 16:47:57 CEST 2011
Revision: 37985
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37985
Author: blendix
Date: 2011-06-30 14:47:57 +0000 (Thu, 30 Jun 2011)
Log Message:
-----------
Cycles: OS X build system changes to use lib/ openimageio and boost.
Modified Paths:
--------------
branches/cycles/intern/cycles/CMakeLists.txt
branches/cycles/intern/cycles/blender/CMakeLists.txt
branches/cycles/intern/cycles/cmake/external_libs.cmake
Modified: branches/cycles/intern/cycles/CMakeLists.txt
===================================================================
--- branches/cycles/intern/cycles/CMakeLists.txt 2011-06-30 14:45:12 UTC (rev 37984)
+++ branches/cycles/intern/cycles/CMakeLists.txt 2011-06-30 14:47:57 UTC (rev 37985)
@@ -22,9 +22,12 @@
# Paths
+IF(UNIX AND NOT APPLE)
+ SET(CYCLES_OIIO "" CACHE PATH "Path to OpenImageIO installation")
+ SET(CYCLES_BOOST "/usr" CACHE PATH "Path to Boost installation")
+ENDIF()
+
SET(CYCLES_OSL "" CACHE PATH "Path to OpenShadingLanguage installation")
-SET(CYCLES_OIIO "" CACHE PATH "Path to OpenImageIO installation")
-SET(CYCLES_BOOST "/usr" CACHE PATH "Path to Boost installation")
SET(CYCLES_CUDA "/usr/local/cuda" CACHE PATH "Path to CUDA installation")
SET(CYCLES_OPENCL "" CACHE PATH "Path to OpenCL installation")
SET(CYCLES_PARTIO "" CACHE PATH "Path to Partio installation")
Modified: branches/cycles/intern/cycles/blender/CMakeLists.txt
===================================================================
--- branches/cycles/intern/cycles/blender/CMakeLists.txt 2011-06-30 14:45:12 UTC (rev 37984)
+++ branches/cycles/intern/cycles/blender/CMakeLists.txt 2011-06-30 14:47:57 UTC (rev 37985)
@@ -87,7 +87,7 @@
DESTINATION ${CYCLES_INSTALL_PATH}/cycles)
ENDIF()
-IF(UNIX)
+IF(UNIX AND NOT APPLE)
# copy libraries to cycles lib directory
SET(install_libs
${OPENIMAGEIO_LIBRARY}
@@ -101,27 +101,7 @@
INSTALL(FILES ${install_libs}
DESTINATION ${CYCLES_INSTALL_PATH}/cycles/lib)
- IF(NOT APPLE)
- # set path to look for dynamic libs
- SET_TARGET_PROPERTIES(cycles_blender PROPERTIES INSTALL_RPATH $ORIGIN/lib)
- ELSE()
- # modify our libs to looks for dynamic libs in cycles lib directory
- SET(install_name_command "install_name_tool")
-
- FOREACH(lib ${install_libs})
- GET_FILENAME_COMPONENT(libname ${lib} NAME)
- SET(install_name_command " ${install_name_command} -change ${lib} @loader_path/lib/${libname}")
- SET(install_name_command " ${install_name_command} -change ${libname} @loader_path/lib/${libname}")
- ENDFOREACH()
-
- INSTALL(
- CODE
- "
- EXECUTE_PROCESS(COMMAND ${install_name_command} ${CYCLES_INSTALL_PATH}/cycles/libcycles_blender.so)
- "
- )
- ELSE()
- ENDIF()
+ # set path to look for dynamic libs
+ SET_TARGET_PROPERTIES(cycles_blender PROPERTIES INSTALL_RPATH $ORIGIN/lib)
ENDIF()
-
Modified: branches/cycles/intern/cycles/cmake/external_libs.cmake
===================================================================
--- branches/cycles/intern/cycles/cmake/external_libs.cmake 2011-06-30 14:45:12 UTC (rev 37984)
+++ branches/cycles/intern/cycles/cmake/external_libs.cmake 2011-06-30 14:47:57 UTC (rev 37985)
@@ -1,16 +1,23 @@
###########################################################################
-# Windows lib directory libraries
+# Windows and Darwin lib directory libraries
IF(WIN32)
- if(CMAKE_CL_64)
- set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
- else()
- set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
- endif()
+ IF(CMAKE_CL_64)
+ SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
+ ELSE()
+ SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
+ ENDIF()
+ENDIF()
+IF(APPLE)
+ SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal)
+ SET(OIIO_STATIC ON)
+ENDIF()
+
+IF(LIBDIR)
SET(CYCLES_OIIO ${LIBDIR}/openimageio)
SET(CYCLES_BOOST ${LIBDIR}/boost)
- SET(Boost_USE_STATIC_LIBS ON)
+ SET(Boost_USE_STATIC_LIBS ON)
ENDIF()
###########################################################################
@@ -65,6 +72,25 @@
ADD_DEFINITIONS(-DWITH_OIIO)
INCLUDE_DIRECTORIES(${OPENIMAGEIO_INCLUDES} ${OPENIMAGEIO_INCLUDES}/OpenImageIO)
+IF(OIIO_STATIC)
+ ADD_DEFINITIONS(-DOIIO_STATIC_BUILD)
+
+ SET(OPENIMAGEIO_LIBRARY
+ ${OPENIMAGEIO_LIBRARY}
+ ${PNG_LIBRARIES}
+ ${JPEG_LIBRARIES}
+ ${TIFF_LIBRARY}
+ ${OPENEXR_LIBRARIES}
+ ${ZLIB_LIBRARIES})
+
+ LINK_DIRECTORIES(
+ ${JPEG_LIBPATH}
+ ${PNG_LIBPATH}
+ ${TIFF_LIBPATH}
+ ${OPENEXR_LIBPATH}
+ ${ZLIB_LIBPATH})
+ENDIF()
+
###########################################################################
# GLUT
More information about the Bf-blender-cvs
mailing list