diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-05 00:21:40 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-05 00:21:40 +0400 |
commit | 942d2fe3b7b75facbf280271b1adc31882fc5693 (patch) | |
tree | d3bdbd3fd41aea01afb5ebdbb9240c8de18f1db7 /build_files | |
parent | a620ec61ec173b7d9b753c9be443fdbdb1644c71 (diff) | |
parent | 7b47a4125fa4219a0f6c1a3e8c78047211caaa53 (diff) |
Cycles: svn merge -r41467:41531 ^/trunk/blender
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/Modules/FindPythonLibsUnix.cmake | 62 | ||||
-rwxr-xr-x | build_files/cmake/project_info.py | 1 | ||||
-rw-r--r-- | build_files/scons/config/win32-vc-config.py | 14 | ||||
-rw-r--r-- | build_files/scons/config/win64-vc-config.py | 14 | ||||
-rw-r--r-- | build_files/scons/tools/Blender.py | 10 | ||||
-rw-r--r-- | build_files/scons/tools/btools.py | 34 |
6 files changed, 103 insertions, 32 deletions
diff --git a/build_files/cmake/Modules/FindPythonLibsUnix.cmake b/build_files/cmake/Modules/FindPythonLibsUnix.cmake index fd5d20920da..8c3ff64d3f3 100644 --- a/build_files/cmake/Modules/FindPythonLibsUnix.cmake +++ b/build_files/cmake/Modules/FindPythonLibsUnix.cmake @@ -44,8 +44,19 @@ SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic" CACHE STRING "Linker flags for p MARK_AS_ADVANCED(PYTHON_LINKFLAGS) +# if the user passes these defines as args, we dont want to overwrite +SET(_IS_INC_DEF OFF) +SET(_IS_LIB_DEF OFF) +IF(DEFINED PYTHON_INCLUDE_DIR) + SET(_IS_INC_DEF ON) +ENDIF() +IF(DEFINED PYTHON_LIBRARY) + SET(_IS_LIB_DEF ON) +ENDIF() + + # only search for the dirs if we havn't already -IF((NOT DEFINED PYTHON_INCLUDE_DIR) OR (NOT DEFINED PYTHON_LIBRARY)) +IF((NOT _IS_INC_DEF) OR (NOT _IS_LIB_DEF)) SET(_python_ABI_FLAGS "m;mu;u; " # release @@ -66,30 +77,38 @@ IF((NOT DEFINED PYTHON_INCLUDE_DIR) OR (NOT DEFINED PYTHON_LIBRARY)) #ENDIF() STRING(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS}) - FIND_PATH(PYTHON_INCLUDE_DIR - NAMES - Python.h - HINTS - ${_python_SEARCH_DIRS} - PATH_SUFFIXES - include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS} - ) - - FIND_LIBRARY(PYTHON_LIBRARY - NAMES - "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}" - HINTS - ${_python_SEARCH_DIRS} - PATH_SUFFIXES - lib64 lib - ) + IF(NOT DEFINED PYTHON_INCLUDE_DIR) + FIND_PATH(PYTHON_INCLUDE_DIR + NAMES + Python.h + HINTS + ${_python_SEARCH_DIRS} + PATH_SUFFIXES + include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS} + ) + ENDIF() + + IF(NOT DEFINED PYTHON_LIBRARY) + FIND_LIBRARY(PYTHON_LIBRARY + NAMES + "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}" + HINTS + ${_python_SEARCH_DIRS} + PATH_SUFFIXES + lib64 lib + ) + ENDIF() IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR) break() ELSE() # ensure we dont find values from 2 different ABI versions - UNSET(PYTHON_INCLUDE_DIR CACHE) - UNSET(PYTHON_LIBRARY CACHE) + IF(NOT _IS_INC_DEF) + UNSET(PYTHON_INCLUDE_DIR CACHE) + ENDIF() + IF(NOT _IS_LIB_DEF) + UNSET(PYTHON_LIBRARY CACHE) + ENDIF() ENDIF() ENDFOREACH() @@ -100,6 +119,9 @@ IF((NOT DEFINED PYTHON_INCLUDE_DIR) OR (NOT DEFINED PYTHON_LIBRARY)) UNSET(_python_SEARCH_DIRS) ENDIF() +UNSET(_IS_INC_DEF) +UNSET(_IS_LIB_DEF) + # handle the QUIETLY and REQUIRED arguments and SET PYTHONLIBSUNIX_FOUND to TRUE IF # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) diff --git a/build_files/cmake/project_info.py b/build_files/cmake/project_info.py index da1f2087f4f..eed002ce7ba 100755 --- a/build_files/cmake/project_info.py +++ b/build_files/cmake/project_info.py @@ -234,4 +234,3 @@ def project_name_get(path, fallback="Blender", prefix="Blender_"): if "/branches/" in l: return prefix + l.rsplit("/branches/", 1)[-1].split("/", 1)[0] return fallback - diff --git a/build_files/scons/config/win32-vc-config.py b/build_files/scons/config/win32-vc-config.py index ec37b3046c8..1e4821180d6 100644 --- a/build_files/scons/config/win32-vc-config.py +++ b/build_files/scons/config/win32-vc-config.py @@ -149,6 +149,20 @@ WITH_BF_3DMOUSE = True WITH_BF_OPENMP = True +''' +WITH_BF_OIIO = True +BF_OIIO = LIBDIR + '/openimageio' +BF_OIIO_INC = '${BF_OIIO}/include' +BF_OIIO_LIB = 'OpenImageIO' +BF_OIIO_LIBPATH = '${BF_OIIO}/lib' + +WITH_BF_BOOST = True +BF_BOOST = LIBDIR + '/boost' +BF_BOOST_INC = '${BF_BOOST}/include' +BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_46_1 libboost_filesystem-vc90-mt-s-1_46_1 libboost_regex-vc90-mt-s-1_46_1 libboost_system-vc90-mt-s-1_46_1 libboost_thread-vc90-mt-s-1_46_1' +BF_BOOST_LIBPATH = '${BF_BOOST}/lib' +''' + #Ray trace optimization WITH_BF_RAYOPTIMIZATION = True BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE'] diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py index afa64e03e80..0920d9375ae 100644 --- a/build_files/scons/config/win64-vc-config.py +++ b/build_files/scons/config/win64-vc-config.py @@ -153,6 +153,20 @@ WITH_BF_3DMOUSE = True WITH_BF_OPENMP = True +''' +WITH_BF_OIIO = True +BF_OIIO = LIBDIR + '/openimageio' +BF_OIIO_INC = '${BF_OIIO}/include' +BF_OIIO_LIB = 'OpenImageIO' +BF_OIIO_LIBPATH = '${BF_OIIO}/lib' + +WITH_BF_BOOST = True +BF_BOOST = LIBDIR + '/boost' +BF_BOOST_INC = '${BF_BOOST}/include' +BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_45 libboost_filesystem-vc90-mt-s-1_45 libboost_regex-vc90-mt-s-1_45 libboost_system-vc90-mt-s-1_45 libboost_thread-vc90-mt-s-1_45' +BF_BOOST_LIBPATH = '${BF_BOOST}/lib' +''' + #Ray trace optimization WITH_BF_RAYOPTIMIZATION = True BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE','/arch:SSE2'] diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index 875d8f7388b..44f9a4c8062 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -192,6 +192,11 @@ def setup_staticlibs(lenv): if lenv['WITH_BF_OPENMP']: if lenv['OURPLATFORM'] == 'linuxcross': libincs += Split(lenv['BF_OPENMP_LIBPATH']) + + if lenv['WITH_BF_OIIO']: + libincs += Split(lenv['BF_OIIO_LIBPATH']) + if lenv['WITH_BF_BOOST']: + libincs += Split(lenv['BF_BOOST_LIBPATH']) # setting this last so any overriding of manually libs could be handled if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'): @@ -275,6 +280,11 @@ def setup_syslibs(lenv): if not lenv['WITH_BF_STATIC3DMOUSE']: syslibs += Split(lenv['BF_3DMOUSE_LIB']) + if lenv['WITH_BF_OIIO']: + syslibs += Split(lenv['BF_OIIO_LIB']) + if lenv['WITH_BF_BOOST']: + syslibs += Split(lenv['BF_BOOST_LIB']) + syslibs += lenv['LLIBS'] return syslibs diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index a678bc68f54..68054fe485e 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -116,7 +116,9 @@ def validate_arguments(args, bc): 'WITH_BF_INTERNATIONAL', 'BF_GETTEXT', 'BF_GETTEXT_INC', 'BF_GETTEXT_LIB', 'WITH_BF_GETTEXT_STATIC', 'BF_GETTEXT_LIB_STATIC', 'BF_GETTEXT_LIBPATH', 'WITH_BF_ICONV', 'BF_ICONV', 'BF_ICONV_INC', 'BF_ICONV_LIB', 'BF_ICONV_LIBPATH', - 'WITH_BF_GAMEENGINE', 'WITH_BF_BULLET', 'WITH_BF_ELTOPO', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB', + 'WITH_BF_GAMEENGINE', + 'WITH_BF_BULLET', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB', + 'WITH_BF_ELTOPO', 'BF_WINTAB', 'BF_WINTAB_INC', 'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH', 'BF_FREETYPE_LIB_STATIC', 'WITH_BF_FREETYPE_STATIC', 'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH', @@ -133,12 +135,10 @@ def validate_arguments(args, bc): 'WITHOUT_BF_INSTALL', 'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_OVERWRITE_INSTALL', - 'WITH_BF_OPENMP', - 'BF_OPENMP', - 'BF_OPENMP_INC', - 'BF_OPENMP_LIBPATH', + 'WITH_BF_OPENMP', 'BF_OPENMP', 'BF_OPENMP_LIBPATH', 'WITH_GHOST_COCOA', 'WITH_GHOST_SDL', + 'BF_GHOST_DEBUG', 'USE_QTKIT', 'BF_FANCY', 'BF_QUIET', 'BF_LINE_OVERWRITE', 'BF_X264_CONFIG', @@ -147,7 +147,6 @@ def validate_arguments(args, bc): 'BF_NUMJOBS', 'BF_MSVS', 'BF_VERSION', - 'BF_GHOST_DEBUG', 'WITH_BF_RAYOPTIMIZATION', 'BF_RAYOPTIMIZATION_SSE_FLAGS', 'WITH_BF_FLUID', @@ -155,7 +154,10 @@ def validate_arguments(args, bc): 'WITH_BF_BOOLEAN', 'WITH_BF_CXX_GUARDEDALLOC', 'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC', - 'BUILDBOT_BRANCH', 'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC' + 'BUILDBOT_BRANCH', + 'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC', + 'WITH_BF_OIIO', 'BF_OIIO', 'BF_OIIO_INC', 'BF_OIIO_LIB', 'BF_OIIO_LIBPATH', + 'WITH_BF_BOOST', 'BF_BOOST', 'BF_BOOST_INC', 'BF_BOOST_LIB', 'BF_BOOST_LIBPATH' ] # Have options here that scons expects to be lists @@ -239,9 +241,9 @@ def read_opts(env, cfg, args): ('LCGDIR', 'location of cvs lib dir'), (BoolVariable('WITH_BF_PYTHON', 'Compile with python', True)), (BoolVariable('WITH_BF_PYTHON_SAFETY', 'Internal API error checking to track invalid data to prevent crash on access (at the expense of some effeciency)', False)), - ('BF_PYTHON', 'base path for python', ''), + ('BF_PYTHON', 'Base path for python', ''), ('BF_PYTHON_VERSION', 'Python version to use', ''), - ('BF_PYTHON_INC', 'include path for Python headers', ''), + ('BF_PYTHON_INC', 'Include path for Python headers', ''), ('BF_PYTHON_BINARY', 'Path to the Python interpreter', ''), ('BF_PYTHON_LIB', 'Python library', ''), ('BF_PYTHON_DLL', 'Python dll - used on Windows only', ''), @@ -257,8 +259,8 @@ def read_opts(env, cfg, args): (BoolVariable('WITH_BF_BOOLEAN', 'Build with boolean modifier', True)), ('BF_PROFILE_FLAGS', 'Profiling compiler flags', ''), (BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)), - ('BF_OPENAL', 'base path for OpenAL', ''), - ('BF_OPENAL_INC', 'include path for python headers', ''), + ('BF_OPENAL', 'Base path for OpenAL', ''), + ('BF_OPENAL_INC', 'Include path for python headers', ''), ('BF_OPENAL_LIB', 'Path to OpenAL library', ''), ('BF_OPENAL_LIB_STATIC', 'Path to OpenAL static library', ''), ('BF_OPENAL_LIBPATH', 'Path to OpenAL library', ''), @@ -532,6 +534,16 @@ def read_opts(env, cfg, args): (BoolVariable('WITH_BF_CXX_GUARDEDALLOC', 'Enable GuardedAlloc for C++ memory allocation tracking.', False)), ('BUILDBOT_BRANCH', 'Buildbot branch name', ''), + + (BoolVariable('WITH_BF_OIIO', 'Build with OpenImageIO', False)), + ('BF_OIIO_INC', 'OIIO include path', ''), + ('BF_OIIO_LIB', 'OIIO library', ''), + ('BF_OIIO_LIBPATH', 'OIIO library path', ''), + + (BoolVariable('WITH_BF_BOOST', 'Build with Boost', False)), + ('BF_BOOST_INC', 'Boost include path', ''), + ('BF_BOOST_LIB', 'Boost library', ''), + ('BF_BOOST_LIBPATH', 'Boost library path', '') ) # end of opts.AddOptions() return localopts |