Compare commits
20 Commits
GPU_data_r
...
blender2.4
Author | SHA1 | Date | |
---|---|---|---|
ea6fd84d6d | |||
ea1eca85a5 | |||
0f1eea37f3 | |||
422cc6ac3f | |||
470f124e89 | |||
2662d36a50 | |||
8c6243b508 | |||
e22aab98d5 | |||
330dbe577b | |||
5d7e15b80d | |||
ec2db89d1d | |||
9927b361bd | |||
f0b048bf3c | |||
5a70fc9045 | |||
![]() |
06f515e15e | ||
a5e5a05fc2 | |||
b7863917b7 | |||
9a1cb75d01 | |||
43fc13ed34 | |||
c9fcaff607 |
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"project_id" : "Blender",
|
||||
"conduit_uri" : "https://developer.blender.org/",
|
||||
"git.default-relative-commit" : "origin/master",
|
||||
"arc.land.update.default" : "rebase"
|
||||
}
|
34
.gitignore
vendored
34
.gitignore
vendored
@@ -1,34 +0,0 @@
|
||||
# generic files to ignore
|
||||
.*
|
||||
|
||||
# python temp paths
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
||||
# editors
|
||||
*~
|
||||
*.swp
|
||||
*.swo
|
||||
*#
|
||||
|
||||
# QtCreator
|
||||
CMakeLists.txt.user
|
||||
|
||||
# ms-windows
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
Desktop.ini
|
||||
|
||||
# commonly used paths in blender
|
||||
/blender.bin
|
||||
/user-config.py
|
||||
|
||||
# local patches
|
||||
/*.patch
|
||||
/*.diff
|
||||
|
||||
# in-source doc-gen
|
||||
/doc/doxygen/html/
|
||||
/doc/python_api/sphinx-in-tmp/
|
||||
/doc/python_api/sphinx-in/
|
||||
/doc/python_api/sphinx-out/
|
16
.gitmodules
vendored
16
.gitmodules
vendored
@@ -1,16 +0,0 @@
|
||||
[submodule "release/scripts/addons"]
|
||||
path = release/scripts/addons
|
||||
url = ../blender-addons.git
|
||||
ignore = all
|
||||
[submodule "release/scripts/addons_contrib"]
|
||||
path = release/scripts/addons_contrib
|
||||
url = ../blender-addons-contrib.git
|
||||
ignore = all
|
||||
[submodule "release/datafiles/locale"]
|
||||
path = release/datafiles/locale
|
||||
url = ../blender-translations.git
|
||||
ignore = all
|
||||
[submodule "scons"]
|
||||
path = scons
|
||||
url = ../scons.git
|
||||
ignore = all
|
106
CMake/macros.cmake
Normal file
106
CMake/macros.cmake
Normal file
@@ -0,0 +1,106 @@
|
||||
MACRO(BLENDERLIB_NOLIST
|
||||
name
|
||||
sources
|
||||
includes)
|
||||
|
||||
# Gather all headers
|
||||
FILE(GLOB_RECURSE INC_ALL *.h)
|
||||
|
||||
INCLUDE_DIRECTORIES(${includes})
|
||||
ADD_LIBRARY(${name} ${INC_ALL} ${sources})
|
||||
|
||||
# Group by location on disk
|
||||
SOURCE_GROUP(Files FILES CMakeLists.txt)
|
||||
SET(ALL_FILES ${sources} ${INC_ALL})
|
||||
FOREACH(SRC ${ALL_FILES})
|
||||
STRING(REGEX REPLACE ${CMAKE_CURRENT_SOURCE_DIR} "Files" REL_DIR "${SRC}")
|
||||
STRING(REGEX REPLACE "[\\\\/][^\\\\/]*$" "" REL_DIR "${REL_DIR}")
|
||||
STRING(REGEX REPLACE "^[\\\\/]" "" REL_DIR "${REL_DIR}")
|
||||
IF(REL_DIR)
|
||||
SOURCE_GROUP(${REL_DIR} FILES ${SRC})
|
||||
ELSE(REL_DIR)
|
||||
SOURCE_GROUP(Files FILES ${SRC})
|
||||
ENDIF(REL_DIR)
|
||||
ENDFOREACH(SRC)
|
||||
|
||||
MESSAGE(STATUS "Configuring library ${name}")
|
||||
ENDMACRO(BLENDERLIB_NOLIST)
|
||||
|
||||
MACRO(BLENDERLIB
|
||||
name
|
||||
sources
|
||||
includes)
|
||||
|
||||
BLENDERLIB_NOLIST(${name} "${sources}" "${includes}")
|
||||
|
||||
# Add to blender's list of libraries
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt "${name};")
|
||||
ENDMACRO(BLENDERLIB)
|
||||
|
||||
MACRO(SETUP_LIBDIRS)
|
||||
# see "cmake --help-policy CMP0003"
|
||||
if(COMMAND cmake_policy)
|
||||
CMAKE_POLICY(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
LINK_DIRECTORIES(${PYTHON_LIBPATH} ${SDL_LIBPATH} ${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${ICONV_LIBPATH} ${OPENEXR_LIBPATH} ${QUICKTIME_LIBPATH} ${FFMPEG_LIBPATH})
|
||||
IF(WITH_INTERNATIONAL)
|
||||
LINK_DIRECTORIES(${GETTEXT_LIBPATH})
|
||||
LINK_DIRECTORIES(${FREETYPE_LIBPATH})
|
||||
ENDIF(WITH_INTERNATIONAL)
|
||||
IF(WITH_OPENAL)
|
||||
LINK_DIRECTORIES(${OPENAL_LIBPATH})
|
||||
ENDIF(WITH_OPENAL)
|
||||
|
||||
IF(WIN32)
|
||||
LINK_DIRECTORIES(${PTHREADS_LIBPATH})
|
||||
ENDIF(WIN32)
|
||||
ENDMACRO(SETUP_LIBDIRS)
|
||||
|
||||
MACRO(SETUP_LIBLINKS
|
||||
target)
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ")
|
||||
#TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LIB} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS})
|
||||
|
||||
# since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
|
||||
|
||||
IF(WIN32)
|
||||
|
||||
TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d)
|
||||
|
||||
TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB})
|
||||
|
||||
ELSE(WIN32)
|
||||
|
||||
TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB})
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(WITH_INTERNATIONAL)
|
||||
TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIB})
|
||||
TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB})
|
||||
ENDIF(WITH_INTERNATIONAL)
|
||||
IF(WITH_OPENAL)
|
||||
TARGET_LINK_LIBRARIES(${target} ${OPENAL_LIB})
|
||||
ENDIF(WITH_OPENAL)
|
||||
IF(WIN32)
|
||||
TARGET_LINK_LIBRARIES(${target} ${ICONV_LIB})
|
||||
ENDIF(WIN32)
|
||||
IF(WITH_QUICKTIME)
|
||||
TARGET_LINK_LIBRARIES(${target} ${QUICKTIME_LIB})
|
||||
ENDIF(WITH_QUICKTIME)
|
||||
IF(WITH_OPENEXR)
|
||||
TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB})
|
||||
ENDIF(WITH_OPENEXR)
|
||||
IF(WITH_FFMPEG)
|
||||
TARGET_LINK_LIBRARIES(${target} ${FFMPEG_LIB})
|
||||
ENDIF(WITH_FFMPEG)
|
||||
IF(WIN32)
|
||||
TARGET_LINK_LIBRARIES(${target} ${PTHREADS_LIB})
|
||||
ENDIF(WIN32)
|
||||
IF(UNIX AND NOT APPLE)
|
||||
TARGET_LINK_LIBRARIES(${target} ${CMAKE_DL_LIBS})
|
||||
TARGET_LINK_LIBRARIES(${target} ${X11_X11_LIB})
|
||||
ENDIF(UNIX AND NOT APPLE)
|
||||
ENDMACRO(SETUP_LIBLINKS)
|
3208
CMakeLists.txt
3208
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
14
COPYING
14
COPYING
@@ -1,11 +1,3 @@
|
||||
Blender uses the GNU General Public License, which describes the rights
|
||||
to distribute or change the code.
|
||||
|
||||
Please read this file for the full license.
|
||||
doc/license/GPL-license.txt
|
||||
|
||||
Apart from the GNU GPL, Blender is not available under other licenses.
|
||||
|
||||
2010, Blender Foundation
|
||||
foundation@blender.org
|
||||
|
||||
Please read over both of the following files:
|
||||
doc/GPL-license.txt
|
||||
doc/BL-license.txt
|
||||
|
425
GNUmakefile
425
GNUmakefile
@@ -1,425 +0,0 @@
|
||||
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
|
||||
# vim: tabstop=4
|
||||
#
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# This Makefile does an out-of-source CMake build in ../build_`OS`_`CPU`
|
||||
# eg:
|
||||
# ../build_linux_i386
|
||||
# This is for users who like to configure & build blender with a single command.
|
||||
|
||||
|
||||
# System Vars
|
||||
OS:=$(shell uname -s)
|
||||
OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]')
|
||||
# CPU:=$(shell uname -m) # UNUSED
|
||||
|
||||
|
||||
# Source and Build DIR's
|
||||
BLENDER_DIR:=$(shell pwd -P)
|
||||
BUILD_TYPE:=Release
|
||||
|
||||
ifndef BUILD_CMAKE_ARGS
|
||||
BUILD_CMAKE_ARGS:=
|
||||
endif
|
||||
|
||||
ifndef BUILD_DIR
|
||||
BUILD_DIR:=$(shell dirname "$(BLENDER_DIR)")/build_$(OS_NCASE)
|
||||
endif
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# additional targets for the build configuration
|
||||
|
||||
# support 'make debug'
|
||||
ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_debug
|
||||
BUILD_TYPE:=Debug
|
||||
endif
|
||||
ifneq "$(findstring full, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_full
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_full.cmake"
|
||||
endif
|
||||
ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_lite
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake"
|
||||
endif
|
||||
ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_cycles
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake"
|
||||
endif
|
||||
ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_headless
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake"
|
||||
endif
|
||||
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_bpy
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake"
|
||||
endif
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Get the number of cores for threaded build
|
||||
NPROCS:=1
|
||||
ifeq ($(OS), Linux)
|
||||
NPROCS:=$(shell nproc)
|
||||
endif
|
||||
ifeq ($(OS), Darwin)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
|
||||
endif
|
||||
ifeq ($(OS), FreeBSD)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
|
||||
endif
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Macro for configuring cmake
|
||||
|
||||
CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
|
||||
-H"$(BLENDER_DIR)" \
|
||||
-B"$(BUILD_DIR)" \
|
||||
-DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Tool for 'make config'
|
||||
|
||||
# X11 spesific
|
||||
ifdef DISPLAY
|
||||
CMAKE_CONFIG_TOOL = cmake-gui
|
||||
else
|
||||
CMAKE_CONFIG_TOOL = ccmake
|
||||
endif
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build Blender
|
||||
all: FORCE
|
||||
@echo
|
||||
@echo Configuring Blender ...
|
||||
|
||||
# if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
|
||||
# $(CMAKE_CONFIG); \
|
||||
# fi
|
||||
|
||||
# do this always incase of failed initial build, could be smarter here...
|
||||
$(CMAKE_CONFIG)
|
||||
|
||||
@echo
|
||||
@echo Building Blender ...
|
||||
$(MAKE) -C "$(BUILD_DIR)" -s -j $(NPROCS) install
|
||||
@echo
|
||||
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
|
||||
@echo blender installed, run from: "$(BUILD_DIR)/bin/blender"
|
||||
@echo
|
||||
|
||||
debug: all
|
||||
full: all
|
||||
lite: all
|
||||
cycles: all
|
||||
headless: all
|
||||
bpy: all
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Configuration (save some cd'ing around)
|
||||
config: FORCE
|
||||
$(CMAKE_CONFIG_TOOL) "$(BUILD_DIR)"
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Help for build targets
|
||||
help: FORCE
|
||||
@echo ""
|
||||
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
|
||||
@echo " * debug - build a debug binary"
|
||||
@echo " * full - enable all supported dependencies & options"
|
||||
@echo " * lite - disable non essential features for a smaller binary and faster build"
|
||||
@echo " * headless - build without an interface (renderfarm or server automation)"
|
||||
@echo " * cycles - build Cycles standalone only, without Blender"
|
||||
@echo " * bpy - build as a python module which can be loaded from python directly"
|
||||
@echo ""
|
||||
@echo " * config - run cmake configuration tool to set build options"
|
||||
@echo ""
|
||||
@echo " Note, passing the argument 'BUILD_DIR=path' when calling make will override the default build dir."
|
||||
@echo " Note, passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments."
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo "Project Files for IDE's"
|
||||
@echo " * project_qtcreator - QtCreator Project Files"
|
||||
@echo " * project_netbeans - NetBeans Project Files"
|
||||
@echo " * project_eclipse - Eclipse CDT4 Project Files"
|
||||
@echo ""
|
||||
@echo "Package Targets"
|
||||
@echo " * package_debian - build a debian package"
|
||||
@echo " * package_pacman - build an arch linux pacman package"
|
||||
@echo " * package_archive - build an archive package"
|
||||
@echo ""
|
||||
@echo "Testing Targets (not associated with building blender)"
|
||||
@echo " * test - run ctest, currently tests import/export, operator execution and that python modules load"
|
||||
@echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions"
|
||||
@echo " * test_pep8 - checks all python script are pep8 which are tagged to use the stricter formatting"
|
||||
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
|
||||
@echo " * test_style_c - checks C/C++ conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo " * test_style_c_qtc - same as test_style but outputs QtCreator tasks format"
|
||||
@echo " * test_style_osl - checks OpenShadingLanguage conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo " * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo ""
|
||||
@echo "Static Source Code Checking (not associated with building blender)"
|
||||
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
|
||||
@echo " * check_clang_array - run blender source through clang array checking script (C & C++)"
|
||||
@echo " * check_splint - run blenders source through splint (C only)"
|
||||
@echo " * check_sparse - run blenders source through sparse (C only)"
|
||||
@echo " * check_smatch - run blenders source through smatch (C only)"
|
||||
@echo " * check_spelling_c - check for spelling errors (C/C++ only)"
|
||||
@echo " * check_spelling_c_qtc - same as check_spelling_c but outputs QtCreator tasks format"
|
||||
@echo " * check_spelling_osl - check for spelling errors (OSL only)"
|
||||
@echo " * check_spelling_py - check for spelling errors (Python only)"
|
||||
@echo " * check_descriptions - check for duplicate/invalid descriptions"
|
||||
@echo ""
|
||||
@echo "Utilities (not associated with building blender)"
|
||||
@echo " * icons - updates PNG icons from SVG files."
|
||||
@echo " * tgz - create a compressed archive of the source code."
|
||||
@echo " * update - updates git and all submodules"
|
||||
@echo ""
|
||||
@echo "Documentation Targets (not associated with building blender)"
|
||||
@echo " * doc_py - generate sphinx python api docs"
|
||||
@echo " * doc_doxy - generate doxygen C/C++ docs"
|
||||
@echo " * doc_dna - generate blender file format reference"
|
||||
@echo " * doc_man - generate manpage"
|
||||
@echo ""
|
||||
@echo "Information"
|
||||
@echo " * help - this help message"
|
||||
@echo " * help_features - show a list of optional features when building"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Packages
|
||||
#
|
||||
package_debian: FORCE
|
||||
cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh
|
||||
|
||||
package_pacman: FORCE
|
||||
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg
|
||||
|
||||
package_archive: FORCE
|
||||
make -C "$(BUILD_DIR)" -s package_archive
|
||||
@echo archive in "$(BUILD_DIR)/release"
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Tests
|
||||
#
|
||||
test: FORCE
|
||||
cd $(BUILD_DIR) ; ctest . --output-on-failure
|
||||
|
||||
# run pep8 check check on scripts we distribute.
|
||||
test_pep8: FORCE
|
||||
python3 tests/python/pep8.py > test_pep8.log 2>&1
|
||||
@echo "written: test_pep8.log"
|
||||
|
||||
# run some checks on our cmakefiles.
|
||||
test_cmake: FORCE
|
||||
python3 build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
|
||||
@echo "written: test_cmake_consistency.log"
|
||||
|
||||
# run deprecation tests, see if we have anything to remove.
|
||||
test_deprecated: FORCE
|
||||
python3 tests/check_deprecated.py
|
||||
|
||||
test_style_c: FORCE
|
||||
# run our own checks on C/C++ style
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||
"$(BLENDER_DIR)/source/blender" \
|
||||
"$(BLENDER_DIR)/source/creator" \
|
||||
--no-length-check
|
||||
|
||||
test_style_c_qtc: FORCE
|
||||
# run our own checks on C/C++ style
|
||||
USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||
"$(BLENDER_DIR)/source/blender" \
|
||||
"$(BLENDER_DIR)/source/creator" \
|
||||
--no-length-check \
|
||||
> \
|
||||
"$(BLENDER_DIR)/test_style.tasks"
|
||||
@echo "written: test_style.tasks"
|
||||
|
||||
|
||||
test_style_osl: FORCE
|
||||
# run our own checks on C/C++ style
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
|
||||
"$(BLENDER_DIR)/release/scripts/templates_osl"
|
||||
|
||||
|
||||
test_style_osl_qtc: FORCE
|
||||
# run our own checks on C/C++ style
|
||||
USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
|
||||
"$(BLENDER_DIR)/release/scripts/templates_osl" \
|
||||
> \
|
||||
"$(BLENDER_DIR)/test_style.tasks"
|
||||
@echo "written: test_style.tasks"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Project Files
|
||||
#
|
||||
|
||||
project_qtcreator: FORCE
|
||||
python3 build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
|
||||
|
||||
project_netbeans: FORCE
|
||||
python3 build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
|
||||
|
||||
project_eclipse: FORCE
|
||||
cmake -G"Eclipse CDT4 - Unix Makefiles" -H"$(BLENDER_DIR)" -B"$(BUILD_DIR)"
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Static Checking
|
||||
#
|
||||
|
||||
check_cppcheck: FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
|
||||
"$(BLENDER_DIR)/check_cppcheck.txt"
|
||||
@echo "written: check_cppcheck.txt"
|
||||
|
||||
check_clang_array: FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
|
||||
|
||||
check_splint: FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
|
||||
|
||||
check_sparse: FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
|
||||
|
||||
check_smatch: FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
|
||||
|
||||
check_spelling_py: FORCE
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/release/scripts"
|
||||
|
||||
check_spelling_c: FORCE
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/source" \
|
||||
"$(BLENDER_DIR)/intern/cycles" \
|
||||
"$(BLENDER_DIR)/intern/guardedalloc" \
|
||||
"$(BLENDER_DIR)/intern/ghost" \
|
||||
|
||||
check_spelling_c_qtc: FORCE
|
||||
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/source" \
|
||||
"$(BLENDER_DIR)/intern/cycles" \
|
||||
"$(BLENDER_DIR)/intern/guardedalloc" \
|
||||
"$(BLENDER_DIR)/intern/ghost" \
|
||||
> \
|
||||
"$(BLENDER_DIR)/check_spelling_c.tasks"
|
||||
|
||||
check_spelling_osl: FORCE
|
||||
cd "$(BUILD_DIR)" ;\
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
|
||||
|
||||
check_descriptions: FORCE
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Utilities
|
||||
#
|
||||
|
||||
tgz: FORCE
|
||||
./build_files/utils/build_tgz.sh
|
||||
|
||||
icons: FORCE
|
||||
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
|
||||
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
|
||||
|
||||
update: FORCE
|
||||
if [ -d "../lib" ]; then \
|
||||
svn update ../lib/* ; \
|
||||
fi
|
||||
git pull --rebase
|
||||
git submodule foreach git pull --rebase origin master
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Documentation
|
||||
#
|
||||
|
||||
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
|
||||
doc_py: FORCE
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python doc/python_api/sphinx_doc_gen.py
|
||||
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
|
||||
|
||||
doc_doxy: FORCE
|
||||
cd doc/doxygen; doxygen Doxyfile
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
|
||||
|
||||
doc_dna: FORCE
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python doc/blender_file_format/BlendFileDnaExporter_25.py
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
|
||||
|
||||
doc_man: FORCE
|
||||
python3 doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
|
||||
|
||||
help_features: FORCE
|
||||
@python3 -c \
|
||||
"import re; \
|
||||
print('\n'.join([ \
|
||||
w for l in open('"$(BLENDER_DIR)"/CMakeLists.txt', 'r').readlines() \
|
||||
if not l.lstrip().startswith('#') \
|
||||
for w in (re.sub(\
|
||||
r'.*\boption\s*\(\s*(WITH_[a-zA-Z0-9_]+)\s+(\".*\")\s*.*', r'\g<1> - \g<2>', l).strip('() \n'),) \
|
||||
if w.startswith('WITH_')]))" | uniq
|
||||
|
||||
|
||||
clean: FORCE
|
||||
$(MAKE) -C "$(BUILD_DIR)" clean
|
||||
|
||||
.PHONY: all
|
||||
|
||||
FORCE:
|
60
Makefile
Normal file
60
Makefile
Normal file
@@ -0,0 +1,60 @@
|
||||
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
|
||||
# vim: tabstop=8
|
||||
# $Id$
|
||||
#
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2002 by Wouter van Heyst
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: revision 1.1
|
||||
#
|
||||
# Contributor(s): Hans Lambermont
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
#
|
||||
# Toplevel Makefile for blender. Bounces make to subdirectories.
|
||||
# Available targets: 'all' 'debug' 'release'
|
||||
|
||||
# If the user wants to override some of the build
|
||||
# vars they can put it in the file user-def.mk which
|
||||
# will get included if it exists (please do not commit
|
||||
# user-def.mk to the revision control server).
|
||||
sinclude user-def.mk
|
||||
|
||||
# To build without openAL, set it as an environment variable,
|
||||
# or put it uncommented in user-def.mk:
|
||||
# export NAN_NO_OPENAL=true
|
||||
|
||||
export NANBLENDERHOME=$(shell pwd)
|
||||
MAKEFLAGS=-I$(NANBLENDERHOME)/source --no-print-directory
|
||||
|
||||
SOURCEDIR =
|
||||
ifeq ($(FREE_WINDOWS),true)
|
||||
DIRS ?= dlltool extern intern source po
|
||||
else
|
||||
DIRS ?= extern intern source po
|
||||
endif
|
||||
|
||||
include source/nan_subdirs.mk
|
||||
|
||||
.PHONY: release
|
||||
release:
|
||||
@echo "====> $(MAKE) $@ in $(SOURCEDIR)/$@" ;\
|
||||
$(MAKE) -C $@ $@ || exit 1;
|
||||
|
||||
|
45
README
Normal file
45
README
Normal file
@@ -0,0 +1,45 @@
|
||||
Welcome to the fun world of open source.
|
||||
|
||||
For instructions on building and installing Blender, please see the file named
|
||||
INSTALL.
|
||||
|
||||
|
||||
---------------------.Blanguages and the .blender directory---------------------
|
||||
|
||||
The .blender directory holds various data files for Blender.
|
||||
In the 2.28a release those are the .Blanguages file containing a list of
|
||||
translations, the translations themselves and a default ttf font.
|
||||
|
||||
Blender checks for the presence of this directory in several locations:
|
||||
- the current directory
|
||||
- your home directory
|
||||
- On OSX, the blender bundle is also checked
|
||||
- On Windows, the installation dir is checked.
|
||||
|
||||
If you get a 'File ".Blanguages" not found' warning, try to copy the .blender
|
||||
dir to one of these locations (your home directory being recommended).
|
||||
|
||||
|
||||
|
||||
-------------------------------------Links--------------------------------------
|
||||
|
||||
Getting Involved:
|
||||
http://www.blender.org/community/get-involved
|
||||
|
||||
Community:
|
||||
http://www.blender.org/Community
|
||||
|
||||
Main blender development site:
|
||||
http://www.blender.org
|
||||
|
||||
The Blender project homepage:
|
||||
http://projects.blender.org/projects/bf-blender
|
||||
|
||||
Documentation:
|
||||
http://www.blender.org/education-help
|
||||
|
||||
Bug tracker:
|
||||
http://www.blender.org/development/report-a-bug
|
||||
|
||||
Feature request tracker:
|
||||
http://wiki.blender.org/index.php/Requests
|
1517
SConstruct
1517
SConstruct
File diff suppressed because it is too large
Load Diff
23
bin/.blender/.Blanguages
Normal file
23
bin/.blender/.Blanguages
Normal file
@@ -0,0 +1,23 @@
|
||||
English:en_US
|
||||
Japanese:ja_JP
|
||||
Dutch:nl_NL
|
||||
Italian:it_IT
|
||||
German:de_DE
|
||||
Finnish:fi_FI
|
||||
Swedish:sv_SE
|
||||
French:fr_FR
|
||||
Spanish:es_ES
|
||||
Catalan:ca_ES
|
||||
Czech:cs_CZ
|
||||
Brazilian Portuguese:pt_BR
|
||||
Simplified Chinese:zh_CN
|
||||
Russian:ru_RU
|
||||
Croatian:hr_HR
|
||||
Serbian:sr
|
||||
Ukrainian:uk_UA
|
||||
Polish:pl_PL
|
||||
Romanian:ro
|
||||
Arabic:ar
|
||||
Bulgarian:bg
|
||||
Greek:el
|
||||
Korean:ko
|
BIN
bin/.blender/.bfont.ttf
Normal file
BIN
bin/.blender/.bfont.ttf
Normal file
Binary file not shown.
135
blenderplayer/CMakeLists.txt
Normal file
135
blenderplayer/CMakeLists.txt
Normal file
@@ -0,0 +1,135 @@
|
||||
# $Id$
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2006, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): Jacques Beaurain.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
MESSAGE(STATUS "Configuring blenderplayer")
|
||||
|
||||
SETUP_LIBDIRS()
|
||||
|
||||
IF(WITH_QUICKTIME)
|
||||
ADD_DEFINITIONS(-DWITH_QUICKTIME)
|
||||
ENDIF(WITH_QUICKTIME)
|
||||
|
||||
IF(LINUX)
|
||||
ADD_DEFINITIONS(-DWITH_BINRELOC)
|
||||
INCLUDE_DIRECTORIES(${BINRELOC_INC})
|
||||
endif(LINUX)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
|
||||
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
|
||||
DEPENDS ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna
|
||||
)
|
||||
|
||||
IF(WIN32)
|
||||
ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../source/icons/winblender.rc)
|
||||
ELSE(WIN32)
|
||||
ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
|
||||
ENDIF(WIN32)
|
||||
|
||||
ADD_DEPENDENCIES(blenderplayer makesdna)
|
||||
|
||||
FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
|
||||
|
||||
SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} gp_common gp_ghost blenkernel_blc)
|
||||
|
||||
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
|
||||
gp_ghost
|
||||
gp_common
|
||||
bf_string
|
||||
bf_ghost
|
||||
bf_blenkernel
|
||||
verse
|
||||
bf_blenkernel
|
||||
bf_blenloader
|
||||
bf_blenpluginapi
|
||||
bf_blroutines
|
||||
bf_converter
|
||||
bf_sumo
|
||||
bf_ketsji
|
||||
extern_solid
|
||||
extern_qhull
|
||||
bf_bullet
|
||||
bf_common
|
||||
bf_dummy
|
||||
bf_logic
|
||||
bf_rasterizer
|
||||
bf_oglrasterizer
|
||||
bf_expressions
|
||||
bf_scenegraph
|
||||
bf_IK
|
||||
bf_moto
|
||||
bf_soundsystem
|
||||
bf_kernel
|
||||
bf_nodes
|
||||
bf_gpu
|
||||
bf_imbuf
|
||||
bf_avi
|
||||
kx_network
|
||||
bf_ngnetwork
|
||||
bf_loopbacknetwork
|
||||
extern_bullet
|
||||
bf_guardedalloc
|
||||
bf_memutil
|
||||
bf_bmfont
|
||||
bf_blenlib
|
||||
bf_cineon
|
||||
bf_openexr
|
||||
extern_libopenjpeg
|
||||
bf_dds
|
||||
bf_ftfont
|
||||
extern_ftgl
|
||||
bf_readblenfile
|
||||
blenkernel_blc
|
||||
bf_quicktime
|
||||
extern_binreloc
|
||||
extern_glew
|
||||
)
|
||||
|
||||
FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
|
||||
SET(REMLIB ${SORTLIB})
|
||||
FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
|
||||
IF(${SEARCHLIB} STREQUAL ${SORTLIB})
|
||||
SET(REMLIB "")
|
||||
ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
|
||||
ENDFOREACH(SEARCHLIB)
|
||||
IF(REMLIB)
|
||||
MESSAGE(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured")
|
||||
LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
|
||||
ENDIF(REMLIB)
|
||||
ENDFOREACH(SORTLIB)
|
||||
|
||||
TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_SORTED_LIBS})
|
||||
ELSE(UNIX)
|
||||
TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS})
|
||||
ENDIF(UNIX)
|
||||
|
||||
SETUP_LIBLINKS(blenderplayer)
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
||||
BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
|
||||
BF_NUMJOBS = 1
|
||||
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
@@ -1,5 +0,0 @@
|
||||
BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
|
||||
BF_NUMJOBS = 1
|
||||
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
@@ -1,176 +0,0 @@
|
||||
BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
|
||||
BF_NUMJOBS = 4
|
||||
WITHOUT_BF_OVERWRITE_INSTALL = True
|
||||
|
||||
# Python configuration
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_ABI_FLAGS = 'm'
|
||||
BF_PYTHON = '/opt/lib/python-3.4'
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_PYTHON_INSTALL_REQUESTS = True
|
||||
|
||||
WITH_BF_STATICPYTHON = True
|
||||
|
||||
# OpenCollada configuration
|
||||
WITH_BF_COLLADA = True
|
||||
WITH_BF_STATICOPENCOLLADA=True
|
||||
BF_OPENCOLLADA = '/opt/lib/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
|
||||
BF_OPENCOLLADA_LIB_STATIC = '${BF_OPENCOLLADA}/lib/libOpenCOLLADAStreamWriter.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADASaxFrameworkLoader.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADAFramework.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADABaseUtils.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libGeneratedSaxParser.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libbuffer.a ${BF_OPENCOLLADA}/lib/libftoa.a ' + \
|
||||
'/usr/lib/libxml2.a /usr/lib/libexpat.a /usr/lib/libpcre.a'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
|
||||
BF_PCRE_LIB = ''
|
||||
BF_EXPAT_LIB = ''
|
||||
|
||||
# FFMPEG configuration
|
||||
WITH_BF_FFMPEG = True
|
||||
WITH_BF_STATICFFMPEG = True
|
||||
|
||||
BF_FFMPEG = '/opt/lib/ffmpeg'
|
||||
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libavfilter.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libswresample.a ' + \
|
||||
'/usr/lib/libxvidcore.a /usr/lib/libx264.a /usr/lib/libmp3lame.a /usr/lib/libvpx.a /usr/lib/libvorbis.a ' + \
|
||||
'/usr/lib/libogg.a /usr/lib/libvorbisenc.a /usr/lib/libtheora.a /usr/lib/libschroedinger-1.0.a ' + \
|
||||
'/usr/lib/liborc-0.4.a'
|
||||
|
||||
# Don't depend on system's libstdc++
|
||||
WITH_BF_STATICCXX = True
|
||||
BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7.1/libstdc++.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
WITH_BF_FREETYPE_STATIC = False
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
BF_OPENEXR = '/opt/lib/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
WITH_BF_STATICOPENEXR = True
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
WITH_BF_STATICTIFF = True
|
||||
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
WITH_BF_STATICJPEG = True
|
||||
BF_JPEG_LIB_STATIC= '${BF_JPEG}/lib/libjpeg.a'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
WITH_BF_STATICPNG = True
|
||||
BF_PNG_LIB_STATIC = '${BF_PNG}/lib/libpng.a'
|
||||
|
||||
WITH_BF_STATICLIBSAMPLERATE = True
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
WITH_BF_STATICOPENMP = True
|
||||
BF_OPENMP_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7/libgomp.a'
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_BULLET = True
|
||||
|
||||
# Blender player (would be enabled in it's own config)
|
||||
WITH_BF_PLAYER = False
|
||||
|
||||
# Use jemalloc memory manager
|
||||
WITH_BF_JEMALLOC = True
|
||||
WITH_BF_STATICJEMALLOC = True
|
||||
BF_JEMALLOC = '/opt/lib/jemalloc'
|
||||
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
|
||||
|
||||
# Use 3d mouse library
|
||||
WITH_BF_3DMOUSE = True
|
||||
WITH_BF_STATIC3DMOUSE = True
|
||||
BF_3DMOUSE = '/opt/lib/libspnav'
|
||||
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
|
||||
|
||||
# FFT
|
||||
WITH_BF_FFTW3 = True
|
||||
WITH_BF_STATICFFTW3 = True
|
||||
|
||||
# JACK
|
||||
WITH_BF_JACK = True
|
||||
WITH_BF_JACK_DYNLOAD = True
|
||||
|
||||
# Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
WITH_BF_STATICOIIO = True
|
||||
BF_OIIO = '/opt/lib/oiio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
BF_IS_NEW_OSL = False
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
WITH_BF_STATICOSL = BF_IS_NEW_OSL
|
||||
BF_OSL = '/opt/lib/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
# note oslexec would passed via program linkflags, which is needed to
|
||||
# make llvm happy with osl_allocate_closure_component
|
||||
BF_OSL_LIB = 'oslcomp oslexec oslquery'
|
||||
BF_OSL_LIB_STATIC = '${BF_OSL}/lib/liboslcomp.a ${BF_OSL}/lib/liboslexec.a ${BF_OSL}/lib/liboslquery.a'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
WITH_BF_STATICLLVM = False
|
||||
BF_LLVM = '/opt/lib/llvm-3.4.2'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMObject LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
# Color management
|
||||
WITH_BF_OCIO = True
|
||||
WITH_BF_STATICOCIO = True
|
||||
BF_OCIO = '/opt/lib/ocio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
WITH_BF_STATICBOOST = True
|
||||
BF_BOOST = '/opt/lib/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
|
||||
${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_BOOST_LIB_STATIC += ' ${BF_BOOST_LIBPATH}/libboost_wave.a'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
# Ocean Simulation
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
# Compilation and optimization
|
||||
BF_DEBUG = False
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
|
||||
PLATFORM_LINKFLAGS = ['-lrt']
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--version-script=source/creator/blender.map']
|
||||
else:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
|
@@ -1,176 +0,0 @@
|
||||
BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
|
||||
BF_NUMJOBS = 4
|
||||
WITHOUT_BF_OVERWRITE_INSTALL = True
|
||||
|
||||
# Python configuration
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_ABI_FLAGS = 'm'
|
||||
BF_PYTHON = '/opt/lib/python-3.4'
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_PYTHON_INSTALL_REQUESTS = True
|
||||
|
||||
WITH_BF_STATICPYTHON = True
|
||||
|
||||
# OpenCollada configuration
|
||||
WITH_BF_COLLADA = True
|
||||
WITH_BF_STATICOPENCOLLADA=True
|
||||
BF_OPENCOLLADA = '/opt/lib/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
|
||||
BF_OPENCOLLADA_LIB_STATIC = '${BF_OPENCOLLADA}/lib/libOpenCOLLADAStreamWriter.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADASaxFrameworkLoader.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADAFramework.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADABaseUtils.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libGeneratedSaxParser.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libbuffer.a ${BF_OPENCOLLADA}/lib/libftoa.a ' + \
|
||||
'/usr/lib/libxml2.a /usr/lib/libexpat.a /usr/lib/libpcre.a'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
|
||||
BF_PCRE_LIB = ''
|
||||
BF_EXPAT_LIB = ''
|
||||
|
||||
# FFMPEG configuration
|
||||
WITH_BF_FFMPEG = True
|
||||
WITH_BF_STATICFFMPEG = True
|
||||
|
||||
BF_FFMPEG = '/opt/lib/ffmpeg'
|
||||
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libavfilter.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libswresample.a ' + \
|
||||
'/usr/lib/libxvidcore.a /usr/lib/libx264.a /usr/lib/libmp3lame.a /usr/lib/libvpx.a /usr/lib/libvorbis.a ' + \
|
||||
'/usr/lib/libogg.a /usr/lib/libvorbisenc.a /usr/lib/libtheora.a /usr/lib/libschroedinger-1.0.a ' + \
|
||||
'/usr/lib/liborc-0.4.a'
|
||||
|
||||
# Don't depend on system's libstdc++
|
||||
WITH_BF_STATICCXX = True
|
||||
BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7.1/libstdc++.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
WITH_BF_FREETYPE_STATIC = False
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
BF_OPENEXR = '/opt/lib/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
WITH_BF_STATICOPENEXR = True
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
WITH_BF_STATICTIFF = True
|
||||
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
WITH_BF_STATICJPEG = True
|
||||
BF_JPEG_LIB_STATIC= '${BF_JPEG}/lib/libjpeg.a'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
WITH_BF_STATICPNG = True
|
||||
BF_PNG_LIB_STATIC = '${BF_PNG}/lib/libpng.a'
|
||||
|
||||
WITH_BF_STATICLIBSAMPLERATE = True
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
WITH_BF_STATICOPENMP = True
|
||||
BF_OPENMP_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7/libgomp.a'
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_BULLET = True
|
||||
|
||||
# Blender player (would be enabled in it's own config)
|
||||
WITH_BF_PLAYER = False
|
||||
|
||||
# Use jemalloc memory manager
|
||||
WITH_BF_JEMALLOC = True
|
||||
WITH_BF_STATICJEMALLOC = True
|
||||
BF_JEMALLOC = '/opt/lib/jemalloc'
|
||||
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
|
||||
|
||||
# Use 3d mouse library
|
||||
WITH_BF_3DMOUSE = True
|
||||
WITH_BF_STATIC3DMOUSE = True
|
||||
BF_3DMOUSE = '/opt/lib/libspnav'
|
||||
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
|
||||
|
||||
# FFT
|
||||
WITH_BF_FFTW3 = True
|
||||
WITH_BF_STATICFFTW3 = True
|
||||
|
||||
# JACK
|
||||
WITH_BF_JACK = True
|
||||
WITH_BF_JACK_DYNLOAD = True
|
||||
|
||||
# Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
WITH_BF_STATICOIIO = True
|
||||
BF_OIIO = '/opt/lib/oiio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
BF_IS_NEW_OSL = False
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
WITH_BF_STATICOSL = BF_IS_NEW_OSL
|
||||
BF_OSL = '/opt/lib/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
# note oslexec would passed via program linkflags, which is needed to
|
||||
# make llvm happy with osl_allocate_closure_component
|
||||
BF_OSL_LIB = 'oslcomp oslexec oslquery'
|
||||
BF_OSL_LIB_STATIC = '${BF_OSL}/lib/liboslcomp.a ${BF_OSL}/lib/liboslexec.a ${BF_OSL}/lib/liboslquery.a'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
WITH_BF_STATICLLVM = False
|
||||
BF_LLVM = '/opt/lib/llvm-3.4.2'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMObject LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
# Color management
|
||||
WITH_BF_OCIO = True
|
||||
WITH_BF_STATICOCIO = True
|
||||
BF_OCIO = '/opt/lib/ocio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
WITH_BF_STATICBOOST = True
|
||||
BF_BOOST = '/opt/lib/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
|
||||
${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_BOOST_LIB_STATIC += ' ${BF_BOOST_LIBPATH}/libboost_wave.a'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
# Ocean Simulation
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
# Compilation and optimization
|
||||
BF_DEBUG = False
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
|
||||
PLATFORM_LINKFLAGS = ['-lrt']
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--version-script=source/creator/blender.map']
|
||||
else:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
|
@@ -1,9 +0,0 @@
|
||||
|
||||
MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = True
|
||||
|
||||
WITH_BF_CYCLES_OSL = False # OSL never worked on OSX 32bit !
|
||||
|
||||
WITH_BF_COLLADA = False # we drop 32bit, newest collada is only x86_64 !
|
||||
|
@@ -1,6 +0,0 @@
|
||||
CC = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang"
|
||||
CXX = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang++"
|
||||
|
||||
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = True
|
@@ -1,126 +0,0 @@
|
||||
BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
|
||||
BF_NUMJOBS = 4
|
||||
|
||||
# Python configuration
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_ABI_FLAGS = 'm'
|
||||
BF_PYTHON = '/opt/lib/python-3.4'
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_PYTHON_INSTALL_REQUESTS = True
|
||||
|
||||
WITH_BF_STATICPYTHON = True
|
||||
|
||||
# OpenCollada configuration
|
||||
WITH_BF_COLLADA = False
|
||||
|
||||
# FFMPEG configuration
|
||||
WITH_BF_FFMPEG = True
|
||||
WITH_BF_STATICFFMPEG = True
|
||||
|
||||
BF_FFMPEG = '/opt/lib/ffmpeg'
|
||||
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libavfilter.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libswresample.a ' + \
|
||||
'/usr/lib/libxvidcore.a /usr/lib/libx264.a /usr/lib/libmp3lame.a /usr/lib/libvpx.a /usr/lib/libvorbis.a ' + \
|
||||
'/usr/lib/libogg.a /usr/lib/libvorbisenc.a /usr/lib/libtheora.a /usr/lib/libschroedinger-1.0.a ' + \
|
||||
'/usr/lib/liborc-0.4.a'
|
||||
|
||||
# Don't depend on system's libstdc++
|
||||
WITH_BF_STATICCXX = True
|
||||
BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7.1/libstdc++.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
WITH_BF_FREETYPE_STATIC = False
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
BF_OPENEXR = '/opt/lib/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
WITH_BF_STATICOPENEXR = True
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
WITH_BF_STATICTIFF = True
|
||||
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
WITH_BF_STATICJPEG = True
|
||||
BF_JPEG_LIB_STATIC= '${BF_JPEG}/lib/libjpeg.a'
|
||||
|
||||
WITH_BF_STATICLIBSAMPLERATE = True
|
||||
|
||||
WITH_BF_PNG = True
|
||||
WITH_BF_STATICPNG = True
|
||||
BF_PNG_LIB_STATIC = '${BF_PNG}/lib/libpng.a'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = False
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
WITH_BF_STATICOPENMP = True
|
||||
BF_OPENMP_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7/libgomp.a'
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_BULLET = True
|
||||
|
||||
# Do not build blender when building blenderplayer
|
||||
WITH_BF_NOBLENDER = True
|
||||
WITH_BF_PLAYER = True
|
||||
|
||||
# Use jemalloc memory manager
|
||||
WITH_BF_JEMALLOC = True
|
||||
WITH_BF_STATICJEMALLOC = True
|
||||
BF_JEMALLOC = '/opt/lib/jemalloc'
|
||||
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
|
||||
|
||||
# Use 3d mouse library
|
||||
WITH_BF_3DMOUSE = True
|
||||
WITH_BF_STATIC3DMOUSE = True
|
||||
BF_3DMOUSE = '/opt/lib/libspnav'
|
||||
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
|
||||
|
||||
# Color management
|
||||
WITH_BF_OCIO = True
|
||||
WITH_BF_STATICOCIO = True
|
||||
BF_OCIO = '/opt/lib/ocio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
WITH_BF_STATICBOOST = True
|
||||
BF_BOOST = '/opt/lib/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
|
||||
${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
# JACK
|
||||
WITH_BF_JACK = True
|
||||
WITH_BF_JACK_DYNLOAD = True
|
||||
|
||||
# Motion Tracking
|
||||
WITH_BF_LIBMV = False
|
||||
|
||||
# Ocean Simulation
|
||||
WITH_BF_FFTW3 = True
|
||||
WITH_BF_STATICFFTW3 = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
# Compilation and optimization
|
||||
BF_DEBUG = False
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
|
||||
PLATFORM_LINKFLAGS = ['-lrt']
|
@@ -1,126 +0,0 @@
|
||||
BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
|
||||
BF_NUMJOBS = 4
|
||||
|
||||
# Python configuration
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_ABI_FLAGS = 'm'
|
||||
BF_PYTHON = '/opt/lib/python-3.4'
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_PYTHON_INSTALL_REQUESTS = True
|
||||
|
||||
WITH_BF_STATICPYTHON = True
|
||||
|
||||
# OpenCollada configuration
|
||||
WITH_BF_COLLADA = False
|
||||
|
||||
# FFMPEG configuration
|
||||
WITH_BF_FFMPEG = True
|
||||
WITH_BF_STATICFFMPEG = True
|
||||
|
||||
BF_FFMPEG = '/opt/lib/ffmpeg'
|
||||
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libavfilter.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libswresample.a ' + \
|
||||
'/usr/lib/libxvidcore.a /usr/lib/libx264.a /usr/lib/libmp3lame.a /usr/lib/libvpx.a /usr/lib/libvorbis.a ' + \
|
||||
'/usr/lib/libogg.a /usr/lib/libvorbisenc.a /usr/lib/libtheora.a /usr/lib/libschroedinger-1.0.a ' + \
|
||||
'/usr/lib/liborc-0.4.a'
|
||||
|
||||
# Don't depend on system's libstdc++
|
||||
WITH_BF_STATICCXX = True
|
||||
BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7.1/libstdc++.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
WITH_BF_FREETYPE_STATIC = False
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
BF_OPENEXR = '/opt/lib/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
WITH_BF_STATICOPENEXR = True
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
WITH_BF_STATICTIFF = True
|
||||
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
WITH_BF_STATICJPEG = True
|
||||
BF_JPEG_LIB_STATIC= '${BF_JPEG}/lib/libjpeg.a'
|
||||
|
||||
WITH_BF_STATICLIBSAMPLERATE = True
|
||||
|
||||
WITH_BF_PNG = True
|
||||
WITH_BF_STATICPNG = True
|
||||
BF_PNG_LIB_STATIC = '${BF_PNG}/lib/libpng.a'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = False
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
WITH_BF_STATICOPENMP = True
|
||||
BF_OPENMP_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7/libgomp.a'
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_BULLET = True
|
||||
|
||||
# Do not build blender when building blenderplayer
|
||||
WITH_BF_NOBLENDER = True
|
||||
WITH_BF_PLAYER = True
|
||||
|
||||
# Use jemalloc memory manager
|
||||
WITH_BF_JEMALLOC = True
|
||||
WITH_BF_STATICJEMALLOC = True
|
||||
BF_JEMALLOC = '/opt/lib/jemalloc'
|
||||
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
|
||||
|
||||
# Use 3d mouse library
|
||||
WITH_BF_3DMOUSE = True
|
||||
WITH_BF_STATIC3DMOUSE = True
|
||||
BF_3DMOUSE = '/opt/lib/libspnav'
|
||||
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
|
||||
|
||||
# Color management
|
||||
WITH_BF_OCIO = True
|
||||
WITH_BF_STATICOCIO = True
|
||||
BF_OCIO = '/opt/lib/ocio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
WITH_BF_STATICBOOST = True
|
||||
BF_BOOST = '/opt/lib/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
|
||||
${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
# JACK
|
||||
WITH_BF_JACK = True
|
||||
WITH_BF_JACK_DYNLOAD = True
|
||||
|
||||
# Motion Tracking
|
||||
WITH_BF_LIBMV = False
|
||||
|
||||
# Ocean Simulation
|
||||
WITH_BF_FFTW3 = True
|
||||
WITH_BF_STATICFFTW3 = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
# Compilation and optimization
|
||||
BF_DEBUG = False
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
|
||||
PLATFORM_LINKFLAGS = ['-lrt']
|
@@ -1,372 +0,0 @@
|
||||
# -*- python -*-
|
||||
# ex: set syntax=python:
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# List of the branches being built automatically overnight
|
||||
NIGHT_SCHEDULE_BRANCHES = [None, "gooseberry"]
|
||||
|
||||
# List of the branches available for force build
|
||||
FORCE_SCHEDULE_BRANCHES = ["master", "gooseberry", "experimental-build"]
|
||||
|
||||
"""
|
||||
Stock Twisted directory lister doesn't provide any information about last file
|
||||
modification time, we hack the class a bit in order to have such functionaliity
|
||||
:)
|
||||
"""
|
||||
|
||||
from buildbot.status.web.base import DirectoryLister
|
||||
|
||||
|
||||
def get_files_and_directories(self, directory):
|
||||
from twisted.web.static import (getTypeAndEncoding,
|
||||
formatFileSize)
|
||||
import urllib
|
||||
import cgi
|
||||
import time
|
||||
import os
|
||||
files = []
|
||||
dirs = []
|
||||
for path in directory:
|
||||
url = urllib.quote(path, "/")
|
||||
escapedPath = cgi.escape(path)
|
||||
lastmodified = time.ctime(os.path.getmtime(
|
||||
os.path.join(self.path, path)))
|
||||
if os.path.isdir(os.path.join(self.path, path)):
|
||||
url = url + '/'
|
||||
dirs.append({'text': escapedPath + "/", 'href': url,
|
||||
'size': '', 'type': '[Directory]',
|
||||
'encoding': '',
|
||||
'lastmodified': lastmodified})
|
||||
else:
|
||||
mimetype, encoding = getTypeAndEncoding(path, self.contentTypes,
|
||||
self.contentEncodings,
|
||||
self.defaultType)
|
||||
try:
|
||||
size = os.stat(os.path.join(self.path, path)).st_size
|
||||
except OSError:
|
||||
continue
|
||||
files.append({
|
||||
'text': escapedPath, "href": url,
|
||||
'type': '[%s]' % mimetype,
|
||||
'encoding': (encoding and '[%s]' % encoding or ''),
|
||||
'size': formatFileSize(size),
|
||||
'lastmodified': lastmodified})
|
||||
return dirs, files
|
||||
DirectoryLister._getFilesAndDirectories = get_files_and_directories
|
||||
|
||||
# Dictionary that the buildmaster pays attention to.
|
||||
c = BuildmasterConfig = {}
|
||||
|
||||
# BUILD SLAVES
|
||||
#
|
||||
# We load the slaves and their passwords from a separator file, so we can have
|
||||
# this one in SVN.
|
||||
|
||||
from buildbot.buildslave import BuildSlave
|
||||
import master_private
|
||||
|
||||
c['slaves'] = []
|
||||
|
||||
for slave in master_private.slaves:
|
||||
c['slaves'].append(BuildSlave(slave['name'], slave['password']))
|
||||
|
||||
# TCP port through which slaves connect
|
||||
|
||||
c['slavePortnum'] = 9989
|
||||
|
||||
# CHANGE SOURCES
|
||||
|
||||
from buildbot.changes.svnpoller import SVNPoller
|
||||
from buildbot.changes.gitpoller import GitPoller
|
||||
|
||||
c['change_source'] = GitPoller(
|
||||
'git://git.blender.org/blender.git',
|
||||
pollinterval=1200)
|
||||
|
||||
|
||||
# CODEBASES
|
||||
#
|
||||
# Allow to controll separately things like branches for each repo and submodules.
|
||||
|
||||
all_repositories = {
|
||||
r'git://git.blender.org/blender.git': 'blender',
|
||||
r'git://git.blender.org/blender-translations.git': 'blender-translations',
|
||||
r'git://git.blender.org/blender-addons.git': 'blender-addons',
|
||||
r'git://git.blender.org/blender-addons-contrib.git': 'blender-addons-contrib',
|
||||
r'git://git.blender.org/scons.git': 'scons',
|
||||
r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn',
|
||||
}
|
||||
|
||||
|
||||
def codebaseGenerator(chdict):
|
||||
return all_repositories[chdict['repository']]
|
||||
|
||||
c['codebaseGenerator'] = codebaseGenerator
|
||||
|
||||
|
||||
# SCHEDULERS
|
||||
#
|
||||
# Decide how to react to incoming changes.
|
||||
|
||||
# from buildbot.scheduler import Scheduler
|
||||
from buildbot.schedulers import timed, forcesched
|
||||
|
||||
c['schedulers'] = []
|
||||
|
||||
|
||||
def schedule_force_build(name):
|
||||
c['schedulers'].append(forcesched.ForceScheduler(name='force ' + name,
|
||||
builderNames=[name],
|
||||
codebases=[forcesched.CodebaseParameter(
|
||||
codebase="blender",
|
||||
branch=forcesched.ChoiceStringParameter(
|
||||
name="branch", choices=FORCE_SCHEDULE_BRANCHES, default="master"),
|
||||
# Do not hide revision, can be handy!
|
||||
repository=forcesched.FixedParameter(name="repository", default="", hide=True),
|
||||
project=forcesched.FixedParameter(name="project", default="", hide=True)),
|
||||
# For now, hide other codebases.
|
||||
forcesched.CodebaseParameter(hide=True, codebase="blender-translations"),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="blender-addons"),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="blender-addons-contrib"),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="scons"),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="lib svn")],
|
||||
properties=[]))
|
||||
|
||||
|
||||
def schedule_build(name, hour, minute=0):
|
||||
for current_branch in NIGHT_SCHEDULE_BRANCHES:
|
||||
scheduler_name = "nightly " + name
|
||||
if current_branch:
|
||||
scheduler_name += ' ' + current_branch
|
||||
c['schedulers'].append(timed.Nightly(name=scheduler_name,
|
||||
codebases={
|
||||
"blender": {"repository": ""},
|
||||
"blender-translations": {"repository": "", "branch": "master"},
|
||||
"blender-addons": {"repository": "", "branch": "master"},
|
||||
"blender-addons-contrib": {"repository": "", "branch": "master"},
|
||||
"scons": {"repository": "", "branch": "master"},
|
||||
"lib svn": {"repository": "", "branch": "trunk"}},
|
||||
branch=current_branch,
|
||||
builderNames=[name],
|
||||
hour=hour,
|
||||
minute=minute))
|
||||
|
||||
|
||||
# BUILDERS
|
||||
#
|
||||
# The 'builders' list defines the Builders, which tell Buildbot how to
|
||||
# perform a build: what steps, and which slaves can execute them.
|
||||
# Note that any particular build will only take place on one slave.
|
||||
|
||||
from buildbot.process.factory import BuildFactory
|
||||
from buildbot.process.properties import Interpolate
|
||||
from buildbot.steps.source import SVN
|
||||
from buildbot.steps.source import Git
|
||||
from buildbot.steps.shell import ShellCommand
|
||||
from buildbot.steps.shell import Compile
|
||||
from buildbot.steps.shell import Test
|
||||
from buildbot.steps.transfer import FileUpload
|
||||
from buildbot.steps.master import MasterShellCommand
|
||||
from buildbot.config import BuilderConfig
|
||||
|
||||
# add builder utility
|
||||
|
||||
c['builders'] = []
|
||||
buildernames = []
|
||||
|
||||
|
||||
def add_builder(c, name, libdir, factory, branch='',
|
||||
rsync=False, hour=3, minute=0):
|
||||
slavenames = []
|
||||
|
||||
for slave in master_private.slaves:
|
||||
if name in slave['builders']:
|
||||
slavenames.append(slave['name'])
|
||||
|
||||
if len(slavenames) > 0:
|
||||
f = factory(name, libdir, branch, rsync)
|
||||
c['builders'].append(BuilderConfig(name=name,
|
||||
slavenames=slavenames,
|
||||
factory=f,
|
||||
category='blender'))
|
||||
buildernames.append(name)
|
||||
|
||||
schedule_build(name, hour, minute)
|
||||
schedule_force_build(name)
|
||||
|
||||
# common steps
|
||||
|
||||
|
||||
def git_submodule_step(submodule):
|
||||
return Git(name=submodule + '.git',
|
||||
repourl='git://git.blender.org/' + submodule + '.git',
|
||||
mode='update',
|
||||
codebase=submodule,
|
||||
workdir=submodule + '.git')
|
||||
|
||||
|
||||
def git_step(branch=''):
|
||||
if branch:
|
||||
return Git(name='blender.git',
|
||||
repourl='git://git.blender.org/blender.git',
|
||||
mode='update',
|
||||
branch=branch,
|
||||
codebase='blender',
|
||||
workdir='blender.git',
|
||||
submodules=True)
|
||||
else:
|
||||
return Git(name='blender.git',
|
||||
repourl='git://git.blender.org/blender.git',
|
||||
mode='update',
|
||||
codebase='blender',
|
||||
workdir='blender.git',
|
||||
submodules=True)
|
||||
|
||||
|
||||
def git_submodules_update():
|
||||
command = ['git', 'submodule', 'foreach', '--recursive',
|
||||
'git', 'pull', 'origin', 'master']
|
||||
return ShellCommand(name='Submodules Update',
|
||||
command=command,
|
||||
description='updating',
|
||||
descriptionDone='up to date',
|
||||
workdir='blender.git')
|
||||
|
||||
|
||||
def lib_svn_step(dir):
|
||||
return SVN(name='lib svn',
|
||||
baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir,
|
||||
codebase='lib svn',
|
||||
mode='update',
|
||||
defaultBranch='trunk',
|
||||
workdir='lib/' + dir)
|
||||
|
||||
|
||||
def rsync_step(id, branch, rsync_script):
|
||||
return ShellCommand(name='rsync',
|
||||
command=['python', rsync_script, id, branch],
|
||||
description='uploading',
|
||||
descriptionDone='uploaded',
|
||||
workdir='install')
|
||||
|
||||
# generic builder
|
||||
|
||||
|
||||
def generic_builder(id, libdir='', branch='', rsync=False):
|
||||
filename = 'uploaded/buildbot_upload_' + id + '.zip'
|
||||
compile_script = '../blender.git/build_files/buildbot/slave_compile.py'
|
||||
test_script = '../blender.git/build_files/buildbot/slave_test.py'
|
||||
pack_script = '../blender.git/build_files/buildbot/slave_pack.py'
|
||||
rsync_script = '../blender.git/build_files/buildbot/slave_rsync.py'
|
||||
unpack_script = 'master_unpack.py'
|
||||
|
||||
f = BuildFactory()
|
||||
if libdir != '':
|
||||
f.addStep(lib_svn_step(libdir))
|
||||
|
||||
for submodule in ('blender-translations',
|
||||
'blender-addons',
|
||||
'blender-addons-contrib',
|
||||
'scons'):
|
||||
f.addStep(git_submodule_step(submodule))
|
||||
|
||||
f.addStep(git_step(branch))
|
||||
f.addStep(git_submodules_update())
|
||||
|
||||
f.addStep(Compile(command=['python', compile_script, id], timeout=3600))
|
||||
f.addStep(Test(command=['python', test_script, id]))
|
||||
f.addStep(ShellCommand(name='package',
|
||||
command=['python', pack_script, id, branch or Interpolate('%(src:blender:branch)s')],
|
||||
description='packaging',
|
||||
descriptionDone='packaged'))
|
||||
if rsync:
|
||||
f.addStep(rsync_step(id, branch, rsync_script))
|
||||
elif id.find('cmake') != -1:
|
||||
f.addStep(FileUpload(name='upload',
|
||||
slavesrc='buildbot_upload.zip',
|
||||
masterdest=filename,
|
||||
maxsize=150 * 1024 * 1024))
|
||||
else:
|
||||
f.addStep(FileUpload(name='upload',
|
||||
slavesrc='buildbot_upload.zip',
|
||||
masterdest=filename,
|
||||
maxsize=150 * 1024 * 1024,
|
||||
workdir='install'))
|
||||
f.addStep(MasterShellCommand(name='unpack',
|
||||
command=['python', unpack_script, filename],
|
||||
description='unpacking',
|
||||
descriptionDone='unpacked'))
|
||||
return f
|
||||
|
||||
# builders
|
||||
|
||||
add_builder(c, 'mac_x86_64_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=5)
|
||||
add_builder(c, 'mac_i386_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=11)
|
||||
add_builder(c, 'linux_glibc211_i386_scons', '', generic_builder, hour=1)
|
||||
add_builder(c, 'linux_glibc211_x86_64_scons', '', generic_builder, hour=2)
|
||||
add_builder(c, 'win32_scons_vc2013', 'windows_vc12', generic_builder, hour=1)
|
||||
add_builder(c, 'win64_scons_vc2013', 'win64_vc12', generic_builder, hour=2)
|
||||
add_builder(c, 'win32_cmake_vc2013', 'windows_vc12', generic_builder, hour=3)
|
||||
add_builder(c, 'win64_cmake_vc2013', 'win64_vc12', generic_builder, hour=4)
|
||||
#add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder, hour=4)
|
||||
add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder, hour=3)
|
||||
#add_builder(c, 'freebsd_i386_cmake', '', generic_builder, hour=1)
|
||||
#add_builder(c, 'freebsd_x86_64_cmake', '', generic_builder, hour=2)
|
||||
|
||||
# Multiview branch
|
||||
add_builder(c, 'multiview_win64_scons', 'win64', generic_builder, 'multiview', hour=4)
|
||||
add_builder(c, 'multiview_win32_scons', 'windows', generic_builder, 'multiview', hour=5)
|
||||
|
||||
# STATUS TARGETS
|
||||
#
|
||||
# 'status' is a list of Status Targets. The results of each build will be
|
||||
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
|
||||
# including web pages, email senders, and IRC bots.
|
||||
|
||||
c['status'] = []
|
||||
|
||||
from buildbot.status import html
|
||||
from buildbot.status.web import authz
|
||||
from buildbot.status.web import auth
|
||||
|
||||
users = []
|
||||
for slave in master_private.slaves:
|
||||
users += [(slave['name'], slave['password'])]
|
||||
|
||||
authz_cfg = authz.Authz(
|
||||
auth=auth.BasicAuth(users),
|
||||
# change any of these to True to enable; see the manual for more
|
||||
# options
|
||||
gracefulShutdown=False,
|
||||
forceBuild=True, # use this to test your slave once it is set up
|
||||
forceAllBuilds=False,
|
||||
pingBuilder=False,
|
||||
stopBuild=True,
|
||||
stopAllBuilds=False,
|
||||
cancelPendingBuild=True,
|
||||
)
|
||||
|
||||
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
|
||||
#c['status'].append(html.WebStatus(http_port=8010))
|
||||
|
||||
# PROJECT IDENTITY
|
||||
|
||||
c['projectName'] = "Blender"
|
||||
c['projectURL'] = "http://www.blender.org"
|
||||
|
||||
# the 'buildbotURL' string should point to the location where the buildbot's
|
||||
# internal web server (usually the html.WebStatus page) is visible. This
|
||||
# typically uses the port number set in the Waterfall 'status' entry, but
|
||||
# with an externally-visible host name which the buildbot cannot figure out
|
||||
# without some help.
|
||||
|
||||
c['buildbotURL'] = "http://builder.blender.org/"
|
||||
|
||||
# DB URL
|
||||
#
|
||||
# This specifies what database buildbot uses to store change and scheduler
|
||||
# state. You can leave this at its default for all but the largest
|
||||
# installations.
|
||||
|
||||
c['db_url'] = "sqlite:///state.sqlite"
|
@@ -1,146 +0,0 @@
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# Runs on Buildbot master, to unpack incoming unload.zip into latest
|
||||
# builds directory and remove older builds.
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import zipfile
|
||||
|
||||
|
||||
# extension stripping
|
||||
def strip_extension(filename):
|
||||
extensions = '.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe'
|
||||
|
||||
for ext in extensions:
|
||||
if filename.endswith(ext):
|
||||
filename = filename[:-len(ext)]
|
||||
|
||||
return filename
|
||||
|
||||
|
||||
# extract platform from package name
|
||||
def get_platform(filename):
|
||||
# name is blender-version-platform.extension. we want to get the
|
||||
# platform out, but there may be some variations, so we fiddle a
|
||||
# bit to handle current and hopefully future names
|
||||
filename = strip_extension(filename)
|
||||
filename = strip_extension(filename)
|
||||
|
||||
tokens = filename.split("-")
|
||||
platforms = ('osx', 'mac', 'bsd',
|
||||
'win', 'linux', 'source',
|
||||
'irix', 'solaris', 'mingw')
|
||||
platform_tokens = []
|
||||
found = False
|
||||
|
||||
for i, token in enumerate(tokens):
|
||||
if not found:
|
||||
for platform in platforms:
|
||||
if platform in token.lower():
|
||||
found = True
|
||||
break
|
||||
|
||||
if found:
|
||||
platform_tokens += [token]
|
||||
|
||||
return '-'.join(platform_tokens)
|
||||
|
||||
|
||||
def get_branch(filename):
|
||||
tokens = filename.split("-")
|
||||
branch = ""
|
||||
|
||||
for token in tokens:
|
||||
if token == "blender":
|
||||
return branch
|
||||
|
||||
if branch == "":
|
||||
branch = token
|
||||
else:
|
||||
branch = branch + "-" + token
|
||||
|
||||
return ""
|
||||
|
||||
# get filename
|
||||
if len(sys.argv) < 2:
|
||||
sys.stderr.write("Not enough arguments, expecting file to unpack\n")
|
||||
sys.exit(1)
|
||||
|
||||
filename = sys.argv[1]
|
||||
|
||||
# open zip file
|
||||
if not os.path.exists(filename):
|
||||
sys.stderr.write("File %r not found.\n" % filename)
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
z = zipfile.ZipFile(filename, "r")
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Failed to open zip file: %s\n' % str(ex))
|
||||
sys.exit(1)
|
||||
|
||||
if len(z.namelist()) != 1:
|
||||
sys.stderr.write("Expected one file in %r." % filename)
|
||||
sys.exit(1)
|
||||
|
||||
package = z.namelist()[0]
|
||||
packagename = os.path.basename(package)
|
||||
|
||||
# detect platform and branch
|
||||
platform = get_platform(packagename)
|
||||
branch = get_branch(packagename)
|
||||
|
||||
if platform == '':
|
||||
sys.stderr.write('Failed to detect platform ' +
|
||||
'from package: %r\n' % packagename)
|
||||
sys.exit(1)
|
||||
|
||||
# extract
|
||||
if not branch or branch == 'master':
|
||||
directory = 'public_html/download'
|
||||
elif branch == 'experimental-build':
|
||||
directory = 'public_html/download/experimental'
|
||||
else:
|
||||
directory = 'public_html/download'
|
||||
|
||||
try:
|
||||
zf = z.open(package)
|
||||
f = file(os.path.join(directory, packagename), "wb")
|
||||
|
||||
shutil.copyfileobj(zf, f)
|
||||
|
||||
zf.close()
|
||||
z.close()
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Failed to unzip package: %s\n' % str(ex))
|
||||
sys.exit(1)
|
||||
|
||||
# remove other files from the same platform and branch
|
||||
try:
|
||||
for f in os.listdir(directory):
|
||||
if get_platform(f) == platform and get_branch(f) == branch:
|
||||
if f != packagename:
|
||||
os.remove(os.path.join(directory, f))
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Failed to remove old packages: %s\n' % str(ex))
|
||||
sys.exit(1)
|
@@ -1,192 +0,0 @@
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import shutil
|
||||
|
||||
# get builder name
|
||||
if len(sys.argv) < 2:
|
||||
sys.stderr.write("Not enough arguments, expecting builder name\n")
|
||||
sys.exit(1)
|
||||
|
||||
builder = sys.argv[1]
|
||||
|
||||
# we run from build/ directory
|
||||
blender_dir = '../blender.git'
|
||||
|
||||
if 'cmake' in builder:
|
||||
# cmake
|
||||
|
||||
# set build options
|
||||
cmake_options = ['-DCMAKE_BUILD_TYPE:STRING=Release']
|
||||
|
||||
if builder.endswith('mac_x86_64_cmake'):
|
||||
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64')
|
||||
elif builder.endswith('mac_i386_cmake'):
|
||||
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=i386')
|
||||
elif builder.endswith('mac_ppc_cmake'):
|
||||
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=ppc')
|
||||
|
||||
if 'win64' in builder:
|
||||
cmake_options.append(['-G', '"Visual Studio 12 2013 Win64"'])
|
||||
elif 'win32' in builder:
|
||||
cmake_options.append(['-G', '"Visual Studio 12 2013"'])
|
||||
|
||||
cmake_options.append("-C../blender.git/build_files/cmake/config/blender_full.cmake")
|
||||
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=1")
|
||||
# configure and make
|
||||
retcode = subprocess.call(['cmake', blender_dir] + cmake_options)
|
||||
if retcode != 0:
|
||||
sys.exit(retcode)
|
||||
if 'win' in builder:
|
||||
retcode = subprocess.call(['msbuild', 'INSTALL.vcxproj', '/p:Configuration=Release'])
|
||||
else:
|
||||
retcode = subprocess.call(['make', '-s', '-j4', 'install'])
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
python_bin = 'python'
|
||||
if builder.find('linux') != -1:
|
||||
python_bin = '/opt/lib/python-2.7/bin/python2.7'
|
||||
|
||||
# scons
|
||||
os.chdir(blender_dir)
|
||||
scons_cmd = [python_bin, 'scons/scons.py']
|
||||
scons_options = ['BF_FANCY=False']
|
||||
|
||||
# We're using the same rules as release builder, so tweak
|
||||
# build and install dirs
|
||||
build_dir = os.path.join('..', 'build', builder)
|
||||
install_dir = os.path.join('..', 'install', builder)
|
||||
|
||||
# Clean install directory so we'll be sure there's no
|
||||
# residual libs and files remained from the previous install.
|
||||
if os.path.isdir(install_dir):
|
||||
shutil.rmtree(install_dir)
|
||||
|
||||
buildbot_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
config_dir = os.path.join(buildbot_dir, 'config')
|
||||
|
||||
if builder.find('linux') != -1:
|
||||
configs = []
|
||||
if builder.endswith('linux_glibc211_x86_64_scons'):
|
||||
configs = ['user-config-player-glibc211-x86_64.py',
|
||||
'user-config-cuda-glibc211-x86_64.py',
|
||||
'user-config-glibc211-x86_64.py'
|
||||
]
|
||||
chroot_name = 'buildbot_squeeze_x86_64'
|
||||
cuda_chroot = 'buildbot_squeeze_x86_64'
|
||||
elif builder.endswith('linux_glibc211_i386_scons'):
|
||||
configs = ['user-config-player-glibc211-i686.py',
|
||||
'user-config-cuda-glibc211-i686.py',
|
||||
'user-config-glibc211-i686.py']
|
||||
chroot_name = 'buildbot_squeeze_i686'
|
||||
|
||||
# use 64bit cuda toolkit, so there'll be no memory limit issues
|
||||
cuda_chroot = 'buildbot_squeeze_x86_64'
|
||||
|
||||
# Compilation will happen inside of chroot environment
|
||||
prog_scons_cmd = ['schroot', '-c', chroot_name, '--'] + scons_cmd
|
||||
cuda_scons_cmd = ['schroot', '-c', cuda_chroot, '--'] + scons_cmd
|
||||
|
||||
common_options = ['BF_INSTALLDIR=' + install_dir] + scons_options
|
||||
|
||||
for config in configs:
|
||||
config_fpath = os.path.join(config_dir, config)
|
||||
|
||||
scons_options = []
|
||||
|
||||
if config.find('player') != -1:
|
||||
scons_options.append('BF_BUILDDIR=%s_player' % (build_dir))
|
||||
elif config.find('cuda') != -1:
|
||||
scons_options.append('BF_BUILDDIR=%s_cuda' % (build_dir))
|
||||
else:
|
||||
scons_options.append('BF_BUILDDIR=%s' % (build_dir))
|
||||
|
||||
scons_options += common_options
|
||||
|
||||
if config.find('player') != -1:
|
||||
scons_options.append('blenderplayer')
|
||||
cur_scons_cmd = prog_scons_cmd
|
||||
elif config.find('cuda') != -1:
|
||||
scons_options.append('cudakernels')
|
||||
cur_scons_cmd = cuda_scons_cmd
|
||||
|
||||
if config.find('i686') != -1:
|
||||
scons_options.append('BF_BITNESS=32')
|
||||
elif config.find('x86_64') != -1:
|
||||
scons_options.append('BF_BITNESS=64')
|
||||
else:
|
||||
scons_options.append('blender')
|
||||
cur_scons_cmd = prog_scons_cmd
|
||||
|
||||
scons_options.append('BF_CONFIG=' + config_fpath)
|
||||
|
||||
retcode = subprocess.call(cur_scons_cmd + scons_options)
|
||||
if retcode != 0:
|
||||
print('Error building rules with config ' + config)
|
||||
sys.exit(retcode)
|
||||
|
||||
sys.exit(0)
|
||||
else:
|
||||
if builder.find('win') != -1:
|
||||
bitness = '32'
|
||||
|
||||
if builder.find('win64') != -1:
|
||||
bitness = '64'
|
||||
|
||||
scons_options.append('BF_INSTALLDIR=' + install_dir)
|
||||
scons_options.append('BF_BUILDDIR=' + build_dir)
|
||||
scons_options.append('BF_BITNESS=' + bitness)
|
||||
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True')
|
||||
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
|
||||
if builder.find('mingw') != -1:
|
||||
scons_options.append('BF_TOOLSET=mingw')
|
||||
if builder.endswith('vc2013'):
|
||||
scons_options.append('MSVS_VERSION=12.0')
|
||||
scons_options.append('MSVC_VERSION=12.0')
|
||||
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=1')
|
||||
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
|
||||
scons_options.append('BF_NUMJOBS=1')
|
||||
|
||||
elif builder.find('mac') != -1:
|
||||
if builder.find('x86_64') != -1:
|
||||
config = 'user-config-mac-x86_64.py'
|
||||
else:
|
||||
config = 'user-config-mac-i386.py'
|
||||
|
||||
scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config))
|
||||
|
||||
if builder.find('win') != -1:
|
||||
if not os.path.exists(install_dir):
|
||||
os.makedirs(install_dir)
|
||||
if builder.endswith('vc2013'):
|
||||
dlls = ('msvcp120.dll', 'msvcr120.dll', 'vcomp120.dll')
|
||||
if builder.find('win64') == -1:
|
||||
dlls_path = '..\\..\\..\\redist\\x86'
|
||||
else:
|
||||
dlls_path = '..\\..\\..\\redist\\amd64'
|
||||
for dll in dlls:
|
||||
shutil.copyfile(os.path.join(dlls_path, dll), os.path.join(install_dir, dll))
|
||||
|
||||
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
|
||||
|
||||
sys.exit(retcode)
|
@@ -1,185 +0,0 @@
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# Runs on buildbot slave, creating a release package using the build
|
||||
# system and zipping it into buildbot_upload.zip. This is then uploaded
|
||||
# to the master in the next buildbot step.
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import zipfile
|
||||
|
||||
# get builder name
|
||||
if len(sys.argv) < 2:
|
||||
sys.stderr.write("Not enough arguments, expecting builder name\n")
|
||||
sys.exit(1)
|
||||
|
||||
builder = sys.argv[1]
|
||||
# Never write branch if it is master.
|
||||
branch = sys.argv[2] if (len(sys.argv) >= 3 and sys.argv[2] != 'master') else ''
|
||||
|
||||
# scons does own packaging
|
||||
if builder.find('scons') != -1:
|
||||
python_bin = 'python'
|
||||
if builder.find('linux') != -1:
|
||||
python_bin = '/opt/lib/python-2.7/bin/python2.7'
|
||||
|
||||
os.chdir('../blender.git')
|
||||
scons_options = ['BF_QUICK=slnt', 'BUILDBOT_BRANCH=' + branch, 'buildslave', 'BF_FANCY=False']
|
||||
|
||||
buildbot_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
config_dir = os.path.join(buildbot_dir, 'config')
|
||||
build_dir = os.path.join('..', 'build', builder)
|
||||
install_dir = os.path.join('..', 'install', builder)
|
||||
|
||||
if builder.find('linux') != -1:
|
||||
scons_options += ['WITH_BF_NOBLENDER=True', 'WITH_BF_PLAYER=False',
|
||||
'BF_BUILDDIR=' + build_dir,
|
||||
'BF_INSTALLDIR=' + install_dir,
|
||||
'WITHOUT_BF_INSTALL=True']
|
||||
|
||||
config = None
|
||||
bits = None
|
||||
|
||||
if builder.endswith('linux_glibc211_x86_64_scons'):
|
||||
config = 'user-config-glibc211-x86_64.py'
|
||||
chroot_name = 'buildbot_squeeze_x86_64'
|
||||
bits = 64
|
||||
elif builder.endswith('linux_glibc211_i386_scons'):
|
||||
config = 'user-config-glibc211-i686.py'
|
||||
chroot_name = 'buildbot_squeeze_i686'
|
||||
bits = 32
|
||||
|
||||
if config is not None:
|
||||
config_fpath = os.path.join(config_dir, config)
|
||||
scons_options.append('BF_CONFIG=' + config_fpath)
|
||||
|
||||
blender = os.path.join(install_dir, 'blender')
|
||||
blenderplayer = os.path.join(install_dir, 'blenderplayer')
|
||||
subprocess.call(['schroot', '-c', chroot_name, '--', 'strip', '--strip-all', blender, blenderplayer])
|
||||
|
||||
extra = '/' + os.path.join('home', 'sources', 'release-builder', 'extra')
|
||||
mesalibs = os.path.join(extra, 'mesalibs' + str(bits) + '.tar.bz2')
|
||||
software_gl = os.path.join(extra, 'blender-softwaregl')
|
||||
|
||||
os.system('tar -xpf %s -C %s' % (mesalibs, install_dir))
|
||||
os.system('cp %s %s' % (software_gl, install_dir))
|
||||
os.system('chmod 755 %s' % (os.path.join(install_dir, 'blender-softwaregl')))
|
||||
|
||||
retcode = subprocess.call(['schroot', '-c', chroot_name, '--', python_bin, 'scons/scons.py'] + scons_options)
|
||||
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
if builder.find('win') != -1:
|
||||
bitness = '32'
|
||||
|
||||
if builder.find('win64') != -1:
|
||||
bitness = '64'
|
||||
|
||||
scons_options.append('BF_INSTALLDIR=' + install_dir)
|
||||
scons_options.append('BF_BUILDDIR=' + build_dir)
|
||||
scons_options.append('BF_BITNESS=' + bitness)
|
||||
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True')
|
||||
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
|
||||
if builder.find('mingw') != -1:
|
||||
scons_options.append('BF_TOOLSET=mingw')
|
||||
if builder.endswith('vc2013'):
|
||||
scons_options.append('MSVS_VERSION=12.0')
|
||||
scons_options.append('MSVC_VERSION=12.0')
|
||||
|
||||
elif builder.find('mac') != -1:
|
||||
if builder.find('x86_64') != -1:
|
||||
config = 'user-config-mac-x86_64.py'
|
||||
else:
|
||||
config = 'user-config-mac-i386.py'
|
||||
|
||||
scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config))
|
||||
|
||||
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
# CMake
|
||||
if 'win' in builder:
|
||||
files = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')]
|
||||
for f in files:
|
||||
os.remove(f)
|
||||
retcode = subprocess.call(['cpack', '-G', 'ZIP'])
|
||||
result_file = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')][0]
|
||||
os.rename(result_file, "{}.zip".format(builder))
|
||||
# create zip file
|
||||
try:
|
||||
upload_zip = "buildbot_upload.zip"
|
||||
if os.path.exists(upload_zip):
|
||||
os.remove(upload_zip)
|
||||
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
|
||||
z.write("{}.zip".format(builder))
|
||||
z.close()
|
||||
sys.exit(retcode)
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
# clean release directory if it already exists
|
||||
release_dir = 'release'
|
||||
|
||||
if os.path.exists(release_dir):
|
||||
for f in os.listdir(release_dir):
|
||||
if os.path.isfile(os.path.join(release_dir, f)):
|
||||
os.remove(os.path.join(release_dir, f))
|
||||
|
||||
# create release package
|
||||
try:
|
||||
subprocess.call(['make', 'package_archive'])
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Make package release failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
# find release directory, must exist this time
|
||||
if not os.path.exists(release_dir):
|
||||
sys.stderr.write("Failed to find release directory %r.\n" % release_dir)
|
||||
sys.exit(1)
|
||||
|
||||
# find release package
|
||||
file = None
|
||||
filepath = None
|
||||
|
||||
for f in os.listdir(release_dir):
|
||||
rf = os.path.join(release_dir, f)
|
||||
if os.path.isfile(rf) and f.startswith('blender'):
|
||||
file = f
|
||||
filepath = rf
|
||||
|
||||
if not file:
|
||||
sys.stderr.write("Failed to find release package.\n")
|
||||
sys.exit(1)
|
||||
|
||||
# create zip file
|
||||
try:
|
||||
upload_zip = "buildbot_upload.zip"
|
||||
if os.path.exists(upload_zip):
|
||||
os.remove(upload_zip)
|
||||
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
|
||||
z.write(filepath, arcname=file)
|
||||
z.close()
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
@@ -1,43 +0,0 @@
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# Runs on buildbot slave, rsync zip directly to buildbot server rather
|
||||
# than using upload which is much slower
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# get builder name
|
||||
if len(sys.argv) < 2:
|
||||
sys.stderr.write("Not enough arguments, expecting builder name\n")
|
||||
sys.exit(1)
|
||||
|
||||
builder = sys.argv[1]
|
||||
|
||||
# rsync, this assumes ssh keys are setup so no password is needed
|
||||
local_zip = "buildbot_upload.zip"
|
||||
remote_folder = "builder.blender.org:/data/buildbot-master/uploaded/"
|
||||
remote_zip = remote_folder + "buildbot_upload_" + builder + ".zip"
|
||||
command = "rsync -avz %s %s" % (local_zip, remote_zip)
|
||||
|
||||
print(command)
|
||||
|
||||
ret = os.system(command)
|
||||
sys.exit(ret)
|
@@ -1,40 +0,0 @@
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
# get builder name
|
||||
if len(sys.argv) < 2:
|
||||
sys.stderr.write("Not enough arguments, expecting builder name\n")
|
||||
sys.exit(1)
|
||||
|
||||
builder = sys.argv[1]
|
||||
|
||||
# we run from build/ directory
|
||||
blender_dir = '../blender.git'
|
||||
|
||||
if "cmake" in builder:
|
||||
# cmake
|
||||
retcode = subprocess.call(['ctest', '.' '--output-on-failure'])
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
# scons
|
||||
pass
|
@@ -1,56 +0,0 @@
|
||||
# - Find Eigen3 library
|
||||
# Find the native Eigen3 includes and library
|
||||
# This module defines
|
||||
# EIGEN3_INCLUDE_DIRS, where to find spnav.h, Set when
|
||||
# EIGEN3_INCLUDE_DIR is found.
|
||||
# EIGEN3_ROOT_DIR, The base directory to search for Eigen3.
|
||||
# This can also be an environment variable.
|
||||
# EIGEN3_FOUND, If false, do not try to use Eigen3.
|
||||
#
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If EIGEN3_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT EIGEN3_ROOT_DIR AND NOT $ENV{EIGEN3_ROOT_DIR} STREQUAL "")
|
||||
SET(EIGEN3_ROOT_DIR $ENV{EIGEN3_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_eigen3_SEARCH_DIRS
|
||||
${EIGEN3_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(EIGEN3_INCLUDE_DIR
|
||||
NAMES
|
||||
# header has no '.h' suffix
|
||||
Eigen/Eigen
|
||||
HINTS
|
||||
${_eigen3_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include/eigen3
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set EIGEN3_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eigen3 DEFAULT_MSG
|
||||
EIGEN3_INCLUDE_DIR)
|
||||
|
||||
IF(EIGEN3_FOUND)
|
||||
SET(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
|
||||
ENDIF(EIGEN3_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
EIGEN3_INCLUDE_DIR
|
||||
)
|
@@ -1,70 +0,0 @@
|
||||
# - Find Fftw3 library
|
||||
# Find the native Fftw3 includes and library
|
||||
# This module defines
|
||||
# FFTW3_INCLUDE_DIRS, where to find fftw3.h, Set when
|
||||
# FFTW3_INCLUDE_DIR is found.
|
||||
# FFTW3_LIBRARIES, libraries to link against to use Fftw3.
|
||||
# FFTW3_ROOT_DIR, The base directory to search for Fftw3.
|
||||
# This can also be an environment variable.
|
||||
# FFTW3_FOUND, If false, do not try to use Fftw3.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# FFTW3_LIBRARY, where to find the Fftw3 library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If FFTW3_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT FFTW3_ROOT_DIR AND NOT $ENV{FFTW3_ROOT_DIR} STREQUAL "")
|
||||
SET(FFTW3_ROOT_DIR $ENV{FFTW3_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_fftw3_SEARCH_DIRS
|
||||
${FFTW3_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(FFTW3_INCLUDE_DIR
|
||||
NAMES
|
||||
fftw3.h
|
||||
HINTS
|
||||
${_fftw3_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(FFTW3_LIBRARY
|
||||
NAMES
|
||||
fftw3
|
||||
HINTS
|
||||
${_fftw3_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fftw3 DEFAULT_MSG
|
||||
FFTW3_LIBRARY FFTW3_INCLUDE_DIR)
|
||||
|
||||
IF(FFTW3_FOUND)
|
||||
SET(FFTW3_LIBRARIES ${FFTW3_LIBRARY})
|
||||
SET(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR})
|
||||
ENDIF(FFTW3_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
FFTW3_INCLUDE_DIR
|
||||
FFTW3_LIBRARY
|
||||
)
|
@@ -1,79 +0,0 @@
|
||||
# - Find GLEW library
|
||||
# Find the native Glew includes and library
|
||||
# This module defines
|
||||
# GLEW_INCLUDE_DIRS, where to find glew.h, Set when
|
||||
# GLEW_INCLUDE_DIR is found.
|
||||
# GLEW_ROOT_DIR, The base directory to search for Glew.
|
||||
# This can also be an environment variable.
|
||||
# GLEW_FOUND, If false, do not try to use Glew.
|
||||
#
|
||||
# also defined,
|
||||
# GLEW_LIBRARY, where to find the Glew library.
|
||||
# GLEW_MX_LIBRARY, where to find the GlewMX library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If GLEW_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT GLEW_ROOT_DIR AND NOT $ENV{GLEW_ROOT_DIR} STREQUAL "")
|
||||
SET(GLEW_ROOT_DIR $ENV{GLEW_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_glew_SEARCH_DIRS
|
||||
${GLEW_ROOT_DIR}
|
||||
/usr/local
|
||||
)
|
||||
|
||||
FIND_PATH(GLEW_INCLUDE_DIR
|
||||
NAMES
|
||||
GL/glew.h
|
||||
HINTS
|
||||
${_glew_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(GLEW_LIBRARY
|
||||
NAMES
|
||||
GLEW
|
||||
HINTS
|
||||
${_glew_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
|
||||
FIND_LIBRARY(GLEW_MX_LIBRARY
|
||||
NAMES
|
||||
GLEWmx
|
||||
HINTS
|
||||
${_glew_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Glew DEFAULT_MSG
|
||||
GLEW_LIBRARY GLEW_INCLUDE_DIR)
|
||||
|
||||
IF(GLEW_FOUND)
|
||||
SET(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
|
||||
ENDIF(GLEW_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
GLEW_INCLUDE_DIR
|
||||
GLEW_LIBRARY
|
||||
GLEW_MX_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_glew_SEARCH_DIRS)
|
@@ -1,146 +0,0 @@
|
||||
# - Find static icu libraries
|
||||
# Find the native static icu libraries (needed for static boost_locale :/ ).
|
||||
# This module defines
|
||||
# ICU_LIBRARIES, libraries to link against to use icu.
|
||||
# ICU_ROOT_DIR, The base directory to search for icu.
|
||||
# This can also be an environment variable.
|
||||
# ICU_FOUND, If false, do not try to use icu.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# ICU_LIBRARY_xxx, where to find the icu libraries.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2012 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If ICU_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT ICU_ROOT_DIR AND NOT $ENV{ICU_ROOT_DIR} STREQUAL "")
|
||||
SET(ICU_ROOT_DIR $ENV{ICU_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
if(Boost_USE_STATIC_LIBS)
|
||||
set(_icu_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
||||
endif()
|
||||
|
||||
SET(_icu_SEARCH_DIRS
|
||||
${ICU_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
# We don't need includes, only libs to link against...
|
||||
#FIND_PATH(ICU_INCLUDE_DIR
|
||||
# NAMES
|
||||
# utf.h
|
||||
# HINTS
|
||||
# ${_icu_SEARCH_DIRS}
|
||||
# PATH_SUFFIXES
|
||||
# include/unicode
|
||||
#)
|
||||
|
||||
FIND_LIBRARY(ICU_LIBRARY_DATA
|
||||
NAMES
|
||||
icudata
|
||||
HINTS
|
||||
${_icu_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ICU_LIBRARY_I18N
|
||||
NAMES
|
||||
icui18n
|
||||
HINTS
|
||||
${_icu_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ICU_LIBRARY_IO
|
||||
NAMES
|
||||
icuio
|
||||
HINTS
|
||||
${_icu_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ICU_LIBRARY_LE
|
||||
NAMES
|
||||
icule
|
||||
HINTS
|
||||
${_icu_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ICU_LIBRARY_LX
|
||||
NAMES
|
||||
iculx
|
||||
HINTS
|
||||
${_icu_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ICU_LIBRARY_TU
|
||||
NAMES
|
||||
icutu
|
||||
HINTS
|
||||
${_icu_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ICU_LIBRARY_UC
|
||||
NAMES
|
||||
icuuc
|
||||
HINTS
|
||||
${_icu_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# Restore the original find library ordering
|
||||
if(Boost_USE_STATIC_LIBS)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_icu_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set ICU_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Icu DEFAULT_MSG
|
||||
ICU_LIBRARY_DATA
|
||||
ICU_LIBRARY_I18N
|
||||
ICU_LIBRARY_IO
|
||||
ICU_LIBRARY_LE
|
||||
ICU_LIBRARY_LX
|
||||
ICU_LIBRARY_TU
|
||||
ICU_LIBRARY_UC
|
||||
)
|
||||
|
||||
IF(ICU_FOUND)
|
||||
SET(ICU_LIBRARIES ${ICU_LIBRARY_DATA} ${ICU_LIBRARY_I18N} ${ICU_LIBRARY_IO} ${ICU_LIBRARY_LE} ${ICU_LIBRARY_LX} ${ICU_LIBRARY_TU} ${ICU_LIBRARY_UC})
|
||||
SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
|
||||
ENDIF(ICU_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
ICU_INCLUDE_DIR
|
||||
ICU_LIBRARY_DATA
|
||||
ICU_LIBRARY_I18N
|
||||
ICU_LIBRARY_IO
|
||||
ICU_LIBRARY_LE
|
||||
ICU_LIBRARY_LX
|
||||
ICU_LIBRARY_TU
|
||||
ICU_LIBRARY_UC
|
||||
)
|
@@ -1,70 +0,0 @@
|
||||
# - Find Jack library
|
||||
# Find the native Jack includes and library
|
||||
# This module defines
|
||||
# JACK_INCLUDE_DIRS, where to find jack.h, Set when
|
||||
# JACK_INCLUDE_DIR is found.
|
||||
# JACK_LIBRARIES, libraries to link against to use Jack.
|
||||
# JACK_ROOT_DIR, The base directory to search for Jack.
|
||||
# This can also be an environment variable.
|
||||
# JACK_FOUND, If false, do not try to use Jack.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# JACK_LIBRARY, where to find the Jack library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If JACK_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT JACK_ROOT_DIR AND NOT $ENV{JACK_ROOT_DIR} STREQUAL "")
|
||||
SET(JACK_ROOT_DIR $ENV{JACK_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_jack_SEARCH_DIRS
|
||||
${JACK_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(JACK_INCLUDE_DIR
|
||||
NAMES
|
||||
jack.h
|
||||
HINTS
|
||||
${_jack_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include/jack
|
||||
)
|
||||
|
||||
FIND_LIBRARY(JACK_LIBRARY
|
||||
NAMES
|
||||
jack
|
||||
HINTS
|
||||
${_jack_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set JACK_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jack DEFAULT_MSG
|
||||
JACK_LIBRARY JACK_INCLUDE_DIR)
|
||||
|
||||
IF(JACK_FOUND)
|
||||
SET(JACK_LIBRARIES ${JACK_LIBRARY})
|
||||
SET(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})
|
||||
ENDIF(JACK_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
JACK_INCLUDE_DIR
|
||||
JACK_LIBRARY
|
||||
)
|
@@ -1,71 +0,0 @@
|
||||
# - Find JeMalloc library
|
||||
# Find the native JeMalloc includes and library
|
||||
# This module defines
|
||||
# JEMALLOC_INCLUDE_DIRS, where to find jemalloc.h, Set when
|
||||
# JEMALLOC_INCLUDE_DIR is found.
|
||||
# JEMALLOC_LIBRARIES, libraries to link against to use JeMalloc.
|
||||
# JEMALLOC_ROOT_DIR, The base directory to search for JeMalloc.
|
||||
# This can also be an environment variable.
|
||||
# JEMALLOC_FOUND, If false, do not try to use JeMalloc.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# JEMALLOC_LIBRARY, where to find the JeMalloc library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If JEMALLOC_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT JEMALLOC_ROOT_DIR AND NOT $ENV{JEMALLOC_ROOT_DIR} STREQUAL "")
|
||||
SET(JEMALLOC_ROOT_DIR $ENV{JEMALLOC_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_jemalloc_SEARCH_DIRS
|
||||
${JEMALLOC_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/jemalloc
|
||||
)
|
||||
|
||||
FIND_PATH(JEMALLOC_INCLUDE_DIR
|
||||
NAMES
|
||||
jemalloc.h
|
||||
HINTS
|
||||
${_jemalloc_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include/jemalloc
|
||||
)
|
||||
|
||||
FIND_LIBRARY(JEMALLOC_LIBRARY
|
||||
NAMES
|
||||
jemalloc
|
||||
HINTS
|
||||
${_jemalloc_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JeMalloc DEFAULT_MSG
|
||||
JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
|
||||
|
||||
IF(JEMALLOC_FOUND)
|
||||
SET(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY})
|
||||
SET(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
|
||||
ENDIF(JEMALLOC_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
JEMALLOC_INCLUDE_DIR
|
||||
JEMALLOC_LIBRARY
|
||||
)
|
@@ -1,94 +0,0 @@
|
||||
# - Find LLVM library
|
||||
# Find the native LLVM includes and library
|
||||
# This module defines
|
||||
# LLVM_INCLUDE_DIRS, where to find LLVM.h, Set when LLVM_INCLUDE_DIR is found.
|
||||
# LLVM_LIBRARIES, libraries to link against to use LLVM.
|
||||
# LLVM_ROOT_DIR, The base directory to search for LLVM.
|
||||
# This can also be an environment variable.
|
||||
# LLVM_FOUND, If false, do not try to use LLVM.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# LLVM_LIBRARY, where to find the LLVM library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
if(LLVM_ROOT_DIR)
|
||||
if(DEFINED LLVM_VERSION)
|
||||
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION} HINTS ${LLVM_ROOT_DIR}/bin NO_CMAKE_PATH)
|
||||
endif()
|
||||
if(NOT LLVM_CONFIG)
|
||||
find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_ROOT_DIR}/bin NO_CMAKE_PATH)
|
||||
endif()
|
||||
else()
|
||||
if(DEFINED LLVM_VERSION)
|
||||
message(running llvm-config-${LLVM_VERSION})
|
||||
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION})
|
||||
endif()
|
||||
if(NOT LLVM_CONFIG)
|
||||
find_program(LLVM_CONFIG llvm-config)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED LLVM_VERSION)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --version
|
||||
OUTPUT_VARIABLE LLVM_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(LLVM_VERSION ${LLVM_VERSION} CACHE STRING "Version of LLVM to use")
|
||||
endif()
|
||||
if(NOT LLVM_ROOT_DIR)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --prefix
|
||||
OUTPUT_VARIABLE LLVM_ROOT_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(LLVM_ROOT_DIR ${LLVM_ROOT_DIR} CACHE PATH "Path to the LLVM installation")
|
||||
endif()
|
||||
if(NOT LLVM_LIBPATH)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --libdir
|
||||
OUTPUT_VARIABLE LLVM_LIBPATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(LLVM_LIBPATH ${LLVM_LIBPATH} CACHE PATH "Path to the LLVM library path")
|
||||
mark_as_advanced(LLVM_LIBPATH)
|
||||
endif()
|
||||
|
||||
if(LLVM_STATIC)
|
||||
find_library(LLVM_LIBRARY
|
||||
NAMES LLVMAnalysis # first of a whole bunch of libs to get
|
||||
PATHS ${LLVM_LIBPATH})
|
||||
else()
|
||||
find_library(LLVM_LIBRARY
|
||||
NAMES LLVM-${LLVM_VERSION}
|
||||
PATHS ${LLVM_LIBPATH})
|
||||
endif()
|
||||
|
||||
|
||||
if(LLVM_LIBRARY AND LLVM_ROOT_DIR AND LLVM_LIBPATH)
|
||||
if(LLVM_STATIC)
|
||||
# if static LLVM libraries were requested, use llvm-config to generate
|
||||
# the list of what libraries we need, and substitute that in the right
|
||||
# way for LLVM_LIBRARY.
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
|
||||
OUTPUT_VARIABLE LLVM_LIBRARY
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REPLACE " " ";" LLVM_LIBRARY "${LLVM_LIBRARY}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set SDL2_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LLVM DEFAULT_MSG
|
||||
LLVM_LIBRARY)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LLVM_LIBRARY
|
||||
)
|
||||
|
@@ -1,68 +0,0 @@
|
||||
# - Find LZO library
|
||||
# Find the native LZO includes and library
|
||||
# This module defines
|
||||
# LZO_INCLUDE_DIRS, where to find lzo1x.h, Set when
|
||||
# LZO_INCLUDE_DIR is found.
|
||||
# LZO_LIBRARIES, libraries to link against to use LZO.
|
||||
# LZO_ROOT_DIR, The base directory to search for LZO.
|
||||
# This can also be an environment variable.
|
||||
# LZO_FOUND, If false, do not try to use LZO.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# LZO_LIBRARY, where to find the LZO library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If LZO_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT LZO_ROOT_DIR AND NOT $ENV{LZO_ROOT_DIR} STREQUAL "")
|
||||
SET(LZO_ROOT_DIR $ENV{LZO_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_lzo_SEARCH_DIRS
|
||||
${LZO_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(LZO_INCLUDE_DIR lzo/lzo1x.h
|
||||
HINTS
|
||||
${_lzo_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LZO_LIBRARY
|
||||
NAMES
|
||||
lzo2
|
||||
HINTS
|
||||
${_lzo_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set LZO_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO DEFAULT_MSG
|
||||
LZO_LIBRARY LZO_INCLUDE_DIR)
|
||||
|
||||
IF(LZO_FOUND)
|
||||
SET(LZO_LIBRARIES ${LZO_LIBRARY})
|
||||
SET(LZO_INCLUDE_DIRS ${LZO_INCLUDE_DIR})
|
||||
ENDIF(LZO_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LZO_INCLUDE_DIR
|
||||
LZO_LIBRARY
|
||||
)
|
@@ -1,147 +0,0 @@
|
||||
# - Find OpenCOLLADA library
|
||||
# Find the native OpenCOLLADA includes and library
|
||||
# This module defines
|
||||
# OPENCOLLADA_INCLUDE_DIRS, where to find COLLADABaseUtils/ and
|
||||
# COLLADAFramework/, Set when OPENCOLLADA_INCLUDE_DIR is found.
|
||||
# OPENCOLLADA_LIBRARIES, libraries to link against to use OpenCOLLADA.
|
||||
# OPENCOLLADA_ROOT_DIR, The base directory to search for OpenCOLLADA.
|
||||
# This can also be an environment variable.
|
||||
# OPENCOLLADA_FOUND, If false, do not try to use OpenCOLLADA.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENCOLLADA_LIBRARY, where to find the OpenCOLLADA library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# note about include paths, there are 2 ways includes are set
|
||||
#
|
||||
# Where '/usr/include/opencollada' is the root dir:
|
||||
# /usr/include/opencollada/COLLADABaseUtils/COLLADABUPlatform.h
|
||||
#
|
||||
# Where '/opt/opencollada' is the base dir:
|
||||
# /opt/opencollada/COLLADABaseUtils/include/COLLADABUPlatform.h
|
||||
|
||||
# If OPENCOLLADA_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENCOLLADA_ROOT_DIR AND NOT $ENV{OPENCOLLADA_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENCOLLADA_ROOT_DIR $ENV{OPENCOLLADA_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_opencollada_FIND_INCLUDES
|
||||
COLLADAStreamWriter
|
||||
COLLADABaseUtils
|
||||
COLLADAFramework
|
||||
COLLADASaxFrameworkLoader
|
||||
GeneratedSaxParser
|
||||
)
|
||||
|
||||
SET(_opencollada_FIND_COMPONENTS
|
||||
OpenCOLLADAStreamWriter
|
||||
OpenCOLLADASaxFrameworkLoader
|
||||
OpenCOLLADAFramework
|
||||
OpenCOLLADABaseUtils
|
||||
GeneratedSaxParser
|
||||
MathMLSolver
|
||||
)
|
||||
|
||||
# Fedora openCOLLADA package links these statically
|
||||
# note that order is important here ot it wont link
|
||||
SET(_opencollada_FIND_STATIC_COMPONENTS
|
||||
buffer
|
||||
ftoa
|
||||
UTF
|
||||
)
|
||||
|
||||
SET(_opencollada_SEARCH_DIRS
|
||||
${OPENCOLLADA_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/opencollada
|
||||
)
|
||||
|
||||
SET(_opencollada_INCLUDES)
|
||||
FOREACH(COMPONENT ${_opencollada_FIND_INCLUDES})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
# need to use this even thouh we are looking for a dir
|
||||
FIND_FILE(OPENCOLLADA_${UPPERCOMPONENT}_INCLUDE_DIR
|
||||
NAMES
|
||||
${COMPONENT}/include
|
||||
${COMPONENT}
|
||||
# Ubuntu ppa needs this.
|
||||
# Alternative would be to suffix all members of search path
|
||||
# but this is less trouble, just looks strange.
|
||||
include/opencollada/${COMPONENT}
|
||||
include/${COMPONENT}/include
|
||||
HINTS
|
||||
${_opencollada_SEARCH_DIRS}
|
||||
)
|
||||
MARK_AS_ADVANCED(OPENCOLLADA_${UPPERCOMPONENT}_INCLUDE_DIR)
|
||||
LIST(APPEND _opencollada_INCLUDES "${OPENCOLLADA_${UPPERCOMPONENT}_INCLUDE_DIR}")
|
||||
ENDFOREACH()
|
||||
|
||||
|
||||
SET(_opencollada_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_opencollada_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_opencollada_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
# Ubuntu ppa needs this.
|
||||
lib64/opencollada lib/opencollada
|
||||
)
|
||||
MARK_AS_ADVANCED(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY)
|
||||
LIST(APPEND _opencollada_LIBRARIES "${OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDFOREACH()
|
||||
|
||||
FOREACH(COMPONENT ${_opencollada_FIND_STATIC_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_opencollada_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
# Ubuntu ppa needs this.
|
||||
lib64/opencollada lib/opencollada
|
||||
)
|
||||
MARK_AS_ADVANCED(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY)
|
||||
IF(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY)
|
||||
LIST(APPEND _opencollada_LIBRARIES "${OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENCOLLADA_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenCOLLADA DEFAULT_MSG
|
||||
_opencollada_LIBRARIES _opencollada_INCLUDES)
|
||||
|
||||
|
||||
IF(OPENCOLLADA_FOUND)
|
||||
SET(OPENCOLLADA_LIBRARIES ${_opencollada_LIBRARIES})
|
||||
SET(OPENCOLLADA_INCLUDE_DIRS ${_opencollada_INCLUDES})
|
||||
ENDIF(OPENCOLLADA_FOUND)
|
||||
|
||||
UNSET(COMPONENT)
|
||||
UNSET(UPPERCOMPONENT)
|
||||
UNSET(_opencollada_LIBRARIES)
|
||||
UNSET(_opencollada_INCLUDES)
|
@@ -1,95 +0,0 @@
|
||||
# - Find OpenColorIO library
|
||||
# Find the native OpenColorIO includes and library
|
||||
# This module defines
|
||||
# OPENCOLORIO_INCLUDE_DIRS, where to find OpenColorIO.h, Set when
|
||||
# OPENCOLORIO_INCLUDE_DIR is found.
|
||||
# OPENCOLORIO_LIBRARIES, libraries to link against to use OpenColorIO.
|
||||
# OPENCOLORIO_ROOT_DIR, The base directory to search for OpenColorIO.
|
||||
# This can also be an environment variable.
|
||||
# OPENCOLORIO_FOUND, If false, do not try to use OpenColorIO.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENCOLORIO_LIBRARY, where to find the OpenColorIO library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2012 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If OPENCOLORIO_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENCOLORIO_ROOT_DIR AND NOT $ENV{OPENCOLORIO_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENCOLORIO_ROOT_DIR $ENV{OPENCOLORIO_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_opencolorio_FIND_COMPONENTS
|
||||
OpenColorIO
|
||||
yaml-cpp
|
||||
tinyxml
|
||||
)
|
||||
|
||||
SET(_opencolorio_SEARCH_DIRS
|
||||
${OPENCOLORIO_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/ocio
|
||||
)
|
||||
|
||||
FIND_PATH(OPENCOLORIO_INCLUDE_DIR
|
||||
NAMES
|
||||
OpenColorIO/OpenColorIO.h
|
||||
HINTS
|
||||
${_opencolorio_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
SET(_opencolorio_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_opencolorio_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_opencolorio_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
IF(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
|
||||
LIST(APPEND _opencolorio_LIBRARIES "${OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENCOLORIO_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenColorIO DEFAULT_MSG
|
||||
_opencolorio_LIBRARIES OPENCOLORIO_INCLUDE_DIR)
|
||||
|
||||
IF(OPENCOLORIO_FOUND)
|
||||
SET(OPENCOLORIO_LIBRARIES ${_opencolorio_LIBRARIES})
|
||||
SET(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO_INCLUDE_DIR})
|
||||
ENDIF(OPENCOLORIO_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENCOLORIO_INCLUDE_DIR
|
||||
OPENCOLORIO_LIBRARY
|
||||
OPENCOLORIO_OPENCOLORIO_LIBRARY
|
||||
OPENCOLORIO_TINYXML_LIBRARY
|
||||
OPENCOLORIO_YAML-CPP_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(COMPONENT)
|
||||
UNSET(UPPERCOMPONENT)
|
||||
UNSET(_opencolorio_FIND_COMPONENTS)
|
||||
UNSET(_opencolorio_LIBRARIES)
|
||||
UNSET(_opencolorio_SEARCH_DIRS)
|
@@ -1,146 +0,0 @@
|
||||
# - Find OpenEXR library
|
||||
# Find the native OpenEXR includes and library
|
||||
# This module defines
|
||||
# OPENEXR_INCLUDE_DIRS, where to find ImfXdr.h, etc. Set when
|
||||
# OPENEXR_INCLUDE_DIR is found.
|
||||
# OPENEXR_LIBRARIES, libraries to link against to use OpenEXR.
|
||||
# OPENEXR_ROOT_DIR, The base directory to search for OpenEXR.
|
||||
# This can also be an environment variable.
|
||||
# OPENEXR_FOUND, If false, do not try to use OpenEXR.
|
||||
#
|
||||
# For individual library access these advanced settings are available
|
||||
# OPENEXR_HALF_LIBRARY, Path to Half library
|
||||
# OPENEXR_IEX_LIBRARY, Path to Half library
|
||||
# OPENEXR_ILMIMF_LIBRARY, Path to Ilmimf library
|
||||
# OPENEXR_ILMTHREAD_LIBRARY, Path to IlmThread library
|
||||
# OPENEXR_IMATH_LIBRARY, Path to Imath library
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENEXR_LIBRARY, where to find the OpenEXR library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If OPENEXR_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
# Old versions (before 2.0?) do not have any version string, just assuming this should be fine though.
|
||||
SET(_openexr_libs_ver_init "2.0")
|
||||
|
||||
SET(_openexr_FIND_COMPONENTS
|
||||
Half
|
||||
Iex
|
||||
IlmImf
|
||||
IlmThread
|
||||
Imath
|
||||
)
|
||||
|
||||
SET(_openexr_SEARCH_DIRS
|
||||
${OPENEXR_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/openexr
|
||||
)
|
||||
|
||||
FIND_PATH(OPENEXR_INCLUDE_DIR
|
||||
NAMES
|
||||
OpenEXR/ImfXdr.h
|
||||
HINTS
|
||||
${_openexr_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
# If the headers were found, get the version from config file, if not already set.
|
||||
IF(OPENEXR_INCLUDE_DIR)
|
||||
IF(NOT OPENEXR_VERSION)
|
||||
|
||||
FIND_FILE(_openexr_CONFIG
|
||||
NAMES
|
||||
OpenEXRConfig.h
|
||||
PATHS
|
||||
"${OPENEXR_INCLUDE_DIR}"
|
||||
"${OPENEXR_INCLUDE_DIR}/OpenEXR"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
IF(_openexr_CONFIG)
|
||||
FILE(STRINGS "${_openexr_CONFIG}" OPENEXR_BUILD_SPECIFICATION
|
||||
REGEX "^[ \t]*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
|
||||
ELSE()
|
||||
MESSAGE(WARNING "Could not find \"OpenEXRConfig.h\" in \"${OPENEXR_INCLUDE_DIR}\"")
|
||||
ENDIF()
|
||||
|
||||
IF(OPENEXR_BUILD_SPECIFICATION)
|
||||
MESSAGE(STATUS "${OPENEXR_BUILD_SPECIFICATION}")
|
||||
STRING(REGEX REPLACE ".*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
|
||||
"\\1" _openexr_libs_ver_init ${OPENEXR_BUILD_SPECIFICATION})
|
||||
ELSE()
|
||||
MESSAGE(WARNING "Could not determine ILMBase library version, assuming ${_openexr_libs_ver_init}.")
|
||||
ENDIF()
|
||||
|
||||
UNSET(_openexr_CONFIG CACHE)
|
||||
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET("OPENEXR_VERSION" ${_openexr_libs_ver_init} CACHE STRING "Version of OpenEXR lib")
|
||||
UNSET(_openexr_libs_ver_init)
|
||||
|
||||
STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
|
||||
|
||||
SET(_openexr_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}-${_openexr_libs_ver} ${COMPONENT}
|
||||
HINTS
|
||||
${_openexr_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
LIST(APPEND _openexr_LIBRARIES "${OPENEXR_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDFOREACH()
|
||||
|
||||
UNSET(_openexr_libs_ver)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENEXR_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
|
||||
_openexr_LIBRARIES OPENEXR_INCLUDE_DIR)
|
||||
|
||||
IF(OPENEXR_FOUND)
|
||||
SET(OPENEXR_LIBRARIES ${_openexr_LIBRARIES})
|
||||
# Both include paths are needed because of dummy OSL headers mixing #include <OpenEXR/foo.h> and #include <foo.h> :(
|
||||
SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENEXR_INCLUDE_DIR
|
||||
OPENEXR_VERSION
|
||||
)
|
||||
FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
MARK_AS_ADVANCED(OPENEXR_${UPPERCOMPONENT}_LIBRARY)
|
||||
ENDFOREACH()
|
||||
|
||||
UNSET(COMPONENT)
|
||||
UNSET(UPPERCOMPONENT)
|
||||
UNSET(_openexr_FIND_COMPONENTS)
|
||||
UNSET(_openexr_LIBRARIES)
|
||||
UNSET(_openexr_SEARCH_DIRS)
|
@@ -1,78 +0,0 @@
|
||||
# - Try to find OpenGLES
|
||||
# Once done this will define
|
||||
#
|
||||
# OPENGLES_FOUND - system has OpenGLES and EGL
|
||||
# OPENGL_EGL_FOUND - system has EGL
|
||||
# OPENGLES_INCLUDE_DIR - the GLES include directory
|
||||
# OPENGLES_LIBRARY - the GLES library
|
||||
# OPENGLES_EGL_INCLUDE_DIR - the EGL include directory
|
||||
# OPENGLES_EGL_LIBRARY - the EGL library
|
||||
# OPENGLES_LIBRARIES - all libraries needed for OpenGLES
|
||||
# OPENGLES_INCLUDES - all includes needed for OpenGLES
|
||||
|
||||
# If OPENGLES_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENGLES_ROOT_DIR AND NOT $ENV{OPENGLES_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENGLES_ROOT_DIR $ENV{OPENGLES_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_opengles_SEARCH_DIRS
|
||||
${OPENGLES_ROOT_DIR}
|
||||
/usr/local
|
||||
)
|
||||
|
||||
FIND_PATH(OPENGLES_INCLUDE_DIR
|
||||
NAMES
|
||||
GLES2/gl2.h
|
||||
HINTS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENGLES_LIBRARY
|
||||
NAMES
|
||||
GLESv2
|
||||
PATHS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_PATH(OPENGLES_EGL_INCLUDE_DIR
|
||||
NAMES
|
||||
EGL/egl.h
|
||||
HINTS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENGLES_EGL_LIBRARY
|
||||
NAMES
|
||||
EGL
|
||||
HINTS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
IF(OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
|
||||
SET(OPENGL_EGL_FOUND "YES")
|
||||
ELSE()
|
||||
SET(OPENGL_EGL_FOUND "NO")
|
||||
ENDIF()
|
||||
|
||||
IF(OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND
|
||||
OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
|
||||
SET(OPENGLES_LIBRARIES ${OPENGLES_LIBRARY} ${OPENGLES_LIBRARIES}
|
||||
${OPENGLES_EGL_LIBRARY})
|
||||
SET(OPENGLES_INCLUDES ${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR})
|
||||
SET(OPENGLES_FOUND "YES")
|
||||
ELSE()
|
||||
SET(OPENGLES_FOUND "NO")
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENGLES_EGL_INCLUDE_DIR
|
||||
OPENGLES_EGL_LIBRARY
|
||||
OPENGLES_LIBRARY
|
||||
OPENGLES_INCLUDE_DIR
|
||||
)
|
||||
|
||||
UNSET(_opengles_SEARCH_DIRS)
|
@@ -1,89 +0,0 @@
|
||||
# - Find OpenImageIO library
|
||||
# Find the native OpenImageIO includes and library
|
||||
# This module defines
|
||||
# OPENIMAGEIO_INCLUDE_DIRS, where to find openimageio.h, Set when
|
||||
# OPENIMAGEIO_INCLUDE_DIR is found.
|
||||
# OPENIMAGEIO_LIBRARIES, libraries to link against to use OpenImageIO.
|
||||
# OPENIMAGEIO_ROOT_DIR, The base directory to search for OpenImageIO.
|
||||
# This can also be an environment variable.
|
||||
# OPENIMAGEIO_FOUND, If false, do not try to use OpenImageIO.
|
||||
# OPENIMAGEIO_PUGIXML_FOUND, Indicates whether OIIO has biltin PuguXML parser.
|
||||
# OPENIMAGEIO_IDIFF, full path to idiff application if found.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENIMAGEIO_LIBRARY, where to find the OpenImageIO library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If OPENIMAGEIO_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENIMAGEIO_ROOT_DIR AND NOT $ENV{OPENIMAGEIO_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENIMAGEIO_ROOT_DIR $ENV{OPENIMAGEIO_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_openimageio_SEARCH_DIRS
|
||||
${OPENIMAGEIO_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/oiio
|
||||
)
|
||||
|
||||
FIND_PATH(OPENIMAGEIO_INCLUDE_DIR
|
||||
NAMES
|
||||
OpenImageIO/imageio.h
|
||||
HINTS
|
||||
${_openimageio_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENIMAGEIO_LIBRARY
|
||||
NAMES
|
||||
OpenImageIO
|
||||
HINTS
|
||||
${_openimageio_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_FILE(OPENIMAGEIO_IDIFF
|
||||
NAMES
|
||||
idiff
|
||||
${OPENIMAGEIO_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
bin
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEIO_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageIO DEFAULT_MSG
|
||||
OPENIMAGEIO_LIBRARY OPENIMAGEIO_INCLUDE_DIR)
|
||||
|
||||
IF(OPENIMAGEIO_FOUND)
|
||||
SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
|
||||
SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
|
||||
IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp)
|
||||
SET(OPENIMAGEIO_PUGIXML_FOUND TRUE)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(OPENIMAGEIO_PUGIXML_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENIMAGEIO_INCLUDE_DIR
|
||||
OPENIMAGEIO_LIBRARY
|
||||
OPENIMAGEIO_IDIFF
|
||||
)
|
||||
|
||||
UNSET(_openimageio_SEARCH_DIRS)
|
@@ -1,73 +0,0 @@
|
||||
# - Find OpenJPEG library
|
||||
# Find the native OpenJPEG includes and library
|
||||
# This module defines
|
||||
# OPENJPEG_INCLUDE_DIRS, where to find openjpeg.h, Set when
|
||||
# OPENJPEG_INCLUDE_DIR is found.
|
||||
# OPENJPEG_LIBRARIES, libraries to link against to use OpenJPEG.
|
||||
# OPENJPEG_ROOT_DIR, The base directory to search for OpenJPEG.
|
||||
# This can also be an environment variable.
|
||||
# OPENJPEG_FOUND, If false, do not try to use OpenJPEG.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENJPEG_LIBRARY, where to find the OpenJPEG library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If OPENJPEG_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENJPEG_ROOT_DIR AND NOT $ENV{OPENJPEG_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENJPEG_ROOT_DIR $ENV{OPENJPEG_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_openjpeg_SEARCH_DIRS
|
||||
${OPENJPEG_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(OPENJPEG_INCLUDE_DIR
|
||||
NAMES
|
||||
openjpeg.h
|
||||
HINTS
|
||||
${_openjpeg_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
include/openjpeg-1.5
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENJPEG_LIBRARY
|
||||
NAMES
|
||||
openjpeg
|
||||
HINTS
|
||||
${_openjpeg_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENJPEG_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenJPEG DEFAULT_MSG
|
||||
OPENJPEG_LIBRARY OPENJPEG_INCLUDE_DIR)
|
||||
|
||||
IF(OPENJPEG_FOUND)
|
||||
SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY})
|
||||
SET(OPENJPEG_INCLUDE_DIRS ${OPENJPEG_INCLUDE_DIR})
|
||||
ENDIF(OPENJPEG_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENJPEG_INCLUDE_DIR
|
||||
OPENJPEG_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_openjpeg_SEARCH_DIRS)
|
@@ -1,98 +0,0 @@
|
||||
# - Find OpenShadingLanguage library
|
||||
# Find the native OpenShadingLanguage includes and library
|
||||
# This module defines
|
||||
# OSL_INCLUDE_DIRS, where to find OSL headers, Set when
|
||||
# OSL_INCLUDE_DIR is found.
|
||||
# OSL_LIBRARIES, libraries to link against to use OSL.
|
||||
# OSL_ROOT_DIR, the base directory to search for OSL.
|
||||
# This can also be an environment variable.
|
||||
# OSL_COMPILER, full path to OSL script compiler.
|
||||
# OSL_FOUND, if false, do not try to use OSL.
|
||||
# OSL_LIBRARY_VERSION_MAJOR, OSL_LIBRARY_VERSION_MINOR, the major
|
||||
# and minor versions of OSL library if found.
|
||||
#
|
||||
#=============================================================================
|
||||
# Copyright 2014 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If OSL_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OSL_ROOT_DIR AND NOT $ENV{OSL_ROOT_DIR} STREQUAL "")
|
||||
SET(OSL_ROOT_DIR $ENV{OSL_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_osl_FIND_COMPONENTS
|
||||
oslcomp
|
||||
oslexec
|
||||
oslquery
|
||||
)
|
||||
|
||||
SET(_osl_SEARCH_DIRS
|
||||
${OSL_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/osl
|
||||
)
|
||||
|
||||
FIND_PATH(OSL_INCLUDE_DIR
|
||||
NAMES
|
||||
OSL/oslversion.h
|
||||
HINTS
|
||||
${_osl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
SET(_osl_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OSL_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_osl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
LIST(APPEND _osl_LIBRARIES "${OSL_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDFOREACH()
|
||||
|
||||
FIND_PROGRAM(OSL_COMPILER oslc
|
||||
HINTS ${_osl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES bin)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OSL_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSL DEFAULT_MSG _osl_LIBRARIES OSL_INCLUDE_DIR OSL_COMPILER)
|
||||
|
||||
IF(OSL_FOUND)
|
||||
SET(OSL_LIBRARIES ${_osl_LIBRARIES})
|
||||
SET(OSL_INCLUDE_DIRS ${OSL_INCLUDE_DIR})
|
||||
|
||||
FILE(STRINGS "${OSL_INCLUDE_DIR}/OSL/oslversion.h" OSL_LIBRARY_VERSION_MAJOR
|
||||
REGEX "^[ \t]*#define[ \t]+OSL_LIBRARY_VERSION_MAJOR[ \t]+[0-9]+.*$")
|
||||
FILE(STRINGS "${OSL_INCLUDE_DIR}/OSL/oslversion.h" OSL_LIBRARY_VERSION_MINOR
|
||||
REGEX "^[ \t]*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+[0-9]+.*$")
|
||||
STRING(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MAJOR[ \t]+([.0-9]+).*"
|
||||
"\\1" OSL_LIBRARY_VERSION_MAJOR ${OSL_LIBRARY_VERSION_MAJOR})
|
||||
STRING(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+([.0-9]+).*"
|
||||
"\\1" OSL_LIBRARY_VERSION_MINOR ${OSL_LIBRARY_VERSION_MINOR})
|
||||
ENDIF(OSL_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OSL_INCLUDE_DIR
|
||||
)
|
||||
FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
MARK_AS_ADVANCED(OSL_${UPPERCOMPONENT}_LIBRARY)
|
||||
ENDFOREACH()
|
@@ -1,68 +0,0 @@
|
||||
# - Find PCRE library
|
||||
# Find the native PCRE includes and library
|
||||
# This module defines
|
||||
# PCRE_INCLUDE_DIRS, where to find pcre.h, Set when
|
||||
# PCRE_INCLUDE_DIR is found.
|
||||
# PCRE_LIBRARIES, libraries to link against to use PCRE.
|
||||
# PCRE_ROOT_DIR, The base directory to search for PCRE.
|
||||
# This can also be an environment variable.
|
||||
# PCRE_FOUND, If false, do not try to use PCRE.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# PCRE_LIBRARY, where to find the PCRE library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If PCRE_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT PCRE_ROOT_DIR AND NOT $ENV{PCRE_ROOT_DIR} STREQUAL "")
|
||||
SET(PCRE_ROOT_DIR $ENV{PCRE_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_pcre_SEARCH_DIRS
|
||||
${PCRE_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(PCRE_INCLUDE_DIR pcre.h
|
||||
HINTS
|
||||
${_pcre_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(PCRE_LIBRARY
|
||||
NAMES
|
||||
pcre
|
||||
HINTS
|
||||
${_pcre_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG
|
||||
PCRE_LIBRARY PCRE_INCLUDE_DIR)
|
||||
|
||||
IF(PCRE_FOUND)
|
||||
SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
|
||||
SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
|
||||
ENDIF(PCRE_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
PCRE_INCLUDE_DIR
|
||||
PCRE_LIBRARY
|
||||
)
|
@@ -1,73 +0,0 @@
|
||||
# - Find PugiXML library
|
||||
# Find the native PugiXML includes and library
|
||||
# This module defines
|
||||
# PUGIXML_INCLUDE_DIRS, where to find pugixml.hpp, Set when
|
||||
# PugiXML is found.
|
||||
# PUGIXML_LIBRARIES, libraries to link against to use PugiiXML.
|
||||
# PUGIXML_ROOT_DIR, The base directory to search for PugiXML.
|
||||
# This can also be an environment variable.
|
||||
# PUGIXML_FOUND, If false, do not try to use PugiXML.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# PUGIXML_LIBRARY, where to find the PugiXML library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If PUGIXML_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT PUGIXML_ROOT_DIR AND NOT $ENV{PUGIXML_ROOT_DIR} STREQUAL "")
|
||||
SET(PUGIXML_ROOT_DIR $ENV{PUGIXML_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_pugixml_SEARCH_DIRS
|
||||
${PUGIXML_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/oiio
|
||||
)
|
||||
|
||||
FIND_PATH(PUGIXML_INCLUDE_DIR
|
||||
NAMES
|
||||
pugixml.hpp
|
||||
HINTS
|
||||
${_pugixml_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(PUGIXML_LIBRARY
|
||||
NAMES
|
||||
pugixml
|
||||
HINTS
|
||||
${_pugixml_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set PUGIXML_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PUGIXML DEFAULT_MSG
|
||||
PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)
|
||||
|
||||
IF(PUGIXML_FOUND)
|
||||
SET(PUGIXML_LIBRARIES ${PUGIXML_LIBRARY})
|
||||
SET(PUGIXML_INCLUDE_DIRS ${PUGIXML_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(PUGIXML_PUGIXML_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
PUGIXML_INCLUDE_DIR
|
||||
PUGIXML_LIBRARY
|
||||
)
|
@@ -1,214 +0,0 @@
|
||||
# - Find Python libraries
|
||||
# Find the native Python includes and library
|
||||
#
|
||||
# Note:, This is not _yet_ intended to be a general python module for other
|
||||
# projects to use since its hard coded to fixed Python version
|
||||
# as Blender only supports a single Python version at the moment.
|
||||
#
|
||||
# Note:
|
||||
# this is for Blender/Unix Python only.
|
||||
#
|
||||
# This module defines
|
||||
# PYTHON_VERSION
|
||||
# PYTHON_INCLUDE_DIRS
|
||||
# PYTHON_INCLUDE_CONFIG_DIRS
|
||||
# PYTHON_LIBRARIES
|
||||
# PYTHON_LIBPATH, Used for installation
|
||||
# PYTHON_SITE_PACKAGES, Used for installation (as a Python module)
|
||||
# PYTHON_LINKFLAGS
|
||||
# PYTHON_ROOT_DIR, The base directory to search for Python.
|
||||
# This can also be an environment variable.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# PYTHON_LIBRARY, where to find the python library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If PYTHON_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "")
|
||||
SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(PYTHON_VERSION 3.4 CACHE STRING "Python Version (major and minor only)")
|
||||
MARK_AS_ADVANCED(PYTHON_VERSION)
|
||||
|
||||
|
||||
# See: http://docs.python.org/extending/embedding.html#linking-requirements
|
||||
# for why this is needed
|
||||
SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic" CACHE STRING "Linker flags for python")
|
||||
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_INC_CONF_DEF OFF)
|
||||
SET(_IS_LIB_DEF OFF)
|
||||
SET(_IS_LIB_PATH_DEF OFF)
|
||||
IF(DEFINED PYTHON_INCLUDE_DIR)
|
||||
SET(_IS_INC_DEF ON)
|
||||
ENDIF()
|
||||
IF(DEFINED PYTHON_INCLUDE_CONFIG_DIR)
|
||||
SET(_IS_INC_CONF_DEF ON)
|
||||
ENDIF()
|
||||
IF(DEFINED PYTHON_LIBRARY)
|
||||
SET(_IS_LIB_DEF ON)
|
||||
ENDIF()
|
||||
IF(DEFINED PYTHON_LIBPATH)
|
||||
SET(_IS_LIB_PATH_DEF ON)
|
||||
ENDIF()
|
||||
|
||||
|
||||
# only search for the dirs if we havn't already
|
||||
IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_LIB_PATH_DEF))
|
||||
|
||||
SET(_python_ABI_FLAGS
|
||||
"m;mu;u; " # release
|
||||
"dm;dmu;du;d" # debug
|
||||
)
|
||||
|
||||
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
|
||||
SET(_python_SEARCH_DIRS
|
||||
${PYTHON_ROOT_DIR}
|
||||
"$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
|
||||
"/opt/py${_PYTHON_VERSION_NO_DOTS}"
|
||||
"/opt/lib/python-${PYTHON_VERSION}"
|
||||
)
|
||||
|
||||
FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS})
|
||||
#IF(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
# SET(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}")
|
||||
#ENDIF()
|
||||
STRING(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS})
|
||||
|
||||
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}
|
||||
include/${CMAKE_LIBRARY_ARCHITECTURE}/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT DEFINED PYTHON_INCLUDE_CONFIG_DIR)
|
||||
FIND_PATH(PYTHON_INCLUDE_CONFIG_DIR
|
||||
NAMES
|
||||
pyconfig.h
|
||||
HINTS
|
||||
${_python_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}
|
||||
include/${CMAKE_LIBRARY_ARCHITECTURE}/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}
|
||||
)
|
||||
IF((NOT PYTHON_INCLUDE_CONFIG_DIR) AND PYTHON_INCLUDE_DIR)
|
||||
# Fallback...
|
||||
UNSET(PYTHON_INCLUDE_CONFIG_DIR CACHE)
|
||||
SET(PYTHON_INCLUDE_CONFIG_DIR ${PYTHON_INCLUDE_DIR} CACHE PATH "")
|
||||
ENDIF()
|
||||
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(NOT DEFINED PYTHON_LIBPATH)
|
||||
FIND_PATH(PYTHON_LIBPATH
|
||||
NAMES
|
||||
"python${PYTHON_VERSION}/abc.py" # This is a bit hackish! :/
|
||||
HINTS
|
||||
${_python_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
IF((NOT PYTHON_LIBPATH) AND PYTHON_LIBRARY)
|
||||
# Fallback...
|
||||
UNSET(PYTHON_LIBPATH CACHE)
|
||||
GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(PYTHON_LIBRARY AND PYTHON_LIBPATH AND PYTHON_INCLUDE_DIR AND PYTHON_INCLUDE_CONFIG_DIR)
|
||||
break()
|
||||
ELSE()
|
||||
# ensure we dont find values from 2 different ABI versions
|
||||
IF(NOT _IS_INC_DEF)
|
||||
UNSET(PYTHON_INCLUDE_DIR CACHE)
|
||||
ENDIF()
|
||||
IF(NOT _IS_INC_CONF_DEF)
|
||||
UNSET(PYTHON_INCLUDE_CONFIG_DIR CACHE)
|
||||
ENDIF()
|
||||
IF(NOT _IS_LIB_DEF)
|
||||
UNSET(PYTHON_LIBRARY CACHE)
|
||||
ENDIF()
|
||||
IF(NOT _IS_LIB_PATH_DEF)
|
||||
UNSET(PYTHON_LIBPATH CACHE)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
UNSET(_CURRENT_ABI_FLAGS)
|
||||
UNSET(_CURRENT_PATH)
|
||||
|
||||
UNSET(_python_ABI_FLAGS)
|
||||
UNSET(_python_SEARCH_DIRS)
|
||||
ENDIF()
|
||||
|
||||
UNSET(_IS_INC_DEF)
|
||||
UNSET(_IS_INC_CONF_DEF)
|
||||
UNSET(_IS_LIB_DEF)
|
||||
UNSET(_IS_LIB_PATH_DEF)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and SET PYTHONLIBSUNIX_FOUND to TRUE IF
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibsUnix DEFAULT_MSG
|
||||
PYTHON_LIBRARY PYTHON_LIBPATH PYTHON_INCLUDE_DIR PYTHON_INCLUDE_CONFIG_DIR)
|
||||
|
||||
IF(PYTHONLIBSUNIX_FOUND)
|
||||
# Assign cache items
|
||||
SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR} ${PYTHON_INCLUDE_CONFIG_DIR})
|
||||
SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
|
||||
|
||||
FIND_FILE(PYTHON_SITE_PACKAGES
|
||||
NAMES
|
||||
# debian specific
|
||||
dist-packages
|
||||
site-packages
|
||||
HINTS
|
||||
${PYTHON_LIBPATH}/python${PYTHON_VERSION}
|
||||
)
|
||||
|
||||
# we need this for installation
|
||||
# XXX No more valid with debian-like py3.4 packages...
|
||||
# GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
|
||||
|
||||
# not used
|
||||
# SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
PYTHON_INCLUDE_DIR
|
||||
PYTHON_INCLUDE_CONFIG_DIR
|
||||
PYTHON_LIBRARY
|
||||
PYTHON_LIBPATH
|
||||
PYTHON_SITE_PACKAGES
|
||||
)
|
@@ -1,72 +0,0 @@
|
||||
# - Find SDL library
|
||||
# Find the native SDL includes and library
|
||||
# This module defines
|
||||
# SDL2_INCLUDE_DIRS, where to find SDL.h, Set when SDL2_INCLUDE_DIR is found.
|
||||
# SDL2_LIBRARIES, libraries to link against to use SDL.
|
||||
# SDL2_ROOT_DIR, The base directory to search for SDL.
|
||||
# This can also be an environment variable.
|
||||
# SDL2_FOUND, If false, do not try to use SDL.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# SDL2_LIBRARY, where to find the SDL library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If SDL2_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT SDL2_ROOT_DIR AND NOT $ENV{SDL2_ROOT_DIR} STREQUAL "")
|
||||
SET(SDL2_ROOT_DIR $ENV{SDL2_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_sdl2_SEARCH_DIRS
|
||||
${SDL2_ROOT_DIR}
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(SDL2_INCLUDE_DIR
|
||||
NAMES
|
||||
SDL.h
|
||||
HINTS
|
||||
${_sdl2_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include/SDL2 include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SDL2_LIBRARY
|
||||
NAMES
|
||||
SDL2
|
||||
HINTS
|
||||
${_sdl2_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set SDL2_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 DEFAULT_MSG
|
||||
SDL2_LIBRARY SDL2_INCLUDE_DIR)
|
||||
|
||||
IF(SDL2_FOUND)
|
||||
SET(SDL2_LIBRARIES ${SDL2_LIBRARY})
|
||||
SET(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})
|
||||
ENDIF(SDL2_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
SDL2_INCLUDE_DIR
|
||||
SDL2_LIBRARY
|
||||
)
|
@@ -1,68 +0,0 @@
|
||||
# - Find SndFile library
|
||||
# Find the native SndFile includes and library
|
||||
# This module defines
|
||||
# SNDFILE_INCLUDE_DIRS, where to find sndfile.h, Set when
|
||||
# SNDFILE_INCLUDE_DIR is found.
|
||||
# SNDFILE_LIBRARIES, libraries to link against to use SndFile.
|
||||
# SNDFILE_ROOT_DIR, The base directory to search for SndFile.
|
||||
# This can also be an environment variable.
|
||||
# SNDFILE_FOUND, If false, do not try to use SndFile.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# SNDFILE_LIBRARY, where to find the SndFile library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If SNDFILE_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT SNDFILE_ROOT_DIR AND NOT $ENV{SNDFILE_ROOT_DIR} STREQUAL "")
|
||||
SET(SNDFILE_ROOT_DIR $ENV{SNDFILE_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_sndfile_SEARCH_DIRS
|
||||
${SNDFILE_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(SNDFILE_INCLUDE_DIR sndfile.h
|
||||
HINTS
|
||||
${_sndfile_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SNDFILE_LIBRARY
|
||||
NAMES
|
||||
sndfile
|
||||
HINTS
|
||||
${_sndfile_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
|
||||
SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
|
||||
|
||||
IF(SNDFILE_FOUND)
|
||||
SET(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY})
|
||||
SET(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR})
|
||||
ENDIF(SNDFILE_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
SNDFILE_INCLUDE_DIR
|
||||
SNDFILE_LIBRARY
|
||||
)
|
@@ -1,70 +0,0 @@
|
||||
# - Find Spacenav library
|
||||
# Find the native Spacenav includes and library
|
||||
# This module defines
|
||||
# SPACENAV_INCLUDE_DIRS, where to find spnav.h, Set when
|
||||
# SPACENAV_INCLUDE_DIR is found.
|
||||
# SPACENAV_LIBRARIES, libraries to link against to use Spacenav.
|
||||
# SPACENAV_ROOT_DIR, The base directory to search for Spacenav.
|
||||
# This can also be an environment variable.
|
||||
# SPACENAV_FOUND, If false, do not try to use Spacenav.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# SPACENAV_LIBRARY, where to find the Spacenav library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If SPACENAV_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT SPACENAV_ROOT_DIR AND NOT $ENV{SPACENAV_ROOT_DIR} STREQUAL "")
|
||||
SET(SPACENAV_ROOT_DIR $ENV{SPACENAV_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_spacenav_SEARCH_DIRS
|
||||
${SPACENAV_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(SPACENAV_INCLUDE_DIR
|
||||
NAMES
|
||||
spnav.h
|
||||
HINTS
|
||||
${_spacenav_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SPACENAV_LIBRARY
|
||||
NAMES
|
||||
spnav
|
||||
HINTS
|
||||
${_spacenav_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set SPACENAV_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Spacenav DEFAULT_MSG
|
||||
SPACENAV_LIBRARY SPACENAV_INCLUDE_DIR)
|
||||
|
||||
IF(SPACENAV_FOUND)
|
||||
SET(SPACENAV_LIBRARIES ${SPACENAV_LIBRARY})
|
||||
SET(SPACENAV_INCLUDE_DIRS ${SPACENAV_INCLUDE_DIR})
|
||||
ENDIF(SPACENAV_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
SPACENAV_INCLUDE_DIR
|
||||
SPACENAV_LIBRARY
|
||||
)
|
@@ -1,68 +0,0 @@
|
||||
# - Find XML2 library
|
||||
# Find the native XML2 includes and library
|
||||
# This module defines
|
||||
# XML2_INCLUDE_DIRS, where to find xml2.h, Set when
|
||||
# XML2_INCLUDE_DIR is found.
|
||||
# XML2_LIBRARIES, libraries to link against to use XML2.
|
||||
# XML2_ROOT_DIR, The base directory to search for XML2.
|
||||
# This can also be an environment variable.
|
||||
# XML2_FOUND, If false, do not try to use XML2.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# XML2_LIBRARY, where to find the XML2 library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If XML2_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT XML2_ROOT_DIR AND NOT $ENV{XML2_ROOT_DIR} STREQUAL "")
|
||||
SET(XML2_ROOT_DIR $ENV{XML2_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_xml2_SEARCH_DIRS
|
||||
${XML2_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(XML2_INCLUDE_DIR libxml2/libxml/xpath.h
|
||||
HINTS
|
||||
${_xml2_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(XML2_LIBRARY
|
||||
NAMES
|
||||
xml2
|
||||
HINTS
|
||||
${_xml2_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set XML2_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XML2 DEFAULT_MSG
|
||||
XML2_LIBRARY XML2_INCLUDE_DIR)
|
||||
|
||||
IF(XML2_FOUND)
|
||||
SET(XML2_LIBRARIES ${XML2_LIBRARY})
|
||||
SET(XML2_INCLUDE_DIRS ${XML2_INCLUDE_DIR})
|
||||
ENDIF(XML2_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
XML2_INCLUDE_DIR
|
||||
XML2_LIBRARY
|
||||
)
|
@@ -1,49 +0,0 @@
|
||||
#=============================================================================
|
||||
# Copyright 2014 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#
|
||||
# Inspired on the Testing.cmake from Libmv
|
||||
#
|
||||
#=============================================================================
|
||||
|
||||
macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
|
||||
if(WITH_GTESTS)
|
||||
get_property(_current_include_directories
|
||||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PROPERTY INCLUDE_DIRECTORIES)
|
||||
set(TEST_INC
|
||||
${_current_include_directories}
|
||||
${CMAKE_SOURCE_DIR}/tests/gtests
|
||||
${CMAKE_SOURCE_DIR}/extern/libmv/third_party/glog/src
|
||||
${CMAKE_SOURCE_DIR}/extern/libmv/third_party/gflags
|
||||
${CMAKE_SOURCE_DIR}/extern/gtest/include
|
||||
)
|
||||
unset(_current_include_directories)
|
||||
|
||||
add_executable(${NAME}_test ${SRC})
|
||||
target_link_libraries(${NAME}_test
|
||||
${EXTRA_LIBS}
|
||||
bf_testing_main
|
||||
bf_intern_guardedalloc
|
||||
extern_gtest
|
||||
# needed for glog
|
||||
${PTHREADS_LIBRARIES}
|
||||
extern_glog)
|
||||
set_target_properties(${NAME}_test PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${TESTS_OUTPUT_DIR}"
|
||||
INCLUDE_DIRECTORIES "${TEST_INC}")
|
||||
add_test(${NAME}_test ${TESTS_OUTPUT_DIR}/${NAME}_test)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(BLENDER_TEST NAME EXTRA_LIBS)
|
||||
BLENDER_SRC_GTEST("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}")
|
||||
endmacro()
|
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# VLMC RPM Finder
|
||||
# Authors: Rohit Yadav <rohityadav89@gmail.com>
|
||||
#
|
||||
|
||||
if(NOT DEFINED RPMBUILD)
|
||||
|
||||
find_program(RPMBUILD
|
||||
NAMES rpmbuild
|
||||
PATHS "/usr/bin")
|
||||
|
||||
mark_as_advanced(RPMBUILD)
|
||||
|
||||
if(RPMBUILD)
|
||||
message(STATUS "RPM Build Found: ${RPMBUILD}")
|
||||
else()
|
||||
message(STATUS "RPM Build Not Found (rpmbuild). RPM generation will not be available")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(RPMBUILD)
|
||||
set(RPMBUILD_FOUND TRUE)
|
||||
else()
|
||||
set(RPMBUILD_FOUND FALSE)
|
||||
endif()
|
@@ -1,162 +0,0 @@
|
||||
# This is called by cmake as an extermal process from
|
||||
# ./source/creator/CMakeLists.txt to write ./source/creator/buildinfo.h
|
||||
|
||||
# Extract working copy information for SOURCE_DIR into MY_XXX variables
|
||||
# with a default in case anything fails, for example when using git-svn
|
||||
set(MY_WC_HASH "unknown")
|
||||
set(MY_WC_BRANCH "unknown")
|
||||
set(MY_WC_COMMIT_TIMESTAMP 0)
|
||||
|
||||
# Guess if this is a git working copy and then look up the revision
|
||||
if(EXISTS ${SOURCE_DIR}/.git)
|
||||
# The FindGit.cmake module is part of the standard distribution
|
||||
include(FindGit)
|
||||
if(GIT_FOUND)
|
||||
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
|
||||
|
||||
execute_process(COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(MY_WC_BRANCH STREQUAL "HEAD")
|
||||
# Detached HEAD, check whether commit hash is reachable
|
||||
# in the master branch
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(COMMAND git branch --list master --contains ${MY_WC_HASH}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_contains_check
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
STRING(REGEX REPLACE "^[ \t]+" "" _git_contains_check "${_git_contains_check}")
|
||||
if(_git_contains_check STREQUAL "master")
|
||||
set(MY_WC_BRANCH "master")
|
||||
else()
|
||||
execute_process(COMMAND git show-ref --tags -d
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_tag_hashes
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(COMMAND git rev-parse HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_head_hash
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(_git_tag_hashes MATCHES "${_git_head_hash}")
|
||||
set(MY_WC_BRANCH "master")
|
||||
endif()
|
||||
|
||||
unset(_git_tag_hashes)
|
||||
unset(_git_head_hashs)
|
||||
endif()
|
||||
|
||||
|
||||
unset(_git_contains_check)
|
||||
else()
|
||||
execute_process(COMMAND git log HEAD..@{u}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_below_check
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
if(NOT _git_below_check STREQUAL "")
|
||||
# If there're commits between HEAD and upstream this means
|
||||
# that we're reset-ed to older revision. Use it's hash then.
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
else()
|
||||
execute_process(COMMAND git rev-parse --short @{u}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
|
||||
if(MY_WC_HASH STREQUAL "")
|
||||
# Local branch, not set to upstream.
|
||||
# Well, let's use HEAD for now
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MY_WC_BRANCH MATCHES "^blender-v")
|
||||
set(MY_WC_BRANCH "master")
|
||||
endif()
|
||||
|
||||
unset(_git_below_check)
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND git log -1 --format=%ct
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_COMMIT_TIMESTAMP
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# Update GIT index before getting dirty files
|
||||
execute_process(COMMAND git update-index -q --refresh
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(COMMAND git diff-index --name-only HEAD --
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_changed_files
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT _git_changed_files STREQUAL "")
|
||||
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
|
||||
else()
|
||||
# Unpushed commits are also considered local modifications
|
||||
execute_process(COMMAND git log @{u}..
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_unpushed_log
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
if(NOT _git_unpushed_log STREQUAL "")
|
||||
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
|
||||
endif()
|
||||
unset(_git_unpushed_log)
|
||||
endif()
|
||||
|
||||
unset(_git_changed_files)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
|
||||
# but BUILD_DATE and BUILD_TIME are platform dependent
|
||||
if(UNIX)
|
||||
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(WIN32)
|
||||
execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
# Write a file with the BUILD_HASH define
|
||||
file(WRITE buildinfo.h.txt
|
||||
"#define BUILD_HASH \"${MY_WC_HASH}\"\n"
|
||||
"#define BUILD_COMMIT_TIMESTAMP ${MY_WC_COMMIT_TIMESTAMP}\n"
|
||||
"#define BUILD_BRANCH \"${MY_WC_BRANCH}\"\n"
|
||||
"#define BUILD_DATE \"${BUILD_DATE}\"\n"
|
||||
"#define BUILD_TIME \"${BUILD_TIME}\"\n"
|
||||
)
|
||||
|
||||
# cleanup
|
||||
unset(MY_WC_HASH)
|
||||
unset(MY_WC_COMMIT_TIMESTAMP)
|
||||
unset(MY_WC_BRANCH)
|
||||
unset(BUILD_DATE)
|
||||
unset(BUILD_TIME)
|
||||
|
||||
|
||||
# Copy the file to the final header only if the version changes
|
||||
# and avoid needless rebuilds
|
||||
# TODO: verify this comment is true, as BUILD_TIME probably changes
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
buildinfo.h.txt buildinfo.h)
|
@@ -1,363 +0,0 @@
|
||||
# ---
|
||||
# * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# * you may not use this file except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.apache.org/licenses/LICENSE-2.0
|
||||
# ---
|
||||
# by Campbell Barton
|
||||
|
||||
"""
|
||||
Invocation:
|
||||
|
||||
export CLANG_BIND_DIR="/dsk/src/llvm/tools/clang/bindings/python"
|
||||
export CLANG_LIB_DIR="/opt/llvm/lib"
|
||||
|
||||
python2 clang_array_check.py somefile.c -DSOME_DEFINE -I/some/include
|
||||
|
||||
... defines and includes are optional
|
||||
|
||||
"""
|
||||
|
||||
# delay parsing functions until we need them
|
||||
USE_LAZY_INIT = True
|
||||
USE_EXACT_COMPARE = False
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# predefined function/arg sizes, handy sometimes, but not complete...
|
||||
|
||||
defs_precalc = {
|
||||
"glColor3bv": {0: 3},
|
||||
"glColor4bv": {0: 4},
|
||||
|
||||
"glColor3ubv": {0: 3},
|
||||
"glColor4ubv": {0: 4},
|
||||
|
||||
"glColor4usv": {0: 3},
|
||||
"glColor4usv": {0: 4},
|
||||
|
||||
"glColor3fv": {0: 3},
|
||||
"glColor4fv": {0: 4},
|
||||
|
||||
"glColor3dv": {0: 3},
|
||||
"glColor4dv": {0: 4},
|
||||
|
||||
"glVertex2fv": {0: 2},
|
||||
"glVertex3fv": {0: 3},
|
||||
"glVertex4fv": {0: 4},
|
||||
|
||||
"glEvalCoord1fv": {0: 1},
|
||||
"glEvalCoord1dv": {0: 1},
|
||||
"glEvalCoord2fv": {0: 2},
|
||||
"glEvalCoord2dv": {0: 2},
|
||||
|
||||
"glRasterPos2dv": {0: 2},
|
||||
"glRasterPos3dv": {0: 3},
|
||||
"glRasterPos4dv": {0: 4},
|
||||
|
||||
"glRasterPos2fv": {0: 2},
|
||||
"glRasterPos3fv": {0: 3},
|
||||
"glRasterPos4fv": {0: 4},
|
||||
|
||||
"glRasterPos2sv": {0: 2},
|
||||
"glRasterPos3sv": {0: 3},
|
||||
"glRasterPos4sv": {0: 4},
|
||||
|
||||
"glTexCoord2fv": {0: 2},
|
||||
"glTexCoord3fv": {0: 3},
|
||||
"glTexCoord4fv": {0: 4},
|
||||
|
||||
"glTexCoord2dv": {0: 2},
|
||||
"glTexCoord3dv": {0: 3},
|
||||
"glTexCoord4dv": {0: 4},
|
||||
|
||||
"glNormal3fv": {0: 3},
|
||||
"glNormal3dv": {0: 3},
|
||||
"glNormal3bv": {0: 3},
|
||||
"glNormal3iv": {0: 3},
|
||||
"glNormal3sv": {0: 3},
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
import sys
|
||||
|
||||
if 0:
|
||||
# Examples with LLVM as the root dir: '/dsk/src/llvm'
|
||||
|
||||
# path containing 'clang/__init__.py'
|
||||
CLANG_BIND_DIR = "/dsk/src/llvm/tools/clang/bindings/python"
|
||||
|
||||
# path containing libclang.so
|
||||
CLANG_LIB_DIR = "/opt/llvm/lib"
|
||||
else:
|
||||
import os
|
||||
CLANG_BIND_DIR = os.environ.get("CLANG_BIND_DIR")
|
||||
CLANG_LIB_DIR = os.environ.get("CLANG_LIB_DIR")
|
||||
|
||||
if CLANG_BIND_DIR is None:
|
||||
print("$CLANG_BIND_DIR python binding dir not set")
|
||||
if CLANG_LIB_DIR is None:
|
||||
print("$CLANG_LIB_DIR clang lib dir not set")
|
||||
|
||||
sys.path.append(CLANG_BIND_DIR)
|
||||
|
||||
import clang
|
||||
import clang.cindex
|
||||
from clang.cindex import (CursorKind,
|
||||
TypeKind,
|
||||
TokenKind)
|
||||
|
||||
clang.cindex.Config.set_library_path(CLANG_LIB_DIR)
|
||||
|
||||
index = clang.cindex.Index.create()
|
||||
|
||||
args = sys.argv[2:]
|
||||
# print(args)
|
||||
|
||||
tu = index.parse(sys.argv[1], args)
|
||||
# print('Translation unit: %s' % tu.spelling)
|
||||
filepath = tu.spelling
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
def function_parm_wash_tokens(parm):
|
||||
# print(parm.kind)
|
||||
assert parm.kind in (CursorKind.PARM_DECL,
|
||||
CursorKind.VAR_DECL, # XXX, double check this
|
||||
CursorKind.FIELD_DECL,
|
||||
)
|
||||
|
||||
"""
|
||||
Return tolens without trailing commads and 'const'
|
||||
"""
|
||||
|
||||
tokens = [t for t in parm.get_tokens()]
|
||||
if not tokens:
|
||||
return tokens
|
||||
|
||||
# if tokens[-1].kind == To
|
||||
# remove trailing char
|
||||
if tokens[-1].kind == TokenKind.PUNCTUATION:
|
||||
if tokens[-1].spelling in (",", ")", ";"):
|
||||
tokens.pop()
|
||||
# else:
|
||||
# print(tokens[-1].spelling)
|
||||
|
||||
t_new = []
|
||||
for t in tokens:
|
||||
t_kind = t.kind
|
||||
t_spelling = t.spelling
|
||||
ok = True
|
||||
if t_kind == TokenKind.KEYWORD:
|
||||
if t_spelling in ("const", "restrict", "volatile"):
|
||||
ok = False
|
||||
elif t_spelling.startswith("__"):
|
||||
ok = False # __restrict
|
||||
elif t_kind in (TokenKind.COMMENT, ):
|
||||
ok = False
|
||||
|
||||
# Use these
|
||||
elif t_kind in (TokenKind.LITERAL,
|
||||
TokenKind.PUNCTUATION,
|
||||
TokenKind.IDENTIFIER):
|
||||
# use but ignore
|
||||
pass
|
||||
|
||||
else:
|
||||
print("Unknown!", t_kind, t_spelling)
|
||||
|
||||
# if its OK we will add
|
||||
if ok:
|
||||
t_new.append(t)
|
||||
return t_new
|
||||
|
||||
|
||||
def parm_size(node_child):
|
||||
tokens = function_parm_wash_tokens(node_child)
|
||||
|
||||
# print(" ".join([t.spelling for t in tokens]))
|
||||
|
||||
# NOT PERFECT CODE, EXTRACT SIZE FROM TOKENS
|
||||
if len(tokens) >= 3: # foo [ 1 ]
|
||||
if ((tokens[-3].kind == TokenKind.PUNCTUATION and tokens[-3].spelling == "[") and
|
||||
(tokens[-2].kind == TokenKind.LITERAL and tokens[-2].spelling.isdigit()) and
|
||||
(tokens[-1].kind == TokenKind.PUNCTUATION and tokens[-1].spelling == "]")):
|
||||
# ---
|
||||
return int(tokens[-2].spelling)
|
||||
return -1
|
||||
|
||||
|
||||
def function_get_arg_sizes(node):
|
||||
# Return a dict if (index: size) items
|
||||
# {arg_indx: arg_array_size, ... ]
|
||||
arg_sizes = {}
|
||||
|
||||
if 1: # node.spelling == "BM_vert_create", for debugging
|
||||
node_parms = [node_child for node_child in node.get_children()
|
||||
if node_child.kind == CursorKind.PARM_DECL]
|
||||
|
||||
for i, node_child in enumerate(node_parms):
|
||||
|
||||
# print(node_child.kind, node_child.spelling)
|
||||
# print(node_child.type.kind, node_child.spelling)
|
||||
if node_child.type.kind == TypeKind.CONSTANTARRAY:
|
||||
pointee = node_child.type.get_pointee()
|
||||
size = parm_size(node_child)
|
||||
if size != -1:
|
||||
arg_sizes[i] = size
|
||||
|
||||
return arg_sizes
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
_defs = {}
|
||||
|
||||
|
||||
def lookup_function_size_def(func_id):
|
||||
if USE_LAZY_INIT:
|
||||
result = _defs.get(func_id, {})
|
||||
if type(result) != dict:
|
||||
result = _defs[func_id] = function_get_arg_sizes(result)
|
||||
return result
|
||||
else:
|
||||
return _defs.get(func_id, {})
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
def file_check_arg_sizes(tu):
|
||||
|
||||
# main checking function
|
||||
def validate_arg_size(node):
|
||||
"""
|
||||
Loop over args and validate sizes for args we KNOW the size of.
|
||||
"""
|
||||
assert node.kind == CursorKind.CALL_EXPR
|
||||
|
||||
if 0:
|
||||
print("---",
|
||||
" <~> ".join(
|
||||
[" ".join([t.spelling for t in C.get_tokens()])
|
||||
for C in node.get_children()]
|
||||
))
|
||||
# print(node.location)
|
||||
|
||||
# first child is the function call, skip that.
|
||||
children = list(node.get_children())
|
||||
|
||||
if not children:
|
||||
return # XXX, look into this, happens on C++
|
||||
|
||||
func = children[0]
|
||||
|
||||
# get the func declaration!
|
||||
# works but we can better scan for functions ahead of time.
|
||||
if 0:
|
||||
func_dec = func.get_definition()
|
||||
if func_dec:
|
||||
print("FD", " ".join([t.spelling for t in func_dec.get_tokens()]))
|
||||
else:
|
||||
# HRMP'f - why does this fail?
|
||||
print("AA", " ".join([t.spelling for t in node.get_tokens()]))
|
||||
else:
|
||||
args_size_definition = () # dummy
|
||||
|
||||
# get the key
|
||||
tok = list(func.get_tokens())
|
||||
if tok:
|
||||
func_id = tok[0].spelling
|
||||
args_size_definition = lookup_function_size_def(func_id)
|
||||
|
||||
if not args_size_definition:
|
||||
return
|
||||
|
||||
children = children[1:]
|
||||
for i, node_child in enumerate(children):
|
||||
children = list(node_child.get_children())
|
||||
|
||||
# skip if we dont have an index...
|
||||
size_def = args_size_definition.get(i, -1)
|
||||
|
||||
if size_def == -1:
|
||||
continue
|
||||
|
||||
# print([c.kind for c in children])
|
||||
# print(" ".join([t.spelling for t in node_child.get_tokens()]))
|
||||
|
||||
if len(children) == 1:
|
||||
arg = children[0]
|
||||
if arg.kind in (CursorKind.DECL_REF_EXPR,
|
||||
CursorKind.UNEXPOSED_EXPR):
|
||||
|
||||
if arg.type.kind == TypeKind.CONSTANTARRAY:
|
||||
dec = arg.get_definition()
|
||||
if dec:
|
||||
size = parm_size(dec)
|
||||
|
||||
# size == 0 is for 'float *a'
|
||||
if size != -1 and size != 0:
|
||||
|
||||
# nice print!
|
||||
if 0:
|
||||
print("".join([t.spelling for t in func.get_tokens()]),
|
||||
i,
|
||||
" ".join([t.spelling for t in dec.get_tokens()]))
|
||||
|
||||
# testing
|
||||
# size_def = 100
|
||||
if size != 1:
|
||||
if USE_EXACT_COMPARE:
|
||||
# is_err = (size != size_def) and (size != 4 and size_def != 3)
|
||||
is_err = (size != size_def)
|
||||
else:
|
||||
is_err = (size < size_def)
|
||||
|
||||
if is_err:
|
||||
location = node.location
|
||||
# if "math_color_inline.c" not in str(location.file):
|
||||
if 1:
|
||||
print("%s:%d:%d: argument %d is size %d, should be %d (from %s)" %
|
||||
(location.file,
|
||||
location.line,
|
||||
location.column,
|
||||
i + 1, size, size_def,
|
||||
filepath # always the same but useful when running threaded
|
||||
))
|
||||
|
||||
# we dont really care what we are looking at, just scan entire file for
|
||||
# function calls.
|
||||
|
||||
def recursive_func_call_check(node):
|
||||
if node.kind == CursorKind.CALL_EXPR:
|
||||
validate_arg_size(node)
|
||||
|
||||
for c in node.get_children():
|
||||
recursive_func_call_check(c)
|
||||
|
||||
recursive_func_call_check(tu.cursor)
|
||||
|
||||
|
||||
# -- first pass, cache function definitions sizes
|
||||
|
||||
# PRINT FUNC DEFINES
|
||||
def recursive_arg_sizes(node, ):
|
||||
# print(node.kind, node.spelling)
|
||||
if node.kind == CursorKind.FUNCTION_DECL:
|
||||
if USE_LAZY_INIT:
|
||||
args_sizes = node
|
||||
else:
|
||||
args_sizes = function_get_arg_sizes(node)
|
||||
# if args_sizes:
|
||||
# print(node.spelling, args_sizes)
|
||||
_defs[node.spelling] = args_sizes
|
||||
# print("adding", node.spelling)
|
||||
for c in node.get_children():
|
||||
recursive_arg_sizes(c)
|
||||
# cache function sizes
|
||||
recursive_arg_sizes(tu.cursor)
|
||||
_defs.update(defs_precalc)
|
||||
|
||||
# --- second pass, check against def's
|
||||
file_check_arg_sizes(tu)
|
@@ -1,313 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import sys
|
||||
if not sys.version.startswith("3"):
|
||||
print("\nPython3.x needed, found %s.\nAborting!\n" %
|
||||
sys.version.partition(" ")[0])
|
||||
sys.exit(1)
|
||||
|
||||
from cmake_consistency_check_config import IGNORE, UTF8_CHECK, SOURCE_DIR
|
||||
|
||||
import os
|
||||
from os.path import join, dirname, normpath, splitext
|
||||
|
||||
print("Scanning:", SOURCE_DIR)
|
||||
|
||||
global_h = set()
|
||||
global_c = set()
|
||||
global_refs = {}
|
||||
|
||||
|
||||
def replace_line(f, i, text, keep_indent=True):
|
||||
file_handle = open(f, 'r')
|
||||
data = file_handle.readlines()
|
||||
file_handle.close()
|
||||
|
||||
l = data[i]
|
||||
ws = l[:len(l) - len(l.lstrip())]
|
||||
|
||||
data[i] = "%s%s\n" % (ws, text)
|
||||
|
||||
file_handle = open(f, 'w')
|
||||
file_handle.writelines(data)
|
||||
file_handle.close()
|
||||
|
||||
|
||||
def source_list(path, filename_check=None):
|
||||
for dirpath, dirnames, filenames in os.walk(path):
|
||||
|
||||
# skip '.git'
|
||||
if dirpath.startswith("."):
|
||||
continue
|
||||
|
||||
for filename in filenames:
|
||||
if filename_check is None or filename_check(filename):
|
||||
yield os.path.join(dirpath, filename)
|
||||
|
||||
|
||||
# extension checking
|
||||
def is_cmake(filename):
|
||||
ext = splitext(filename)[1]
|
||||
return (ext == ".cmake") or (filename == "CMakeLists.txt")
|
||||
|
||||
|
||||
def is_c_header(filename):
|
||||
ext = splitext(filename)[1]
|
||||
return (ext in {".h", ".hpp", ".hxx", ".hh"})
|
||||
|
||||
|
||||
def is_c(filename):
|
||||
ext = splitext(filename)[1]
|
||||
return (ext in {".c", ".cpp", ".cxx", ".m", ".mm", ".rc", ".cc", ".inl"})
|
||||
|
||||
|
||||
def is_c_any(filename):
|
||||
return is_c(filename) or is_c_header(filename)
|
||||
|
||||
|
||||
def cmake_get_src(f):
|
||||
|
||||
sources_h = []
|
||||
sources_c = []
|
||||
|
||||
filen = open(f, "r", encoding="utf8")
|
||||
it = iter(filen)
|
||||
found = False
|
||||
i = 0
|
||||
# print(f)
|
||||
|
||||
def is_definition(l, f, i, name):
|
||||
if l.startswith("unset("):
|
||||
return False
|
||||
|
||||
if ('set(%s' % name) in l or ('set(' in l and l.endswith(name)):
|
||||
if len(l.split()) > 1:
|
||||
raise Exception("strict formatting not kept 'set(%s*' %s:%d" % (name, f, i))
|
||||
return True
|
||||
|
||||
if ("list(APPEND %s" % name) in l or ('list(APPEND ' in l and l.endswith(name)):
|
||||
if l.endswith(")"):
|
||||
raise Exception("strict formatting not kept 'list(APPEND %s...)' on 1 line %s:%d" % (name, f, i))
|
||||
return True
|
||||
|
||||
while it is not None:
|
||||
context_name = ""
|
||||
while it is not None:
|
||||
i += 1
|
||||
try:
|
||||
l = next(it)
|
||||
except StopIteration:
|
||||
it = None
|
||||
break
|
||||
l = l.strip()
|
||||
if not l.startswith("#"):
|
||||
found = is_definition(l, f, i, "SRC")
|
||||
if found:
|
||||
context_name = "SRC"
|
||||
break
|
||||
found = is_definition(l, f, i, "INC")
|
||||
if found:
|
||||
context_name = "INC"
|
||||
break
|
||||
|
||||
if found:
|
||||
cmake_base = dirname(f)
|
||||
|
||||
while it is not None:
|
||||
i += 1
|
||||
try:
|
||||
l = next(it)
|
||||
except StopIteration:
|
||||
it = None
|
||||
break
|
||||
|
||||
l = l.strip()
|
||||
|
||||
if not l.startswith("#"):
|
||||
|
||||
if ")" in l:
|
||||
if l.strip() != ")":
|
||||
raise Exception("strict formatting not kept '*)' %s:%d" % (f, i))
|
||||
break
|
||||
|
||||
# replace dirs
|
||||
l = l.replace("${CMAKE_CURRENT_SOURCE_DIR}", cmake_base)
|
||||
|
||||
if not l:
|
||||
pass
|
||||
elif l.startswith("$"):
|
||||
if context_name == "SRC":
|
||||
# assume if it ends with context_name we know about it
|
||||
if not l.split("}")[0].endswith(context_name):
|
||||
print("Can't use var '%s' %s:%d" % (l, f, i))
|
||||
elif len(l.split()) > 1:
|
||||
raise Exception("Multi-line define '%s' %s:%d" % (l, f, i))
|
||||
else:
|
||||
new_file = normpath(join(cmake_base, l))
|
||||
|
||||
if context_name == "SRC":
|
||||
if is_c_header(new_file):
|
||||
sources_h.append(new_file)
|
||||
global_refs.setdefault(new_file, []).append((f, i))
|
||||
elif is_c(new_file):
|
||||
sources_c.append(new_file)
|
||||
global_refs.setdefault(new_file, []).append((f, i))
|
||||
elif l in {"PARENT_SCOPE", }:
|
||||
# cmake var, ignore
|
||||
pass
|
||||
elif new_file.endswith(".list"):
|
||||
pass
|
||||
elif new_file.endswith(".def"):
|
||||
pass
|
||||
elif new_file.endswith(".cl"): # opencl
|
||||
pass
|
||||
elif new_file.endswith(".cu"): # cuda
|
||||
pass
|
||||
elif new_file.endswith(".osl"): # open shading language
|
||||
pass
|
||||
elif new_file.endswith(".glsl"):
|
||||
pass
|
||||
else:
|
||||
raise Exception("unknown file type - not c or h %s -> %s" % (f, new_file))
|
||||
|
||||
elif context_name == "INC":
|
||||
if os.path.isdir(new_file):
|
||||
new_path_rel = os.path.relpath(new_file, cmake_base)
|
||||
|
||||
if new_path_rel != l:
|
||||
print("overly relative path:\n %s:%d\n %s\n %s" % (f, i, l, new_path_rel))
|
||||
|
||||
## Save time. just replace the line
|
||||
# replace_line(f, i - 1, new_path_rel)
|
||||
|
||||
else:
|
||||
raise Exception("non existent include %s:%d -> %s" % (f, i, new_file))
|
||||
|
||||
# print(new_file)
|
||||
|
||||
global_h.update(set(sources_h))
|
||||
global_c.update(set(sources_c))
|
||||
'''
|
||||
if not sources_h and not sources_c:
|
||||
raise Exception("No sources %s" % f)
|
||||
|
||||
sources_h_fs = list(source_list(cmake_base, is_c_header))
|
||||
sources_c_fs = list(source_list(cmake_base, is_c))
|
||||
'''
|
||||
# find missing C files:
|
||||
'''
|
||||
for ff in sources_c_fs:
|
||||
if ff not in sources_c:
|
||||
print(" missing: " + ff)
|
||||
'''
|
||||
|
||||
# reset
|
||||
del sources_h[:]
|
||||
del sources_c[:]
|
||||
|
||||
filen.close()
|
||||
|
||||
|
||||
for cmake in source_list(SOURCE_DIR, is_cmake):
|
||||
cmake_get_src(cmake)
|
||||
|
||||
|
||||
def is_ignore(f):
|
||||
for ig in IGNORE:
|
||||
if ig in f:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
# First do stupid check, do these files exist?
|
||||
print("\nChecking for missing references:")
|
||||
is_err = False
|
||||
errs = []
|
||||
for f in (global_h | global_c):
|
||||
if f.endswith("dna.c"):
|
||||
continue
|
||||
|
||||
if not os.path.exists(f):
|
||||
refs = global_refs[f]
|
||||
if refs:
|
||||
for cf, i in refs:
|
||||
errs.append((cf, i))
|
||||
else:
|
||||
raise Exception("CMake referenecs missing, internal error, aborting!")
|
||||
is_err = True
|
||||
|
||||
errs.sort()
|
||||
errs.reverse()
|
||||
for cf, i in errs:
|
||||
print("%s:%d" % (cf, i))
|
||||
# Write a 'sed' script, useful if we get a lot of these
|
||||
# print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
|
||||
|
||||
|
||||
if is_err:
|
||||
raise Exception("CMake referenecs missing files, aborting!")
|
||||
del is_err
|
||||
del errs
|
||||
|
||||
# now check on files not accounted for.
|
||||
print("\nC/C++ Files CMake doesnt know about...")
|
||||
for cf in sorted(source_list(SOURCE_DIR, is_c)):
|
||||
if not is_ignore(cf):
|
||||
if cf not in global_c:
|
||||
print("missing_c: ", cf)
|
||||
|
||||
# check if automake builds a corrasponding .o file.
|
||||
'''
|
||||
if cf in global_c:
|
||||
out1 = os.path.splitext(cf)[0] + ".o"
|
||||
out2 = os.path.splitext(cf)[0] + ".Po"
|
||||
out2_dir, out2_file = out2 = os.path.split(out2)
|
||||
out2 = os.path.join(out2_dir, ".deps", out2_file)
|
||||
if not os.path.exists(out1) and not os.path.exists(out2):
|
||||
print("bad_c: ", cf)
|
||||
'''
|
||||
|
||||
print("\nC/C++ Headers CMake doesnt know about...")
|
||||
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
|
||||
if not is_ignore(hf):
|
||||
if hf not in global_h:
|
||||
print("missing_h: ", hf)
|
||||
|
||||
if UTF8_CHECK:
|
||||
# test encoding
|
||||
import traceback
|
||||
for files in (global_c, global_h):
|
||||
for f in sorted(files):
|
||||
if os.path.exists(f):
|
||||
# ignore outside of our source tree
|
||||
if "extern" not in f:
|
||||
i = 1
|
||||
try:
|
||||
for l in open(f, "r", encoding="utf8"):
|
||||
i += 1
|
||||
except UnicodeDecodeError:
|
||||
print("Non utf8: %s:%d" % (f, i))
|
||||
if i > 1:
|
||||
traceback.print_exc()
|
@@ -1,76 +0,0 @@
|
||||
import os
|
||||
|
||||
IGNORE = (
|
||||
"/test/",
|
||||
"/tests/gtests/",
|
||||
"/BSP_GhostTest/",
|
||||
"/release/",
|
||||
"/xembed/",
|
||||
"/TerraplayNetwork/",
|
||||
"/ik_glut_test/",
|
||||
|
||||
# specific source files
|
||||
"extern/Eigen2/Eigen/src/Cholesky/CholeskyInstantiations.cpp",
|
||||
"extern/Eigen2/Eigen/src/Core/CoreInstantiations.cpp",
|
||||
"extern/Eigen2/Eigen/src/QR/QrInstantiations.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionShapes/btConvex2dShape.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp",
|
||||
"extern/eltopo/common/meshes/ObjLoader.cpp",
|
||||
"extern/eltopo/common/meshes/meshloader.cpp",
|
||||
"extern/eltopo/common/openglutils.cpp",
|
||||
"extern/eltopo/eltopo3d/broadphase_blenderbvh.cpp",
|
||||
"source/blender/imbuf/intern/imbuf_cocoa.m",
|
||||
"extern/recastnavigation/Recast/Source/RecastLog.cpp",
|
||||
"extern/recastnavigation/Recast/Source/RecastTimer.cpp",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleFactory.cpp",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleReader.cpp",
|
||||
"intern/cycles/render/film_response.cpp",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_2.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_3.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_4.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_d.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_3.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_4.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_9.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_d.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_4_3.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_4_4.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_4_d.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_2.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_3.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_4.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_d.cc",
|
||||
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionShapes/btConvex2dShape.h",
|
||||
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h",
|
||||
"extern/eltopo/common/meshes/Edge.hpp",
|
||||
"extern/eltopo/common/meshes/ObjLoader.hpp",
|
||||
"extern/eltopo/common/meshes/TriangleIndex.hpp",
|
||||
"extern/eltopo/common/meshes/meshloader.h",
|
||||
"extern/eltopo/eltopo3d/broadphase_blenderbvh.h",
|
||||
"extern/recastnavigation/Recast/Include/RecastLog.h",
|
||||
"extern/recastnavigation/Recast/Include/RecastTimer.h",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleFactory.h",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleReader.h",
|
||||
"intern/cycles/render/film_response.h",
|
||||
"extern/carve/include/carve/config.h",
|
||||
"extern/carve/include/carve/external/boost/random.hpp",
|
||||
"extern/carve/patches/files/config.h",
|
||||
"extern/carve/patches/files/random.hpp",
|
||||
)
|
||||
|
||||
UTF8_CHECK = True
|
||||
|
||||
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))))
|
@@ -1,257 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton, M.G. Kishalmi
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
"""
|
||||
Example linux usage
|
||||
python3 ~/blender-git/blender/build_files/cmake/cmake_netbeans_project.py ~/blender-git/cmake
|
||||
|
||||
Windows not supported so far
|
||||
"""
|
||||
|
||||
from project_info import (
|
||||
SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
# is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
|
||||
import os
|
||||
from os.path import join, dirname, normpath, relpath, exists
|
||||
|
||||
|
||||
def create_nb_project_main():
|
||||
files = list(source_list(SOURCE_DIR, filename_check=is_project_file))
|
||||
files_rel = [relpath(f, start=PROJECT_DIR) for f in files]
|
||||
files_rel.sort()
|
||||
|
||||
if SIMPLE_PROJECTFILE:
|
||||
pass
|
||||
else:
|
||||
includes, defines = cmake_advanced_info()
|
||||
|
||||
if (includes, defines) == (None, None):
|
||||
return
|
||||
|
||||
# for some reason it doesnt give all internal includes
|
||||
includes = list(set(includes) | set(dirname(f) for f in files if is_c_header(f)))
|
||||
includes.sort()
|
||||
|
||||
if 0:
|
||||
PROJECT_NAME = "Blender"
|
||||
else:
|
||||
# be tricky, get the project name from git if we can!
|
||||
PROJECT_NAME = project_name_get()
|
||||
|
||||
# --------------- NB spesific
|
||||
defines = [("%s=%s" % cdef) if cdef[1] else cdef[0] for cdef in defines]
|
||||
defines += [cdef.replace("#define", "").strip() for cdef in cmake_compiler_defines()]
|
||||
|
||||
def file_list_to_nested(files):
|
||||
# convert paths to hierarchy
|
||||
paths_nested = {}
|
||||
|
||||
def ensure_path(filepath):
|
||||
filepath_split = filepath.split(os.sep)
|
||||
|
||||
pn = paths_nested
|
||||
for subdir in filepath_split[:-1]:
|
||||
pn = pn.setdefault(subdir, {})
|
||||
pn[filepath_split[-1]] = None
|
||||
|
||||
for path in files:
|
||||
ensure_path(path)
|
||||
return paths_nested
|
||||
|
||||
PROJECT_DIR_NB = join(PROJECT_DIR, "nbproject")
|
||||
if not exists(PROJECT_DIR_NB):
|
||||
os.mkdir(PROJECT_DIR_NB)
|
||||
|
||||
# SOURCE_DIR_REL = relpath(SOURCE_DIR, PROJECT_DIR)
|
||||
|
||||
f = open(join(PROJECT_DIR_NB, "project.xml"), 'w')
|
||||
|
||||
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
|
||||
f.write('<project xmlns="http://www.netbeans.org/ns/project/1">\n')
|
||||
f.write(' <type>org.netbeans.modules.cnd.makeproject</type>\n')
|
||||
f.write(' <configuration>\n')
|
||||
f.write(' <data xmlns="http://www.netbeans.org/ns/make-project/1">\n')
|
||||
f.write(' <name>%s</name>\n' % PROJECT_NAME)
|
||||
f.write(' <c-extensions>c,m</c-extensions>\n')
|
||||
f.write(' <cpp-extensions>cpp,cxx,cc,mm</cpp-extensions>\n')
|
||||
f.write(' <header-extensions>h,hxx,hh,hpp,inl</header-extensions>\n')
|
||||
f.write(' <sourceEncoding>UTF-8</sourceEncoding>\n')
|
||||
f.write(' <make-dep-projects/>\n')
|
||||
f.write(' <sourceRootList>\n')
|
||||
f.write(' <sourceRootElem>%s</sourceRootElem>\n' % SOURCE_DIR) # base_root_rel
|
||||
f.write(' </sourceRootList>\n')
|
||||
f.write(' <confList>\n')
|
||||
f.write(' <confElem>\n')
|
||||
f.write(' <name>Default</name>\n')
|
||||
f.write(' <type>0</type>\n')
|
||||
f.write(' </confElem>\n')
|
||||
f.write(' </confList>\n')
|
||||
f.write(' <formatting>\n')
|
||||
f.write(' <project-formatting-style>false</project-formatting-style>\n')
|
||||
f.write(' </formatting>\n')
|
||||
f.write(' </data>\n')
|
||||
f.write(' </configuration>\n')
|
||||
f.write('</project>\n')
|
||||
|
||||
f.close()
|
||||
|
||||
f = open(join(PROJECT_DIR_NB, "configurations.xml"), 'w')
|
||||
|
||||
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
|
||||
f.write('<configurationDescriptor version="94">\n')
|
||||
f.write(' <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">\n')
|
||||
f.write(' <df name="0" root="%s">\n' % SOURCE_DIR) # base_root_rel
|
||||
|
||||
# write files!
|
||||
files_rel_local = [normpath(relpath(join(CMAKE_DIR, path), SOURCE_DIR)) for path in files_rel]
|
||||
files_rel_hierarchy = file_list_to_nested(files_rel_local)
|
||||
# print(files_rel_hierarchy)
|
||||
|
||||
def write_df(hdir, ident):
|
||||
dirs = []
|
||||
files = []
|
||||
for key, item in sorted(hdir.items()):
|
||||
if item is None:
|
||||
files.append(key)
|
||||
else:
|
||||
dirs.append((key, item))
|
||||
|
||||
for key, item in dirs:
|
||||
f.write('%s <df name="%s">\n' % (ident, key))
|
||||
write_df(item, ident + " ")
|
||||
f.write('%s </df>\n' % ident)
|
||||
|
||||
for key in files:
|
||||
f.write('%s<in>%s</in>\n' % (ident, key))
|
||||
|
||||
write_df(files_rel_hierarchy, ident=" ")
|
||||
|
||||
f.write(' </df>\n')
|
||||
|
||||
f.write(' <logicalFolder name="ExternalFiles"\n')
|
||||
f.write(' displayName="Important Files"\n')
|
||||
f.write(' projectFiles="false"\n')
|
||||
f.write(' kind="IMPORTANT_FILES_FOLDER">\n')
|
||||
# f.write(' <itemPath>../GNUmakefile</itemPath>\n')
|
||||
f.write(' </logicalFolder>\n')
|
||||
|
||||
f.write(' </logicalFolder>\n')
|
||||
# default, but this dir is infact not in blender dir so we can ignore it
|
||||
# f.write(' <sourceFolderFilter>^(nbproject)$</sourceFolderFilter>\n')
|
||||
f.write(' <sourceFolderFilter>^(nbproject|__pycache__|.*\.py|.*\.html|.*\.blend)$</sourceFolderFilter>\n')
|
||||
|
||||
f.write(' <sourceRootList>\n')
|
||||
f.write(' <Elem>%s</Elem>\n' % SOURCE_DIR) # base_root_rel
|
||||
f.write(' </sourceRootList>\n')
|
||||
|
||||
f.write(' <projectmakefile>Makefile</projectmakefile>\n')
|
||||
|
||||
# paths again
|
||||
f.write(' <confs>\n')
|
||||
f.write(' <conf name="Default" type="0">\n')
|
||||
|
||||
f.write(' <toolsSet>\n')
|
||||
f.write(' <compilerSet>default</compilerSet>\n')
|
||||
f.write(' </toolsSet>\n')
|
||||
f.write(' <dependencyChecking>false</dependencyChecking>\n')
|
||||
f.write(' <rebuildPropChanged>false</rebuildPropChanged>\n')
|
||||
f.write(' <makefileType>\n')
|
||||
|
||||
f.write(' <makeTool>\n')
|
||||
f.write(' <buildCommandWorkingDir>.</buildCommandWorkingDir>\n')
|
||||
f.write(' <buildCommand>${MAKE} -f Makefile</buildCommand>\n')
|
||||
f.write(' <cleanCommand>${MAKE} -f Makefile clean</cleanCommand>\n')
|
||||
f.write(' <executablePath>./bin/blender</executablePath>\n')
|
||||
|
||||
def write_toolinfo():
|
||||
f.write(' <incDir>\n')
|
||||
for inc in includes:
|
||||
f.write(' <pElem>%s</pElem>\n' % inc)
|
||||
f.write(' </incDir>\n')
|
||||
f.write(' <preprocessorList>\n')
|
||||
for cdef in defines:
|
||||
f.write(' <Elem>%s</Elem>\n' % cdef)
|
||||
f.write(' </preprocessorList>\n')
|
||||
|
||||
f.write(' <cTool>\n')
|
||||
write_toolinfo()
|
||||
f.write(' </cTool>\n')
|
||||
|
||||
f.write(' <ccTool>\n')
|
||||
write_toolinfo()
|
||||
f.write(' </ccTool>\n')
|
||||
|
||||
f.write(' </makeTool>\n')
|
||||
f.write(' </makefileType>\n')
|
||||
# finishe makefle info
|
||||
|
||||
f.write(' \n')
|
||||
|
||||
for path in files_rel_local:
|
||||
f.write(' <item path="%s"\n' % path)
|
||||
f.write(' ex="false"\n')
|
||||
f.write(' tool="1"\n')
|
||||
f.write(' flavor2="0">\n')
|
||||
f.write(' </item>\n')
|
||||
|
||||
f.write(' <runprofile version="9">\n')
|
||||
f.write(' <runcommandpicklist>\n')
|
||||
f.write(' </runcommandpicklist>\n')
|
||||
f.write(' <runcommand>%s</runcommand>\n' % os.path.join(CMAKE_DIR, "bin/blender"))
|
||||
f.write(' <rundir>%s</rundir>\n' % SOURCE_DIR)
|
||||
f.write(' <buildfirst>false</buildfirst>\n')
|
||||
f.write(' <terminal-type>0</terminal-type>\n')
|
||||
f.write(' <remove-instrumentation>0</remove-instrumentation>\n')
|
||||
f.write(' <environment>\n')
|
||||
f.write(' </environment>\n')
|
||||
f.write(' </runprofile>\n')
|
||||
|
||||
f.write(' </conf>\n')
|
||||
f.write(' </confs>\n')
|
||||
|
||||
# todo
|
||||
|
||||
f.write('</configurationDescriptor>\n')
|
||||
|
||||
f.close()
|
||||
|
||||
|
||||
def main():
|
||||
create_nb_project_main()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -1,164 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton, M.G. Kishalmi
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
r"""
|
||||
Example Linux usage:
|
||||
python ~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py ~/blender-git/cmake
|
||||
|
||||
Example Win32 usage:
|
||||
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py c:\blender_dev\cmake_build
|
||||
"""
|
||||
|
||||
from project_info import (
|
||||
SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
# CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def quote_define(define):
|
||||
if " " in define.strip():
|
||||
return '"%s"' % define
|
||||
else:
|
||||
return define
|
||||
|
||||
|
||||
def create_qtc_project_main():
|
||||
files = list(source_list(SOURCE_DIR, filename_check=is_project_file))
|
||||
files_rel = [os.path.relpath(f, start=PROJECT_DIR) for f in files]
|
||||
files_rel.sort()
|
||||
|
||||
# --- qtcreator specific, simple format
|
||||
if SIMPLE_PROJECTFILE:
|
||||
# --- qtcreator specific, simple format
|
||||
PROJECT_NAME = "Blender"
|
||||
FILE_NAME = PROJECT_NAME.lower()
|
||||
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(files_rel))
|
||||
|
||||
with open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(sorted(list(set(os.path.dirname(f)
|
||||
for f in files_rel if is_c_header(f))))))
|
||||
|
||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
|
||||
with open(qtc_prj, 'w') as f:
|
||||
f.write("[General]\n")
|
||||
|
||||
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
|
||||
if not os.path.exists(qtc_cfg):
|
||||
with open(qtc_cfg, 'w') as f:
|
||||
f.write("// ADD PREDEFINED MACROS HERE!\n")
|
||||
else:
|
||||
includes, defines = cmake_advanced_info()
|
||||
|
||||
if (includes, defines) == (None, None):
|
||||
return
|
||||
|
||||
# for some reason it doesnt give all internal includes
|
||||
includes = list(set(includes) | set(os.path.dirname(f)
|
||||
for f in files_rel if is_c_header(f)))
|
||||
includes.sort()
|
||||
|
||||
if 0:
|
||||
PROJECT_NAME = "Blender"
|
||||
else:
|
||||
# be tricky, get the project name from CMake if we can!
|
||||
PROJECT_NAME = project_name_get()
|
||||
|
||||
FILE_NAME = PROJECT_NAME.lower()
|
||||
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(files_rel))
|
||||
|
||||
with open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w', encoding='utf-8') as f:
|
||||
f.write("\n".join(sorted(includes)))
|
||||
|
||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
|
||||
with open(qtc_prj, 'w') as f:
|
||||
f.write("[General]\n")
|
||||
|
||||
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
|
||||
with open(qtc_cfg, 'w') as f:
|
||||
f.write("// ADD PREDEFINED MACROS TO %s_custom.config!\n" % FILE_NAME)
|
||||
|
||||
qtc_custom_cfg = os.path.join(PROJECT_DIR, "%s_custom.config" % FILE_NAME)
|
||||
if os.path.exists(qtc_custom_cfg):
|
||||
with open(qtc_custom_cfg, 'r') as fc:
|
||||
f.write(fc.read())
|
||||
f.write("\n")
|
||||
|
||||
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
|
||||
if sys.platform != "win32":
|
||||
defines_final += cmake_compiler_defines()
|
||||
f.write("\n".join(defines_final))
|
||||
|
||||
print("Blender project file written to: %r" % qtc_prj)
|
||||
# --- end
|
||||
|
||||
|
||||
def create_qtc_project_python():
|
||||
files = list(source_list(SOURCE_DIR, filename_check=is_py))
|
||||
files_rel = [os.path.relpath(f, start=PROJECT_DIR) for f in files]
|
||||
files_rel.sort()
|
||||
|
||||
# --- qtcreator specific, simple format
|
||||
if 0:
|
||||
PROJECT_NAME = "Blender_Python"
|
||||
else:
|
||||
# be tricky, get the project name from git if we can!
|
||||
PROJECT_NAME = project_name_get() + "_Python"
|
||||
|
||||
FILE_NAME = PROJECT_NAME.lower()
|
||||
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(files_rel))
|
||||
|
||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
|
||||
with open(qtc_prj, 'w') as f:
|
||||
f.write("[General]\n")
|
||||
|
||||
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
|
||||
if not os.path.exists(qtc_cfg):
|
||||
with open(qtc_cfg, 'w') as f:
|
||||
f.write("// ADD PREDEFINED MACROS HERE!\n")
|
||||
|
||||
print("Python project file written to: %r" % qtc_prj)
|
||||
|
||||
|
||||
def main():
|
||||
create_qtc_project_main()
|
||||
create_qtc_project_python()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -1,86 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import project_source_info
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
|
||||
USE_QUIET = (os.environ.get("QUIET", None) is not None)
|
||||
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
"blender/intern/opennl",
|
||||
]
|
||||
|
||||
CHECKER_BIN = "python2"
|
||||
|
||||
CHECKER_ARGS = [
|
||||
os.path.join(os.path.dirname(__file__), "clang_array_check.py"),
|
||||
# not sure why this is needed, but it is.
|
||||
"-I" + os.path.join(project_source_info.SOURCE_DIR, "extern", "glew", "include"),
|
||||
# stupid but needed
|
||||
"-Dbool=char"
|
||||
]
|
||||
|
||||
|
||||
def main():
|
||||
source_info = project_source_info.build_info(ignore_prefix_list=CHECKER_IGNORE_PREFIX)
|
||||
|
||||
check_commands = []
|
||||
for c, inc_dirs, defs in source_info:
|
||||
|
||||
#~if "source/blender" not in c:
|
||||
#~ continue
|
||||
|
||||
cmd = ([CHECKER_BIN] +
|
||||
CHECKER_ARGS +
|
||||
[c] +
|
||||
[("-I%s" % i) for i in inc_dirs] +
|
||||
[("-D%s" % d) for d in defs]
|
||||
)
|
||||
|
||||
check_commands.append((c, cmd))
|
||||
|
||||
process_functions = []
|
||||
|
||||
def my_process(i, c, cmd):
|
||||
if not USE_QUIET:
|
||||
percent = 100.0 * (i / (len(check_commands) - 1))
|
||||
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
|
||||
|
||||
sys.stdout.flush()
|
||||
sys.stdout.write("%s %s\n" % (percent_str, c))
|
||||
|
||||
return subprocess.Popen(cmd)
|
||||
|
||||
for i, (c, cmd) in enumerate(check_commands):
|
||||
process_functions.append((my_process, (i, c, cmd)))
|
||||
|
||||
project_source_info.queue_processes(process_functions)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -1,90 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import project_source_info
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
|
||||
USE_QUIET = (os.environ.get("QUIET", None) is not None)
|
||||
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
"blender/intern/opennl",
|
||||
]
|
||||
|
||||
CHECKER_BIN = "cppcheck"
|
||||
|
||||
CHECKER_ARGS = [
|
||||
# not sure why this is needed, but it is.
|
||||
"-I" + os.path.join(project_source_info.SOURCE_DIR, "extern", "glew", "include"),
|
||||
"--suppress=*:%s/extern/glew/include/GL/glew.h:241" % project_source_info.SOURCE_DIR,
|
||||
"--max-configs=1", # speeds up execution
|
||||
# "--check-config", # when includes are missing
|
||||
"--enable=all", # if you want sixty hundred pedantic suggestions
|
||||
]
|
||||
|
||||
if USE_QUIET:
|
||||
CHECKER_ARGS.append("--quiet")
|
||||
|
||||
|
||||
def main():
|
||||
source_info = project_source_info.build_info(ignore_prefix_list=CHECKER_IGNORE_PREFIX)
|
||||
source_defines = project_source_info.build_defines_as_args()
|
||||
|
||||
check_commands = []
|
||||
for c, inc_dirs, defs in source_info:
|
||||
cmd = ([CHECKER_BIN] +
|
||||
CHECKER_ARGS +
|
||||
[c] +
|
||||
[("-I%s" % i) for i in inc_dirs] +
|
||||
[("-D%s" % d) for d in defs] +
|
||||
source_defines
|
||||
)
|
||||
|
||||
check_commands.append((c, cmd))
|
||||
|
||||
process_functions = []
|
||||
|
||||
def my_process(i, c, cmd):
|
||||
if not USE_QUIET:
|
||||
percent = 100.0 * (i / len(check_commands))
|
||||
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
|
||||
|
||||
sys.stdout.flush()
|
||||
sys.stdout.write("%s " % percent_str)
|
||||
|
||||
return subprocess.Popen(cmd)
|
||||
|
||||
for i, (c, cmd) in enumerate(check_commands):
|
||||
process_functions.append((my_process, (i, c, cmd)))
|
||||
|
||||
project_source_info.queue_processes(process_functions)
|
||||
|
||||
print("Finished!")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -1,80 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
"blender/intern/opennl",
|
||||
]
|
||||
|
||||
CHECKER_BIN = "smatch"
|
||||
CHECKER_ARGS = [
|
||||
"--full-path",
|
||||
"--two-passes",
|
||||
]
|
||||
|
||||
import project_source_info
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
|
||||
USE_QUIET = (os.environ.get("QUIET", None) is not None)
|
||||
|
||||
|
||||
def main():
|
||||
source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
|
||||
source_defines = project_source_info.build_defines_as_args()
|
||||
|
||||
check_commands = []
|
||||
for c, inc_dirs, defs in source_info:
|
||||
|
||||
cmd = ([CHECKER_BIN] +
|
||||
CHECKER_ARGS +
|
||||
[c] +
|
||||
[("-I%s" % i) for i in inc_dirs] +
|
||||
[("-D%s" % d) for d in defs] +
|
||||
source_defines
|
||||
)
|
||||
|
||||
check_commands.append((c, cmd))
|
||||
|
||||
def my_process(i, c, cmd):
|
||||
if not USE_QUIET:
|
||||
percent = 100.0 * (i / len(check_commands))
|
||||
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
|
||||
|
||||
sys.stdout.flush()
|
||||
sys.stdout.write("%s %s\n" % (percent_str, c))
|
||||
|
||||
return subprocess.Popen(cmd)
|
||||
|
||||
process_functions = []
|
||||
for i, (c, cmd) in enumerate(check_commands):
|
||||
process_functions.append((my_process, (i, c, cmd)))
|
||||
|
||||
project_source_info.queue_processes(process_functions)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -1,78 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
"blender/intern/opennl",
|
||||
]
|
||||
|
||||
CHECKER_BIN = "sparse"
|
||||
CHECKER_ARGS = [
|
||||
]
|
||||
|
||||
import project_source_info
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
|
||||
USE_QUIET = (os.environ.get("QUIET", None) is not None)
|
||||
|
||||
|
||||
def main():
|
||||
source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
|
||||
source_defines = project_source_info.build_defines_as_args()
|
||||
|
||||
check_commands = []
|
||||
for c, inc_dirs, defs in source_info:
|
||||
|
||||
cmd = ([CHECKER_BIN] +
|
||||
CHECKER_ARGS +
|
||||
[c] +
|
||||
[("-I%s" % i) for i in inc_dirs] +
|
||||
[("-D%s" % d) for d in defs] +
|
||||
source_defines
|
||||
)
|
||||
|
||||
check_commands.append((c, cmd))
|
||||
|
||||
def my_process(i, c, cmd):
|
||||
if not USE_QUIET:
|
||||
percent = 100.0 * (i / len(check_commands))
|
||||
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
|
||||
|
||||
sys.stdout.flush()
|
||||
sys.stdout.write("%s %s\n" % (percent_str, c))
|
||||
|
||||
return subprocess.Popen(cmd)
|
||||
|
||||
process_functions = []
|
||||
for i, (c, cmd) in enumerate(check_commands):
|
||||
process_functions.append((my_process, (i, c, cmd)))
|
||||
|
||||
project_source_info.queue_processes(process_functions)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -1,108 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
"blender/intern/opennl",
|
||||
]
|
||||
|
||||
CHECKER_BIN = "splint"
|
||||
|
||||
CHECKER_ARGS = [
|
||||
"-weak",
|
||||
"-posix-lib",
|
||||
"-linelen", "10000",
|
||||
"+ignorequals",
|
||||
"+relaxtypes",
|
||||
"-retvalother",
|
||||
"+matchanyintegral",
|
||||
"+longintegral",
|
||||
"+ignoresigns",
|
||||
"-nestcomment",
|
||||
"-predboolothers",
|
||||
"-ifempty",
|
||||
"-unrecogcomments",
|
||||
|
||||
# we may want to remove these later
|
||||
"-type",
|
||||
"-fixedformalarray",
|
||||
"-fullinitblock",
|
||||
"-fcnuse",
|
||||
"-initallelements",
|
||||
"-castfcnptr",
|
||||
# -forcehints,
|
||||
"-bufferoverflowhigh", # warns a lot about sprintf()
|
||||
|
||||
# re-definitions, rna causes most of these
|
||||
"-redef",
|
||||
"-syntax",
|
||||
|
||||
# dummy, witjout this splint complains with:
|
||||
# /usr/include/bits/confname.h:31:27: *** Internal Bug at cscannerHelp.c:2428: Unexpanded macro not function or constant: int _PC_MAX_CANON
|
||||
"-D_PC_MAX_CANON=0",
|
||||
]
|
||||
|
||||
|
||||
import project_source_info
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
|
||||
USE_QUIET = (os.environ.get("QUIET", None) is not None)
|
||||
|
||||
|
||||
def main():
|
||||
source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
|
||||
|
||||
check_commands = []
|
||||
for c, inc_dirs, defs in source_info:
|
||||
cmd = ([CHECKER_BIN] +
|
||||
CHECKER_ARGS +
|
||||
[c] +
|
||||
[("-I%s" % i) for i in inc_dirs] +
|
||||
[("-D%s" % d) for d in defs]
|
||||
)
|
||||
|
||||
check_commands.append((c, cmd))
|
||||
|
||||
def my_process(i, c, cmd):
|
||||
if not USE_QUIET:
|
||||
percent = 100.0 * (i / len(check_commands))
|
||||
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
|
||||
|
||||
sys.stdout.write("%s %s\n" % (percent_str, c))
|
||||
sys.stdout.flush()
|
||||
|
||||
return subprocess.Popen(cmd)
|
||||
|
||||
process_functions = []
|
||||
for i, (c, cmd) in enumerate(check_commands):
|
||||
process_functions.append((my_process, (i, c, cmd)))
|
||||
|
||||
project_source_info.queue_processes(process_functions)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -1,62 +0,0 @@
|
||||
# turn everything OFF except for python which defaults to ON
|
||||
# and is needed for the UI
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_BUILDINFO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_BULLET ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GAMEENGINE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_ITASC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_CINEON ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_DDS ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_FRAMESERVER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENEXR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_REDCODE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LZMA ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LZO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_BOOLEAN ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_SMOKE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_OCEANSIM ON CACHE BOOL "" FORCE)
|
||||
set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENNL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_RAYOPTIMIZATION ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(WITH_CODEC_QUICKTIME ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
@@ -1,23 +0,0 @@
|
||||
# headless configuration, useful in for servers or renderfarms
|
||||
# builds without a windowing system (X11/Windows/Cocoa).
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/blender_headless.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_HEADLESS ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# disable audio, its possible some devs may want this but for now disable
|
||||
# so the python module doesnt hold the audio device and loads quickly.
|
||||
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# other features which are not especially useful as a python module
|
||||
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
|
@@ -1,59 +0,0 @@
|
||||
# turn everything OFF except for python which defaults to ON
|
||||
# and is needed for the UI
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/blender_lite.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_INSTALL_PORTABLE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SYSTEM_GLEW ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_AVI OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_SOLVER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_ITASC OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_CINEON OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_DDS OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_FRAMESERVER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_HDR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENEXR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENJPEG OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_REDCODE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_TIFF OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LZMA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LZO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_BOOLEAN OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_FLUID OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_REMESH OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_SMOKE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_OCEANSIM OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENIMAGEIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENNL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_RAYOPTIMIZATION OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XF86VMODE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
if(APPLE)
|
||||
set(WITH_CODEC_QUICKTIME OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
@@ -1,33 +0,0 @@
|
||||
# defaults for building blender as a python module 'bpy'
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/bpy_module.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_PYTHON_MODULE ON CACHE BOOL "" FORCE)
|
||||
|
||||
# install into the systems python dir
|
||||
set(WITH_INSTALL_PORTABLE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# no point int copying python into python
|
||||
set(WITH_PYTHON_INSTALL OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# dont build the game engine
|
||||
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# disable audio, its possible some devs may want this but for now disable
|
||||
# so the python module doesnt hold the audio device and loads quickly.
|
||||
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# other features which are not especially useful as a python module
|
||||
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
|
@@ -1,14 +0,0 @@
|
||||
# only compile Cycles standalone, without Blender
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/cycles_standalone.cmake ../blender
|
||||
#
|
||||
|
||||
# disable Blender
|
||||
set(WITH_BLENDER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PLAYER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_BLENDER OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# build Cycles
|
||||
set(WITH_CYCLES_STANDALONE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_STANDALONE_GUI ON CACHE BOOL "" FORCE)
|
@@ -1,41 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This shell script checks out and compiles blender, tested on ubuntu 10.04
|
||||
# assumes you have dependencies installed already
|
||||
|
||||
# See this page for more info:
|
||||
# http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Generic_Distro/CMake
|
||||
|
||||
# grab blender
|
||||
mkdir ~/blender-git
|
||||
cd ~/blender-git
|
||||
|
||||
git clone http://git.blender.org/blender.git
|
||||
cd blender
|
||||
git submodule update --init --recursive
|
||||
git submodule foreach git checkout master
|
||||
git submodule foreach git pull --rebase origin master
|
||||
|
||||
# create build dir
|
||||
mkdir ~/blender-git/build-cmake
|
||||
cd ~/blender-git/build-cmake
|
||||
|
||||
# cmake without copying files for fast rebuilds
|
||||
# the files from git will be used in place
|
||||
cmake ../blender
|
||||
|
||||
# make blender, will take some time
|
||||
make -j$(nproc)
|
||||
|
||||
# link the binary to blenders source directory to run quickly
|
||||
ln -s ~/blender-git/build-cmake/bin/blender ~/blender-git/blender/blender.bin
|
||||
|
||||
# useful info
|
||||
echo ""
|
||||
echo "* Useful Commands *"
|
||||
echo " Run Blender: ~/blender-git/blender/blender.bin"
|
||||
echo " Update Blender: git pull --rebase; git submodule foreach git pull --rebase origin master"
|
||||
echo " Reconfigure Blender: cd ~/blender-git/build-cmake ; cmake ."
|
||||
echo " Build Blender: cd ~/blender-git/build-cmake ; make"
|
||||
echo ""
|
||||
|
@@ -1,118 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
|
||||
def print_help(targets):
|
||||
print("CMake quicky wrapper, no valid targets given.")
|
||||
print(" * targets can contain a subset of the full target name.")
|
||||
print(" * arguments with a '-' prefix are passed onto make.")
|
||||
print(" * this must run from the cmake build dir")
|
||||
print(" * alias this with a short command for speedy access, in bash:")
|
||||
print(" alias mk='../blender/build_files/cmake/example_scripts/make_quicky.py'")
|
||||
print("")
|
||||
print(" eg: make_quicky.py -j3 extern python")
|
||||
print(" ...will execute")
|
||||
print(" make -j3 extern_binreloc extern_glew bf_python bf_python_ext blender/fast")
|
||||
print("")
|
||||
print("Target List:")
|
||||
for t in targets:
|
||||
print(" %s" % t)
|
||||
print("...exiting")
|
||||
|
||||
|
||||
def main():
|
||||
targets = set()
|
||||
|
||||
# collect targets
|
||||
makefile = open("Makefile", "r")
|
||||
for line in makefile:
|
||||
line = line.rstrip()
|
||||
if not line or line[0] in ". \t@$#":
|
||||
continue
|
||||
|
||||
line = line.split("#", 1)[0]
|
||||
if ":" not in line:
|
||||
continue
|
||||
|
||||
line = line.split(":", 1)[0]
|
||||
|
||||
if "/" in line: # cmake terget options, dont need these
|
||||
continue
|
||||
|
||||
targets.add(line)
|
||||
makefile.close()
|
||||
|
||||
# remove cmake targets
|
||||
bad = set([
|
||||
"help",
|
||||
"clean",
|
||||
"all",
|
||||
"preinstall",
|
||||
"install",
|
||||
"default_target",
|
||||
"edit_cache",
|
||||
"cmake_force",
|
||||
"rebuild_cache",
|
||||
"depend",
|
||||
"cmake_check_build_system",
|
||||
])
|
||||
|
||||
targets -= set(bad)
|
||||
|
||||
# parse args
|
||||
targets = list(targets)
|
||||
targets.sort()
|
||||
|
||||
import sys
|
||||
if len(sys.argv) == 1:
|
||||
print_help(targets)
|
||||
return
|
||||
|
||||
targets_new = []
|
||||
args = []
|
||||
for arg in sys.argv[1:]:
|
||||
if arg[0] in "/-":
|
||||
args.append(arg)
|
||||
else:
|
||||
found = False
|
||||
for t in targets:
|
||||
if arg in t and t not in targets_new:
|
||||
targets_new.append(t)
|
||||
found = True
|
||||
|
||||
if not found:
|
||||
print("Error '%s' not found in...")
|
||||
for t in targets:
|
||||
print(" %s" % t)
|
||||
print("...aborting.")
|
||||
return
|
||||
|
||||
# execute
|
||||
cmd = "make %s %s blender/fast" % (" ".join(args), " ".join(targets_new))
|
||||
print("cmake building with targets: %s" % " ".join(targets_new))
|
||||
print("executing: %s" % cmd)
|
||||
|
||||
import os
|
||||
os.system(cmd)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
# filters CMake output to be more like nan-makefiles
|
||||
|
||||
FILTER="^\[ *[0-9]*%] \|^Built target \|^Scanning "
|
||||
make $@ | \
|
||||
sed -u -e 's/^Linking .*\//Linking /' | \
|
||||
sed -u -e 's/^.*\// /' | \
|
||||
grep --line-buffered -v "$FILTER"
|
||||
|
||||
echo "Build Done"
|
File diff suppressed because it is too large
Load Diff
@@ -1,114 +0,0 @@
|
||||
set(PROJECT_DESCRIPTION "Blender is a very fast and versatile 3D modeller/renderer.")
|
||||
set(PROJECT_COPYRIGHT "Copyright (C) 2001-2012 Blender Foundation")
|
||||
set(PROJECT_CONTACT "foundation@blender.org")
|
||||
set(PROJECT_VENDOR "Blender Foundation")
|
||||
|
||||
set(MAJOR_VERSION ${BLENDER_VERSION_MAJOR})
|
||||
set(MINOR_VERSION ${BLENDER_VERSION_MINOR})
|
||||
set(PATCH_VERSION ${BLENDER_VERSION_CHAR_INDEX})
|
||||
|
||||
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
|
||||
set(CPACK_PACKAGE_DESCRIPTION ${PROJECT_DESCRIPTION})
|
||||
set(CPACK_PACKAGE_VENDOR ${PROJECT_VENDOR})
|
||||
set(CPACK_PACKAGE_CONTACT ${PROJECT_CONTACT})
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
|
||||
|
||||
|
||||
# Get the build revision, note that this can get out-of-sync, so for packaging run cmake first.
|
||||
set(MY_WC_HASH "unknown")
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
|
||||
include(FindGit)
|
||||
if(GIT_FOUND)
|
||||
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
|
||||
execute_process(COMMAND git rev-parse --short @{u}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
endif()
|
||||
endif()
|
||||
set(BUILD_REV ${MY_WC_HASH})
|
||||
unset(MY_WC_HASH)
|
||||
|
||||
|
||||
# Force Package Name
|
||||
execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE CPACK_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# RPM packages
|
||||
include(build_files/cmake/RpmBuild.cmake)
|
||||
if(RPMBUILD_FOUND)
|
||||
set(CPACK_GENERATOR "RPM")
|
||||
set(CPACK_RPM_PACKAGE_RELEASE "git${CPACK_DATE}.${BUILD_REV}")
|
||||
set(CPACK_SET_DESTDIR "true")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
|
||||
set(CPACK_PACKAGE_RELOCATABLE "false")
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2+ and Apache 2.0")
|
||||
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Multimedia")
|
||||
set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_SOURCE_DIR}/build_files/package_spec/rpm/blender.spec.in")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Mac Bundle
|
||||
if(APPLE)
|
||||
set(CPACK_GENERATOR "DragNDrop")
|
||||
|
||||
# Libraries are bundled directly
|
||||
set(CPACK_COMPONENT_LIBRARIES_HIDDEN TRUE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender")
|
||||
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender")
|
||||
|
||||
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
|
||||
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
|
||||
|
||||
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt)
|
||||
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
|
||||
set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A")
|
||||
|
||||
set(CPACK_WIX_UI_BANNER ${LIBDIR}/package/installer_wix/WIX_UI_BANNER.bmp)
|
||||
set(CPACK_WIX_UI_DIALOG ${LIBDIR}/package/installer_wix/WIX_UI_DIALOG.bmp)
|
||||
|
||||
#force lzma instead of deflate
|
||||
set(CPACK_WIX_LIGHT_EXTRA_FLAGS -dcl:high)
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_EXECUTABLES "blender" "blender")
|
||||
include(CPack)
|
||||
|
||||
# Target for build_archive.py script, to automatically pass along
|
||||
# version, revision, platform, build directory
|
||||
macro(add_package_archive packagename extension)
|
||||
set(build_archive python ${CMAKE_SOURCE_DIR}/build_files/package_spec/build_archive.py)
|
||||
set(package_output ${CMAKE_BINARY_DIR}/release/${packagename}.${extension})
|
||||
|
||||
add_custom_target(package_archive DEPENDS ${package_output})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${package_output}
|
||||
COMMAND ${build_archive} ${packagename} ${extension} bin release
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
unset(build_archive)
|
||||
unset(package_output)
|
||||
endmacro()
|
||||
|
||||
if(APPLE)
|
||||
add_package_archive(
|
||||
"${PROJECT_NAME}-${BLENDER_VERSION}-${BUILD_REV}-OSX-${CMAKE_OSX_ARCHITECTURES}"
|
||||
"zip")
|
||||
elseif(UNIX)
|
||||
# platform name could be tweaked, to include glibc, and ensure processor is correct (i386 vs i686)
|
||||
string(TOLOWER ${CMAKE_SYSTEM_NAME} PACKAGE_SYSTEM_NAME)
|
||||
|
||||
add_package_archive(
|
||||
"${PROJECT_NAME}-${BLENDER_VERSION}-${BUILD_REV}-${PACKAGE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}"
|
||||
"tar.bz2")
|
||||
endif()
|
||||
|
@@ -1,243 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton, M.G. Kishalmi
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
"""
|
||||
Example Win32 usage:
|
||||
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py c:\blender_dev\cmake_build
|
||||
|
||||
Example Linux usage:
|
||||
python ~/blenderSVN/blender/build_files/cmake/cmake_qtcreator_project.py ~/blenderSVN/cmake
|
||||
"""
|
||||
|
||||
__all__ = (
|
||||
"SIMPLE_PROJECTFILE",
|
||||
"SOURCE_DIR",
|
||||
"CMAKE_DIR",
|
||||
"PROJECT_DIR",
|
||||
"source_list",
|
||||
"is_project_file",
|
||||
"is_c_header",
|
||||
"is_py",
|
||||
"cmake_advanced_info",
|
||||
"cmake_compiler_defines",
|
||||
"project_name_get"
|
||||
)
|
||||
|
||||
|
||||
import sys
|
||||
if not sys.version.startswith("3"):
|
||||
print("\nPython3.x needed, found %s.\nAborting!\n" %
|
||||
sys.version.partition(" ")[0])
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
import os
|
||||
from os.path import join, dirname, normpath, abspath, splitext, exists
|
||||
|
||||
SOURCE_DIR = join(dirname(__file__), "..", "..")
|
||||
SOURCE_DIR = normpath(SOURCE_DIR)
|
||||
SOURCE_DIR = abspath(SOURCE_DIR)
|
||||
|
||||
SIMPLE_PROJECTFILE = False
|
||||
|
||||
# get cmake path
|
||||
CMAKE_DIR = sys.argv[-1]
|
||||
|
||||
if not exists(join(CMAKE_DIR, "CMakeCache.txt")):
|
||||
CMAKE_DIR = os.getcwd()
|
||||
if not exists(join(CMAKE_DIR, "CMakeCache.txt")):
|
||||
print("CMakeCache.txt not found in %r or %r\n Pass CMake build dir as an argument, or run from that dir, aborting" % (CMAKE_DIR, os.getcwd()))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
# could be either.
|
||||
# PROJECT_DIR = SOURCE_DIR
|
||||
PROJECT_DIR = CMAKE_DIR
|
||||
|
||||
|
||||
def source_list(path, filename_check=None):
|
||||
for dirpath, dirnames, filenames in os.walk(path):
|
||||
|
||||
# skip '.svn'
|
||||
if dirpath.startswith("."):
|
||||
continue
|
||||
|
||||
for filename in filenames:
|
||||
filepath = join(dirpath, filename)
|
||||
if filename_check is None or filename_check(filepath):
|
||||
yield filepath
|
||||
|
||||
|
||||
# extension checking
|
||||
def is_cmake(filename):
|
||||
ext = splitext(filename)[1]
|
||||
return (ext == ".cmake") or (filename.endswith("CMakeLists.txt"))
|
||||
|
||||
|
||||
def is_c_header(filename):
|
||||
ext = splitext(filename)[1]
|
||||
return (ext in {".h", ".hpp", ".hxx", ".hh"})
|
||||
|
||||
|
||||
def is_py(filename):
|
||||
ext = splitext(filename)[1]
|
||||
return (ext == ".py")
|
||||
|
||||
|
||||
def is_glsl(filename):
|
||||
ext = splitext(filename)[1]
|
||||
return (ext == ".glsl")
|
||||
|
||||
|
||||
def is_c(filename):
|
||||
ext = splitext(filename)[1]
|
||||
return (ext in {".c", ".cpp", ".cxx", ".m", ".mm", ".rc", ".cc", ".inl", ".osl"})
|
||||
|
||||
|
||||
def is_c_any(filename):
|
||||
return is_c(filename) or is_c_header(filename)
|
||||
|
||||
|
||||
def is_svn_file(filename):
|
||||
dn, fn = os.path.split(filename)
|
||||
filename_svn = join(dn, ".svn", "text-base", "%s.svn-base" % fn)
|
||||
return exists(filename_svn)
|
||||
|
||||
|
||||
def is_project_file(filename):
|
||||
return (is_c_any(filename) or is_cmake(filename) or is_glsl(filename)) # and is_svn_file(filename)
|
||||
|
||||
|
||||
def cmake_advanced_info():
|
||||
""" Extracr includes and defines from cmake.
|
||||
"""
|
||||
|
||||
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")
|
||||
make_exe_basename = os.path.basename(make_exe)
|
||||
|
||||
def create_eclipse_project():
|
||||
print("CMAKE_DIR %r" % CMAKE_DIR)
|
||||
if sys.platform == "win32":
|
||||
cmd = 'cmake "%s" -G"Eclipse CDT4 - MinGW Makefiles"' % CMAKE_DIR
|
||||
else:
|
||||
if make_exe_basename.startswith(("make", "gmake")):
|
||||
cmd = 'cmake "%s" -G"Eclipse CDT4 - Unix Makefiles"' % CMAKE_DIR
|
||||
elif make_exe_basename.startswith("ninja"):
|
||||
cmd = 'cmake "%s" -G"Eclipse CDT4 - Ninja"' % CMAKE_DIR
|
||||
else:
|
||||
raise Exception("Unknown make program %r" % make_exe)
|
||||
|
||||
os.system(cmd)
|
||||
return join(CMAKE_DIR, ".cproject")
|
||||
|
||||
includes = []
|
||||
defines = []
|
||||
|
||||
project_path = create_eclipse_project()
|
||||
|
||||
if not exists(project_path):
|
||||
print("Generating Eclipse Prokect File Failed: %r not found" % project_path)
|
||||
return None, None
|
||||
|
||||
from xml.dom.minidom import parse
|
||||
tree = parse(project_path)
|
||||
|
||||
# to check on nicer xml
|
||||
# f = open(".cproject_pretty", 'w')
|
||||
# f.write(tree.toprettyxml(indent=" ", newl=""))
|
||||
|
||||
ELEMENT_NODE = tree.ELEMENT_NODE
|
||||
|
||||
cproject, = tree.getElementsByTagName("cproject")
|
||||
for storage in cproject.childNodes:
|
||||
if storage.nodeType != ELEMENT_NODE:
|
||||
continue
|
||||
|
||||
if storage.attributes["moduleId"].value == "org.eclipse.cdt.core.settings":
|
||||
cconfig = storage.getElementsByTagName("cconfiguration")[0]
|
||||
for substorage in cconfig.childNodes:
|
||||
if substorage.nodeType != ELEMENT_NODE:
|
||||
continue
|
||||
|
||||
moduleId = substorage.attributes["moduleId"].value
|
||||
|
||||
# org.eclipse.cdt.core.settings
|
||||
# org.eclipse.cdt.core.language.mapping
|
||||
# org.eclipse.cdt.core.externalSettings
|
||||
# org.eclipse.cdt.core.pathentry
|
||||
# org.eclipse.cdt.make.core.buildtargets
|
||||
|
||||
if moduleId == "org.eclipse.cdt.core.pathentry":
|
||||
for path in substorage.childNodes:
|
||||
if path.nodeType != ELEMENT_NODE:
|
||||
continue
|
||||
kind = path.attributes["kind"].value
|
||||
|
||||
if kind == "mac":
|
||||
# <pathentry kind="mac" name="PREFIX" path="" value=""/opt/blender25""/>
|
||||
defines.append((path.attributes["name"].value, path.attributes["value"].value))
|
||||
elif kind == "inc":
|
||||
# <pathentry include="/data/src/blender/blender/source/blender/editors/include" kind="inc" path="" system="true"/>
|
||||
includes.append(path.attributes["include"].value)
|
||||
else:
|
||||
pass
|
||||
|
||||
return includes, defines
|
||||
|
||||
|
||||
def cmake_cache_var(var):
|
||||
cache_file = open(join(CMAKE_DIR, "CMakeCache.txt"), encoding='utf-8')
|
||||
lines = [l_strip for l in cache_file for l_strip in (l.strip(),) if l_strip if not l_strip.startswith("//") if not l_strip.startswith("#")]
|
||||
cache_file.close()
|
||||
|
||||
for l in lines:
|
||||
if l.split(":")[0] == var:
|
||||
return l.split("=", 1)[-1]
|
||||
return None
|
||||
|
||||
|
||||
def cmake_compiler_defines():
|
||||
compiler = cmake_cache_var("CMAKE_C_COMPILER") # could do CXX too
|
||||
|
||||
if compiler is None:
|
||||
print("Couldn't find the compiler, os defines will be omitted...")
|
||||
return
|
||||
|
||||
import tempfile
|
||||
temp_c = tempfile.mkstemp(suffix=".c")[1]
|
||||
temp_def = tempfile.mkstemp(suffix=".def")[1]
|
||||
|
||||
os.system("%s -dM -E %s > %s" % (compiler, temp_c, temp_def))
|
||||
|
||||
temp_def_file = open(temp_def)
|
||||
lines = [l.strip() for l in temp_def_file if l.strip()]
|
||||
temp_def_file.close()
|
||||
|
||||
os.remove(temp_c)
|
||||
os.remove(temp_def)
|
||||
return lines
|
||||
|
||||
|
||||
def project_name_get():
|
||||
return cmake_cache_var("CMAKE_PROJECT_NAME")
|
@@ -1,241 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
__all__ = (
|
||||
"build_info",
|
||||
"SOURCE_DIR",
|
||||
)
|
||||
|
||||
|
||||
import sys
|
||||
if not sys.version.startswith("3"):
|
||||
print("\nPython3.x needed, found %s.\nAborting!\n" %
|
||||
sys.version.partition(" ")[0])
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
import os
|
||||
from os.path import join, dirname, normpath, abspath
|
||||
|
||||
SOURCE_DIR = join(dirname(__file__), "..", "..")
|
||||
SOURCE_DIR = normpath(SOURCE_DIR)
|
||||
SOURCE_DIR = abspath(SOURCE_DIR)
|
||||
|
||||
|
||||
def is_c_header(filename):
|
||||
ext = os.path.splitext(filename)[1]
|
||||
return (ext in {".h", ".hpp", ".hxx", ".hh"})
|
||||
|
||||
|
||||
def is_c(filename):
|
||||
ext = os.path.splitext(filename)[1]
|
||||
return (ext in {".c", ".cpp", ".cxx", ".m", ".mm", ".rc", ".cc", ".inl", ".osl"})
|
||||
|
||||
|
||||
def is_c_any(filename):
|
||||
return os.path.s_c(filename) or is_c_header(filename)
|
||||
|
||||
|
||||
# copied from project_info.py
|
||||
CMAKE_DIR = "."
|
||||
|
||||
|
||||
def cmake_cache_var(var):
|
||||
cache_file = open(join(CMAKE_DIR, "CMakeCache.txt"))
|
||||
lines = [l_strip for l in cache_file for l_strip in (l.strip(),) if l_strip if not l_strip.startswith("//") if not l_strip.startswith("#")]
|
||||
cache_file.close()
|
||||
|
||||
for l in lines:
|
||||
if l.split(":")[0] == var:
|
||||
return l.split("=", 1)[-1]
|
||||
return None
|
||||
|
||||
|
||||
def do_ignore(filepath, ignore_prefix_list):
|
||||
if ignore_prefix_list is None:
|
||||
return False
|
||||
|
||||
relpath = os.path.relpath(filepath, SOURCE_DIR)
|
||||
return any([relpath.startswith(prefix) for prefix in ignore_prefix_list])
|
||||
|
||||
|
||||
def makefile_log():
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
# support both make and ninja
|
||||
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")
|
||||
make_exe_basename = os.path.basename(make_exe)
|
||||
|
||||
if make_exe_basename.startswith(("make", "gmake")):
|
||||
print("running 'make' with --dry-run ...")
|
||||
process = subprocess.Popen([make_exe, "--always-make", "--dry-run", "--keep-going", "VERBOSE=1"],
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
elif make_exe_basename.startswith("ninja"):
|
||||
print("running 'ninja' with -t commands ...")
|
||||
process = subprocess.Popen([make_exe, "-t", "commands"],
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
|
||||
while process.poll():
|
||||
time.sleep(1)
|
||||
|
||||
out = process.stdout.read()
|
||||
process.stdout.close()
|
||||
print("done!", len(out), "bytes")
|
||||
return out.decode("utf-8", errors="ignore").split("\n")
|
||||
|
||||
|
||||
def build_info(use_c=True, use_cxx=True, ignore_prefix_list=None):
|
||||
|
||||
makelog = makefile_log()
|
||||
|
||||
source = []
|
||||
|
||||
compilers = []
|
||||
if use_c:
|
||||
compilers.append(cmake_cache_var("CMAKE_C_COMPILER"))
|
||||
if use_cxx:
|
||||
compilers.append(cmake_cache_var("CMAKE_CXX_COMPILER"))
|
||||
|
||||
print("compilers:", " ".join(compilers))
|
||||
|
||||
fake_compiler = "%COMPILER%"
|
||||
|
||||
print("parsing make log ...")
|
||||
|
||||
for line in makelog:
|
||||
|
||||
args = line.split()
|
||||
|
||||
if not any([(c in args) for c in compilers]):
|
||||
continue
|
||||
|
||||
# join args incase they are not.
|
||||
args = ' '.join(args)
|
||||
args = args.replace(" -isystem", " -I")
|
||||
args = args.replace(" -D ", " -D")
|
||||
args = args.replace(" -I ", " -I")
|
||||
|
||||
for c in compilers:
|
||||
args = args.replace(c, fake_compiler)
|
||||
args = args.split()
|
||||
# end
|
||||
|
||||
# remove compiler
|
||||
args[:args.index(fake_compiler) + 1] = []
|
||||
|
||||
c_files = [f for f in args if is_c(f)]
|
||||
inc_dirs = [f[2:].strip() for f in args if f.startswith('-I')]
|
||||
defs = [f[2:].strip() for f in args if f.startswith('-D')]
|
||||
for c in sorted(c_files):
|
||||
|
||||
if do_ignore(c, ignore_prefix_list):
|
||||
continue
|
||||
|
||||
source.append((c, inc_dirs, defs))
|
||||
|
||||
# make relative includes absolute
|
||||
# not totally essential but useful
|
||||
for i, f in enumerate(inc_dirs):
|
||||
if not os.path.isabs(f):
|
||||
inc_dirs[i] = os.path.abspath(os.path.join(CMAKE_DIR, f))
|
||||
|
||||
# safety check that our includes are ok
|
||||
for f in inc_dirs:
|
||||
if not os.path.exists(f):
|
||||
raise Exception("%s missing" % f)
|
||||
|
||||
print("done!")
|
||||
|
||||
return source
|
||||
|
||||
|
||||
def build_defines_as_source():
|
||||
"""
|
||||
Returns a string formatted as an include:
|
||||
'#defines A=B\n#define....'
|
||||
"""
|
||||
import subprocess
|
||||
# works for both gcc and clang
|
||||
cmd = (cmake_cache_var("CMAKE_C_COMPILER"), "-dM", "-E", "-")
|
||||
return subprocess.Popen(cmd,
|
||||
stdout=subprocess.PIPE,
|
||||
stdin=subprocess.DEVNULL,
|
||||
).stdout.read().strip().decode('ascii')
|
||||
|
||||
|
||||
def build_defines_as_args():
|
||||
return [("-D" + "=".join(l.split(maxsplit=2)[1:]))
|
||||
for l in build_defines_as_source().split("\n")
|
||||
if l.startswith('#define')]
|
||||
|
||||
|
||||
# could be moved elsewhere!, this just happens to be used by scripts that also
|
||||
# use this module.
|
||||
def queue_processes(process_funcs, job_total=-1):
|
||||
""" Takes a list of function arg pairs, each function must return a process
|
||||
"""
|
||||
|
||||
if job_total == -1:
|
||||
import multiprocessing
|
||||
job_total = multiprocessing.cpu_count()
|
||||
del multiprocessing
|
||||
|
||||
if job_total == 1:
|
||||
for func, args in process_funcs:
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
|
||||
process = func(*args)
|
||||
process.wait()
|
||||
else:
|
||||
import time
|
||||
|
||||
processes = []
|
||||
for func, args in process_funcs:
|
||||
# wait until a thread is free
|
||||
while 1:
|
||||
processes[:] = [p for p in processes if p.poll() is None]
|
||||
|
||||
if len(processes) <= job_total:
|
||||
break
|
||||
else:
|
||||
time.sleep(0.1)
|
||||
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
|
||||
processes.append(func(*args))
|
||||
|
||||
|
||||
def main():
|
||||
if not os.path.exists(join(CMAKE_DIR, "CMakeCache.txt")):
|
||||
print("This script must run from the cmake build dir")
|
||||
return
|
||||
|
||||
for s in build_info():
|
||||
print(s)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -1,70 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
# todo:
|
||||
# strip executables
|
||||
|
||||
# get parameters
|
||||
if len(sys.argv) < 5:
|
||||
sys.stderr.write('Excepted arguments: ./build_archive.py name extension install_dir output_dir')
|
||||
sys.exit(1)
|
||||
|
||||
package_name = sys.argv[1]
|
||||
extension = sys.argv[2]
|
||||
install_dir = sys.argv[3]
|
||||
output_dir = sys.argv[4]
|
||||
|
||||
package_archive = os.path.join(output_dir, package_name + '.' + extension)
|
||||
package_dir = package_name
|
||||
|
||||
# remove existing package with the same name
|
||||
try:
|
||||
if os.path.exists(package_archive):
|
||||
os.remove(package_archive)
|
||||
if os.path.exists(package_dir):
|
||||
shutil.rmtree(package_dir)
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to clean up old package files: ' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
# create temporary package dir
|
||||
try:
|
||||
shutil.copytree(install_dir, package_dir)
|
||||
|
||||
for f in os.listdir(package_dir):
|
||||
if f.startswith('makes'):
|
||||
os.remove(os.path.join(package_dir, f))
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to copy install directory: ' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
# create archive
|
||||
try:
|
||||
if not os.path.exists(output_dir):
|
||||
os.mkdir(output_dir)
|
||||
|
||||
if extension == 'zip':
|
||||
archive_cmd = ['zip', '-9', '-r', package_archive, package_dir]
|
||||
elif extension == 'tar.bz2':
|
||||
archive_cmd = ['tar', 'cjf', package_archive, package_dir]
|
||||
else:
|
||||
sys.stderr.write('Unknown archive extension: ' + extension)
|
||||
sys.exit(-1)
|
||||
|
||||
subprocess.call(archive_cmd)
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to create package archive: ' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
# empty temporary package dir
|
||||
try:
|
||||
shutil.rmtree(package_dir)
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to clean up package directory: ' + str(ex) + '\n')
|
||||
sys.exit(1)
|
@@ -1,43 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Builds a debian package from SVN source.
|
||||
#
|
||||
# For paralelle builds use:
|
||||
# DEB_BUILD_OPTIONS="parallel=5" sh build_files/package_spec/build_debian.sh
|
||||
|
||||
# this needs to run in the root dir.
|
||||
cd $(dirname $0)/../../
|
||||
rm -rf debian
|
||||
cp -a build_files/package_spec/debian .
|
||||
|
||||
|
||||
# Get values from blender to use in debian/changelog.
|
||||
# value may be formatted: 35042:35051M
|
||||
BLENDER_REVISION=$(svnversion | cut -d: -f2 | tr -dc 0-9)
|
||||
|
||||
blender_version=$(grep BLENDER_VERSION source/blender/blenkernel/BKE_blender.h | tr -dc 0-9)
|
||||
blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' source/blender/blenkernel/BKE_blender.h)
|
||||
BLENDER_VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)
|
||||
|
||||
# map the version a -> 1, to conform to debian naming convention
|
||||
# not to be confused with blender's internal subversions
|
||||
if [ "$blender_version_char" ]; then
|
||||
BLENDER_VERSION=${BLENDER_VERSION}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
|
||||
fi
|
||||
|
||||
DEB_VERSION=${BLENDER_VERSION}+svn${BLENDER_REVISION}-bf
|
||||
|
||||
# update debian/changelog
|
||||
dch -b -v $DEB_VERSION "New upstream SVN snapshot."
|
||||
|
||||
|
||||
# run the rules makefile
|
||||
rm -rf get-orig-source
|
||||
debian/rules get-orig-source SVN_URL=.
|
||||
mv *.gz ../
|
||||
|
||||
# build the package
|
||||
debuild -i -us -uc -b
|
||||
|
||||
|
||||
# remove temp dir
|
||||
rm -rf debian
|
@@ -1,5 +0,0 @@
|
||||
blender (2.56+svn34749-bf) unstable; urgency=low
|
||||
|
||||
* New upstream SVN snapshot.
|
||||
|
||||
-- Dan Eicher <dan@trollwerks.org> Wed, 09 Feb 2011 18:55:24 -0700
|
@@ -1 +0,0 @@
|
||||
7
|
@@ -1,24 +0,0 @@
|
||||
Source: blender
|
||||
Section: graphics
|
||||
Priority: extra
|
||||
Maintainer: Dan Eicher <dan@trollwerks.org>
|
||||
Build-Depends: debhelper (>= 7.0.50~), cmake, python3, python, libfreetype6-dev, libglu1-mesa-dev, libilmbase-dev, libopenexr-dev, libjpeg62-dev, libopenal-dev, libpng12-dev, libsdl-dev, libtiff4-dev, libx11-dev, libxi-dev, zlib1g-dev, python3.2-dev, libopenjpeg-dev
|
||||
Standards-Version: 3.9.1
|
||||
Homepage: http://blender.org/
|
||||
X-Python3-Version: >= 3.2, << 3.3
|
||||
|
||||
Package: blender-snapshot
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${python3:Depends}, ${misc:Depends}
|
||||
Provides: blender
|
||||
Conflicts: blender
|
||||
Replaces: blender
|
||||
Description: Very fast and versatile 3D modeller/renderer
|
||||
Blender is an integrated 3d suite for modelling, animation, rendering,
|
||||
post-production, interactive creation and playback (games). Blender has its
|
||||
own particular user interface, which is implemented entirely in OpenGL and
|
||||
designed with speed in mind. Python bindings are available for scripting;
|
||||
import/export features for popular file formats like 3D Studio and Wavefront
|
||||
Obj are implemented as scripts by the community. Stills, animations, models
|
||||
for games or other third party engines and interactive content in the form of
|
||||
a standalone binary and/or a web plug-in are common products of Blender use.
|
@@ -1,41 +0,0 @@
|
||||
This work was packaged for Debian by:
|
||||
|
||||
Dan Eicher <dan@trollwerks.org> on Tue, 08 Feb 2011 21:59:32 -0700
|
||||
|
||||
It was downloaded from:
|
||||
|
||||
http://blender.org
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright (C) 2002-2011 Blender Foundation
|
||||
|
||||
License:
|
||||
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
||||
|
||||
|
||||
The Debian packaging is:
|
||||
|
||||
Copyright (C) 2011 Dan Eicher <dan@trollwerks.org>
|
||||
|
||||
you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
@@ -1,2 +0,0 @@
|
||||
release/text/copyright.txt
|
||||
release/text/readme.html
|
@@ -1,4 +0,0 @@
|
||||
?package(blender-snapshot):needs="X11" section="Applications/Graphics"\
|
||||
longtitle="Blender 3D modeler / renderer"\
|
||||
icon="/usr/share/icons/hicolor/scalable/apps/blender.svg"\
|
||||
title="blender" command="/usr/bin/blender"
|
@@ -1,44 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
SVN_URL := https://svn.blender.org/svnroot/bf-blender/trunk/blender
|
||||
REV := $(shell dpkg-parsechangelog | sed -rne 's,^Version: .*[+~]svn([0-9]+).*,\1,p')
|
||||
VER := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
|
||||
REL := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([0-9]+\.[0-9]+).*,\1,p')
|
||||
TARBALL = blender_$(VER).orig.tar.gz
|
||||
BLDDIR = debian/cmake
|
||||
|
||||
%:
|
||||
dh $@ -Scmake -B$(BLDDIR) --parallel --with python3 --without python-support
|
||||
|
||||
override_dh_auto_configure:
|
||||
# blender spesific CMake options
|
||||
dh_auto_configure -- \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DWITH_INSTALL_PORTABLE:BOOL=OFF \
|
||||
-DWITH_PYTHON_INSTALL:BOOL=OFF \
|
||||
-DWITH_OPENCOLLADA:BOOL=OFF
|
||||
|
||||
override_dh_auto_test:
|
||||
# don't run CTest
|
||||
|
||||
override_dh_install:
|
||||
dh_install
|
||||
|
||||
# remove duplicated docs
|
||||
rm -rf debian/blender-snapshot/usr/share/doc/blender
|
||||
|
||||
override_dh_python3:
|
||||
dh_python3 -V 3.2-3.3 /usr/share/blender/$(REL)/scripts
|
||||
|
||||
get-orig-source:
|
||||
rm -rf get-orig-source $(TARBALL)
|
||||
mkdir get-orig-source
|
||||
if [ "$(SVN_URL)" = . ] && [ `svnversion` = "$(REV)" ]; then \
|
||||
svn -q export . get-orig-source/blender-$(VER); \
|
||||
else \
|
||||
svn -q export -r $(REV) $(SVN_URL) get-orig-source/blender-$(VER); \
|
||||
fi
|
||||
GZIP='--best --no-name' tar czf $(TARBALL) -C get-orig-source blender-$(VER)
|
||||
rm -rf get-orig-source
|
||||
@echo "$(TARBALL) created; move it to the right destination to build the package"
|
@@ -1 +0,0 @@
|
||||
3.0 (quilt)
|
@@ -1,3 +0,0 @@
|
||||
version=3
|
||||
opts=uversionmangle=s/[a-z]$/.$&/;s/[j-s]$/1$&/;s/[t-z]$/2$&/;tr/a-z/1-90-90-6/ \
|
||||
http://download.blender.org/source/blender-([0-9.]+[a-z]?)\.tar\.gz
|
@@ -1,66 +0,0 @@
|
||||
# Maintainer: Campbell Barton <ideasman42 at gmail dot com>
|
||||
|
||||
# custom blender vars
|
||||
blender_srcdir=$(dirname $startdir)"/../.."
|
||||
# value may be formatted: 35042:35051M
|
||||
blender_revision=$(svnversion $blender_srcdir | cut -d: -f2 | awk '{print $3}')
|
||||
blender_version=$(grep "BLENDER_VERSION\s" $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
|
||||
blender_version=$(expr $blender_version / 100).$(expr $blender_version % 100) # 256 -> 2.56
|
||||
blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' $blender_srcdir/source/blender/blenkernel/BKE_blender.h)
|
||||
# blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
|
||||
|
||||
# map the version a -> 1
|
||||
# not to be confused with blender's internal subversions
|
||||
if [ "$blender_version_char" ]; then
|
||||
blender_version_full=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
|
||||
else
|
||||
blender_version_full=${blender_version}
|
||||
fi
|
||||
|
||||
blender_ver_string=$blender_version+git$blender_version_full
|
||||
|
||||
pkgname=blender-snapshot
|
||||
pkgver=$blender_ver_string
|
||||
pkgrel=1
|
||||
pkgdesc="A fully integrated 3D graphics creation suite"
|
||||
arch=('i686' 'x86_64')
|
||||
url="www.blender.org"
|
||||
license=('GPL')
|
||||
groups=()
|
||||
depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.4' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'ffmpeg')
|
||||
makedepends=('cmake' 'git')
|
||||
optdepends=()
|
||||
provides=()
|
||||
conflicts=('blender')
|
||||
replaces=('blender')
|
||||
backup=()
|
||||
options=()
|
||||
install=blender.install
|
||||
# use current git to make the package.
|
||||
# source=(http://download.blender.org/source/$pkgname-$pkgver.tar.gz)
|
||||
# md5sums=('27edb80c82c25252d43d6a01980d953a') #generate with 'makepkg -g'
|
||||
source=()
|
||||
md5sums=()
|
||||
noextract=()
|
||||
|
||||
build() {
|
||||
mkdir -p $srcdir/build
|
||||
cd $srcdir/build
|
||||
cmake $blender_srcdir \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DWITH_INSTALL_PORTABLE:BOOL=OFF \
|
||||
-DWITH_PYTHON_INSTALL:BOOL=OFF \
|
||||
-DWITH_OPENCOLLADA:BOOL=OFF
|
||||
|
||||
make $MAKEFLAGS
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $srcdir/build
|
||||
make DESTDIR="$pkgdir" install
|
||||
python -m compileall \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/startup \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/modules \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/addons
|
||||
}
|
@@ -1,29 +0,0 @@
|
||||
post_install() {
|
||||
cat << EOF
|
||||
|
||||
NOTE
|
||||
----
|
||||
Happy blending!
|
||||
|
||||
EOF
|
||||
echo "update desktop mime database..."
|
||||
update-desktop-database
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
||||
|
||||
pre_remove() {
|
||||
/bin/true
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
echo "update desktop mime database..."
|
||||
update-desktop-database
|
||||
}
|
||||
|
||||
op=$1
|
||||
shift
|
||||
|
||||
$op $*
|
@@ -1,88 +0,0 @@
|
||||
# -*- rpm-spec -*-
|
||||
%global __python %{__python3}
|
||||
%global blender_api @CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@
|
||||
|
||||
%define _rpmdir @CPACK_RPM_DIRECTORY@
|
||||
%define _rpmfilename @CPACK_RPM_FILE_NAME@
|
||||
%define _unpackaged_files_terminate_build 0
|
||||
%define _topdir @CPACK_RPM_DIRECTORY@
|
||||
|
||||
BuildRoot: @CPACK_RPM_DIRECTORY@/@CPACK_PACKAGE_FILE_NAME@@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH@
|
||||
Summary: @CPACK_RPM_PACKAGE_SUMMARY@
|
||||
Name: @CPACK_RPM_PACKAGE_NAME@
|
||||
Version: @CPACK_RPM_PACKAGE_VERSION@
|
||||
Release: @CPACK_RPM_PACKAGE_RELEASE@%{?dist}
|
||||
License: @CPACK_RPM_PACKAGE_LICENSE@
|
||||
Group: @CPACK_RPM_PACKAGE_GROUP@
|
||||
Vendor: @CPACK_RPM_PACKAGE_VENDOR@
|
||||
Epoch: 1
|
||||
|
||||
Requires(post): desktop-file-utils
|
||||
Requires(post): shared-mime-info
|
||||
Requires(postun): desktop-file-utils
|
||||
Requires(postun): shared-mime-info
|
||||
|
||||
Provides: blender(ABI) = %{blender_api}
|
||||
Provides: blender-fonts = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
Obsoletes: blender-fonts <= 2.49a-9
|
||||
|
||||
%description
|
||||
Blender is an integrated 3d suite for modelling, animation, rendering,
|
||||
post-production, interactive creation and playback (games). Blender has its
|
||||
own particular user interface, which is implemented entirely in OpenGL and
|
||||
designed with speed in mind. Python bindings are available for scripting;
|
||||
import/export features for popular file formats like 3D Studio and Wavefront
|
||||
Obj are implemented as scripts by the community. Stills, animations, models
|
||||
for games or other third party engines and interactive content in the form of
|
||||
a standalone binary and/or a web plug-in are common products of Blender use.
|
||||
|
||||
# This is a shortcutted spec file generated by CMake RPM generator
|
||||
# we skip _install step because CPack does that for us.
|
||||
# We do only save CPack installed tree in _prepr
|
||||
# and then restore it in build.
|
||||
%prep
|
||||
mv ${RPM_BUILD_ROOT} "@CPACK_TOPLEVEL_DIRECTORY@/tmpBBroot"
|
||||
|
||||
%install
|
||||
if [ -e ${RPM_BUILD_ROOT} ];
|
||||
then
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
fi
|
||||
mv "@CPACK_TOPLEVEL_DIRECTORY@/tmpBBroot" ${RPM_BUILD_ROOT}
|
||||
|
||||
rm -f ${RPM_BUILD_ROOT}%{_bindir}/blender-thumbnailer.py
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%post
|
||||
touch --no-create %{_datadir}/icons/hicolor
|
||||
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
|
||||
fi
|
||||
%{_bindir}/update-desktop-database %{_datadir}/applications || :
|
||||
|
||||
%postun
|
||||
%{_bindir}/update-desktop-database %{_datadir}/applications
|
||||
touch --no-create %{_datadir}/icons/hicolor
|
||||
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
|
||||
fi || :
|
||||
|
||||
%files -f blender.lang
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/%{name}
|
||||
%{_datadir}/%{name}/%{blender_api}/datafiles/fonts
|
||||
%{_datadir}/%{name}/%{blender_api}/datafiles/colormanagement
|
||||
%{_datadir}/%{name}/%{blender_api}/datafiles/locale/languages
|
||||
%{_datadir}/%{name}/%{blender_api}/scripts
|
||||
%{_datadir}/icons/hicolor/*/apps/%{name}.*
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/doc/%{name}
|
||||
%{_mandir}/man1/%{name}.*
|
||||
|
||||
%changelog
|
||||
@CPACK_RPM_SPEC_CHANGELOG@
|
@@ -1,50 +0,0 @@
|
||||
import os
|
||||
import platform
|
||||
|
||||
def FindPython():
|
||||
all_abi_flags = ['m', 'mu', '']
|
||||
|
||||
python = "/usr"
|
||||
abi_flags = "m" # Most common for linux distros
|
||||
version = "3.4"
|
||||
|
||||
_arch = platform.uname()[4] + "-linux-gnu"
|
||||
|
||||
# Determine ABI flags used on this system
|
||||
include = os.path.join(python, "include")
|
||||
for cur_flags in all_abi_flags:
|
||||
inc = os.path.join(include, "python" + version + cur_flags, "Python.h")
|
||||
if os.path.exists(inc):
|
||||
abi_flags = cur_flags
|
||||
break
|
||||
|
||||
# Find config.h. In some distros, such as ubuntu 12.10 they are not in standard include dir.
|
||||
incconf = os.path.join(include, _arch, "python" + version + cur_flags)
|
||||
if not os.path.exists(os.path.join(incconf, "pyconfig.h")):
|
||||
incconf = ''
|
||||
|
||||
# Determine whether python is in /usr/lib or /usr/lib64
|
||||
lib32 = os.path.join(python, "lib", "python" + version, "sysconfig.py")
|
||||
lib64 = os.path.join(python, "lib64", "python" + version, "sysconfig.py")
|
||||
if os.path.exists(lib32):
|
||||
libpath = "${BF_PYTHON}/lib"
|
||||
elif os.path.exists(lib64):
|
||||
libpath = "${BF_PYTHON}/lib64"
|
||||
else:
|
||||
# roll back to default value
|
||||
libpath = "${BF_PYTHON}/lib"
|
||||
|
||||
libpath_arch = libpath
|
||||
_libpath_arch = os.path.join(python, "lib", _arch) # No lib64 stuff with recent deb-like distro afaik...
|
||||
_libs = ["libpython" + version + abi_flags + ext for ext in (".so", ".a")]
|
||||
for l in _libs:
|
||||
if not os.path.exists(os.path.join(libpath, l)) and os.path.exists(os.path.join(_libpath_arch, l)):
|
||||
libpath_arch = os.path.join(libpath, _arch)
|
||||
break
|
||||
|
||||
return {"PYTHON": python,
|
||||
"VERSION": version,
|
||||
"LIBPATH": libpath,
|
||||
"LIBPATH_ARCH": libpath_arch,
|
||||
"ABI_FLAGS": abi_flags,
|
||||
"CONFIG": incconf}
|
@@ -1,42 +0,0 @@
|
||||
def FindSharedPtr(conf):
|
||||
"""
|
||||
Detect shared_ptr availability
|
||||
"""
|
||||
|
||||
found = False
|
||||
namespace = None
|
||||
header = None
|
||||
|
||||
if conf.CheckCXXHeader("memory"):
|
||||
# Finding the memory header doesn't mean that shared_ptr is in std
|
||||
# namespace.
|
||||
#
|
||||
# In particular, MSVC 2008 has shared_ptr declared in std::tr1. In
|
||||
# order to support this, we do an extra check to see which namespace
|
||||
# should be used.
|
||||
|
||||
if conf.CheckType('std::shared_ptr<int>', language = 'C++', includes="#include <memory>"):
|
||||
print("-- Found shared_ptr in std namespace using <memory> header.")
|
||||
namespace = 'std'
|
||||
header = 'memory'
|
||||
elif conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <memory>"):
|
||||
print("-- Found shared_ptr in std::tr1 namespace using <memory> header..")
|
||||
namespace = 'std::tr1'
|
||||
header = 'memory'
|
||||
|
||||
if not namespace and conf.CheckCXXHeader("tr1/memory"):
|
||||
# Further, gcc defines shared_ptr in std::tr1 namespace and
|
||||
# <tr1/memory> is to be included for this. And what makes things
|
||||
# even more tricky is that gcc does have <memory> header, so
|
||||
# all the checks above wouldn't find shared_ptr.
|
||||
if conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <tr1/memory>"):
|
||||
print("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header..")
|
||||
namespace = 'std::tr1'
|
||||
header = 'tr1/memory'
|
||||
|
||||
if not namespace:
|
||||
print("-- Unable to find shared_ptrred_map>.")
|
||||
|
||||
conf.env['WITH_SHARED_PTR_SUPPORT'] = namespace and header
|
||||
conf.env['SHARED_PTR_NAMESPACE'] = namespace
|
||||
conf.env['SHARED_PTR_HEADER'] = header
|
@@ -1,38 +0,0 @@
|
||||
def FindUnorderedMap(conf):
|
||||
"""
|
||||
Detect unordered_map availability
|
||||
"""
|
||||
|
||||
namespace = None
|
||||
header = None
|
||||
|
||||
if conf.CheckCXXHeader("unordered_map"):
|
||||
# Even so we've found unordered_map header file it doesn't
|
||||
# mean unordered_map and unordered_set will be declared in
|
||||
# std namespace.
|
||||
#
|
||||
# Namely, MSVC 2008 have unordered_map header which declares
|
||||
# unordered_map class in std::tr1 namespace. In order to support
|
||||
# this, we do extra check to see which exactly namespace is
|
||||
# to be used.
|
||||
|
||||
if conf.CheckType('std::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
|
||||
print("-- Found unordered_map/set in std namespace.")
|
||||
namespace = 'std'
|
||||
header = 'unordered_map'
|
||||
elif conf.CheckType('std::tr1::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
|
||||
print("-- Found unordered_map/set in std::tr1 namespace.")
|
||||
namespace = 'std::tr1'
|
||||
header = 'unordered_map'
|
||||
else:
|
||||
print("-- Found <unordered_map> but can not find neither std::unordered_map nor std::tr1::unordered_map.")
|
||||
elif conf.CheckCXXHeader("tr1/unordered_map"):
|
||||
print("-- Found unordered_map/set in std::tr1 namespace.")
|
||||
namespace = 'std::tr1'
|
||||
header = 'tr1/unordered_map'
|
||||
else:
|
||||
print("-- Unable to find <unordered_map> or <tr1/unordered_map>. ")
|
||||
|
||||
conf.env['WITH_UNORDERED_MAP_SUPPORT'] = namespace and header
|
||||
conf.env['UNORDERED_MAP_NAMESPACE'] = namespace
|
||||
conf.env['UNORDERED_MAP_HEADER'] = header
|
@@ -1,263 +0,0 @@
|
||||
import commands
|
||||
|
||||
#############################################################################
|
||||
################### Compiler & architecture settings ##################
|
||||
#############################################################################
|
||||
|
||||
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
|
||||
MACOSX_SDK='' # set an sdk name like '10.7' or leave empty for automatic choosing highest available
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.6'
|
||||
|
||||
# gcc always defaults to the system standard compiler linked by a shim or symlink
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
#############################################################################
|
||||
################### Dependency settings ##################
|
||||
#############################################################################
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = LIBDIR + '/ffmpeg'
|
||||
BF_FFMPEG_INC = "${BF_FFMPEG}/include"
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg bz2'
|
||||
#bz2 is a standard osx dynlib
|
||||
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
WITH_OSX_STATICPYTHON = True
|
||||
|
||||
# python 3.4 uses precompiled libraries in bf svn /lib by default
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}m'
|
||||
# BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}m'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
|
||||
# BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include' # only headers from libdir needed for proper use of framework !!!!
|
||||
#BF_OPENAL_LIB = 'openal'
|
||||
#BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
#BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
# we use simply jack framework
|
||||
WITH_BF_JACK = True
|
||||
BF_JACK = '/Library/Frameworks/Jackmp.framework'
|
||||
BF_JACK_INC = '${BF_JACK}/headers'
|
||||
#BF_JACK_LIB = 'jack' # not used due framework
|
||||
BF_JACK_LIBPATH = '${BF_JACK}'
|
||||
|
||||
WITH_BF_SNDFILE = True
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'sndfile FLAC ogg vorbis vorbisenc'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib ${BF_FFMPEG}/lib' #ogg libs are stored in ffmpeg dir
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL2' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = '${LCGDIR}/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread'
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
#BF_ZLIB_INC = '${BF_ZLIB}/include' # don't use this, it breaks -isysroot ${MACOSX_SDK}
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'libfftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = True
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = '/usr'
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
#BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = True
|
||||
BF_OPENGL_LIB = 'GL GLU'
|
||||
BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
|
||||
BF_OPENGL_LINKFLAGS = ['-framework', 'OpenGL']
|
||||
|
||||
#OpenCollada flags
|
||||
WITH_BF_COLLADA = True
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = LIBDIR + '/opencollada'
|
||||
BF_PCRE = LIBDIR + '/opencollada'
|
||||
BF_PCRE_LIB = 'pcre'
|
||||
BF_PCRE_LIBPATH = '${BF_PCRE}/lib'
|
||||
#BF_EXPAT = '/usr'
|
||||
#BF_EXPAT_LIB = 'expat'
|
||||
#BF_EXPAT_LIBPATH = '/usr/lib'
|
||||
|
||||
# Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
|
||||
#OSL
|
||||
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
BF_OSL = LIBDIR + '/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
# note oslexec would passed via program linkflags, which is needed to
|
||||
# make llvm happy with osl_allocate_closure_component
|
||||
#BF_OSL_LIB = 'oslcomp oslquery'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
BF_LLVM = LIBDIR + '/llvm'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMSupport LLVMObject'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
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_OCIO = True
|
||||
BF_OCIO = LIBDIR + '/opencolorio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB = 'OpenColorIO tinyxml yaml-cpp'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = LIBDIR + '/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt boost_wave-mt'
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mt'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
#OpenMP ( will be checked for compiler support and turned off eventually )
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = []
|
||||
|
||||
# SpaceNavigator and related 3D mice, driver must be 3DxWare 10 Beta 4 (Mac OS X) or later !
|
||||
WITH_BF_3DMOUSE = True
|
||||
|
||||
#############################################################################
|
||||
################### various compile settings and flags ##################
|
||||
#############################################################################
|
||||
|
||||
BF_QUIET = '1' # suppress verbose output
|
||||
|
||||
CFLAGS = []
|
||||
CXXFLAGS = []
|
||||
CCFLAGS = ['-pipe','-funsigned-char']
|
||||
CPPFLAGS = []
|
||||
|
||||
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Cocoa','-framework','Carbon','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']
|
||||
|
||||
LLIBS = ['stdc++']
|
||||
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2']
|
||||
|
||||
CC_WARN = ['-Wall']
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
||||
##LOPTS = --dynamic
|
||||
##DYNLDFLAGS = -shared $(LDFLAGS)
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g ']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g']
|
||||
|
||||
#############################################################################
|
||||
################### Output directories ##################
|
||||
#############################################################################
|
||||
|
||||
BF_BUILDDIR='../build/darwin'
|
||||
BF_INSTALLDIR='../install/darwin'
|
@@ -1,268 +0,0 @@
|
||||
from FindPython import FindPython
|
||||
|
||||
py = FindPython()
|
||||
|
||||
BF_PYTHON_ABI_FLAGS = py['ABI_FLAGS']
|
||||
BF_PYTHON = py['PYTHON']
|
||||
BF_PYTHON_LIBPATH = py['LIBPATH']
|
||||
BF_PYTHON_LIBPATH_ARCH = py['LIBPATH_ARCH']
|
||||
BF_PYTHON_CONFIG = py['CONFIG']
|
||||
BF_PYTHON_VERSION = py['VERSION']
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS} ' + BF_PYTHON_CONFIG
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}' # BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
|
||||
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
|
||||
BF_PYTHON_LIB_STATIC = '${BF_PYTHON_LIBPATH_ARCH}/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL = '/usr'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'openal'
|
||||
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = '/usr'
|
||||
BF_JACK_INC = '${BF_JACK}/include/jack'
|
||||
BF_JACK_LIB = 'jack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = False
|
||||
WITH_BF_STATICSNDFILE = False
|
||||
BF_SNDFILE = '/usr'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
|
||||
BF_SNDFILE_LIB = 'sndfile'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
BF_SNDFILE_LIB_STATIC = '${BF_SNDFILE}/lib/libsndfile.a ${BF_OGG}/lib/libvorbis.a ${BF_OGG}/lib/libFLAC.a ${BF_OGG}/lib/libvorbisenc.a ${BF_OGG}/lib/libogg.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = '/usr' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = '/usr'
|
||||
# when compiling with your own openexr lib you might need to set...
|
||||
# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = '/usr'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = '/usr'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = '/usr'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
WITH_BF_ELTOPO = False
|
||||
BF_LAPACK = '/usr'
|
||||
BF_LAPACK_LIB = 'lapack3gf blas clapack'
|
||||
BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
|
||||
|
||||
BF_FREETYPE = '/usr'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
#BF_FREETYPE_LIB_STATIC = '${BF_FREETYPE}/lib/libfreetype.a'
|
||||
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = "/usr"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_BINRELOC = True
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = '/usr'
|
||||
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
#WITH_BF_STATICFFMPEG = True
|
||||
#BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH/libavcodec.a ${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libavutil.a ${BF_FFMPEG_LIBPATH}/libavdevice.a'
|
||||
|
||||
# enable ogg, vorbis and theora in ffmpeg
|
||||
WITH_BF_OGG = False
|
||||
BF_OGG = '/usr'
|
||||
BF_OGG_INC = '${BF_OGG}/include'
|
||||
BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = False
|
||||
WITH_BF_STATICFFTW3 = False
|
||||
BF_FFTW3 = '/usr'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'fftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
BF_FFTW3_LIB_STATIC = '${BF_FFTW3_LIBPATH}/libfftw3.a'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE = '#extern/libredcode'
|
||||
BF_REDCODE_LIB = ''
|
||||
# BF_REDCODE_INC = '${BF_REDCODE}/include'
|
||||
BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
|
||||
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
|
||||
|
||||
# Mesa Libs should go here if you're using them as well....
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = '/usr'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIB = 'GL GLU X11 Xi Xxf86vm'
|
||||
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
|
||||
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
|
||||
|
||||
WITH_BF_COLLADA = False
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
BF_OPENCOLLADA = '/usr'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
BF_PCRE = ''
|
||||
BF_PCRE_LIB = 'pcre'
|
||||
BF_PCRE_LIBPATH = '/usr/lib'
|
||||
BF_EXPAT = '/usr'
|
||||
BF_EXPAT_LIB = 'expat'
|
||||
BF_EXPAT_LIBPATH = '/usr/lib'
|
||||
|
||||
WITH_BF_JEMALLOC = False
|
||||
WITH_BF_STATICJEMALLOC = False
|
||||
BF_JEMALLOC = '/usr'
|
||||
BF_JEMALLOC_INC = '${BF_JEMALLOC}/include'
|
||||
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
|
||||
BF_JEMALLOC_LIB = 'jemalloc'
|
||||
BF_JEMALLOC_LIB_STATIC = '${BF_JEMALLOC_LIBPATH}/libjemalloc.a'
|
||||
|
||||
WITH_BF_OIIO = False
|
||||
WITH_BF_STATICOIIO = False
|
||||
BF_OIIO = '/usr'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB = 'OpenImageIO'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
WITH_BF_OCIO = False
|
||||
WITH_BF_STATICOCIO = False
|
||||
BF_OCIO = '/usr'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB = 'OpenColorIO yaml-cpp tinyxml'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
WITH_BF_STATICBOOST = False
|
||||
BF_BOOST = '/usr'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'boost_filesystem boost_regex boost_system boost_thread boost_date_time'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
WITH_BF_CYCLES = WITH_BF_OIIO and WITH_BF_BOOST
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
|
||||
|
||||
#SpaceNavigator and friends
|
||||
WITH_BF_3DMOUSE = True
|
||||
WITH_BF_STATIC3DMOUSE = False
|
||||
BF_3DMOUSE = '/usr'
|
||||
BF_3DMOUSE_INC = '${BF_3DMOUSE}/include'
|
||||
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
|
||||
BF_3DMOUSE_LIB = 'spnav'
|
||||
BF_3DMOUSE_LIB_STATIC = '${BF_3DMOUSE_LIBPATH}/libspnav.a'
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
##
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
|
||||
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
|
||||
CFLAGS = ['-std=gnu89']
|
||||
CXXFLAGS = []
|
||||
|
||||
CPPFLAGS = []
|
||||
# g++ 4.6, only needed for bullet
|
||||
CXXFLAGS += ['-fpermissive']
|
||||
if WITH_BF_FFMPEG:
|
||||
# libavutil needs UINT64_C()
|
||||
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2']
|
||||
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
|
||||
CC_WARN = ['-Wall']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
LLIBS = ['util', 'c', 'm', 'dl', 'pthread']
|
||||
|
||||
BF_PROFILE = False
|
||||
BF_PROFILE_CCFLAGS = ['-pg','-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g']
|
||||
|
||||
BF_BUILDDIR = '../build/linux'
|
||||
BF_INSTALLDIR='../install/linux'
|
||||
|
||||
#Link against pthread
|
||||
PLATFORM_LINKFLAGS = ['-pthread']
|
||||
|
||||
#Fix for LLVM conflict with Mesa llvmpipe, SDL dynload also requires symbols to be hidden.
|
||||
# TODO(sergey): Move this to SConstruct, so we can have this line depended on user config.
|
||||
PLATFORM_LINKFLAGS += ['-Wl,--version-script=source/creator/blender.map']
|
@@ -1,221 +0,0 @@
|
||||
LCGDIR = '#../lib/mingw32'
|
||||
LIBDIR = "${LCGDIR}"
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
|
||||
BF_PYTHON_DLL = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'wrap_oal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG_LIB = 'avformat-55 avcodec-55 avdevice-55 avutil-52 swscale-2'
|
||||
BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
|
||||
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = LIBDIR + '/jack'
|
||||
BF_JACK_INC = '${BF_JACK}/include'
|
||||
BF_JACK_LIB = 'libjack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = False
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'libsndfile-1'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
BF_PTHREADS = LIBDIR + '/pthreads'
|
||||
BF_PTHREADS_INC = '${BF_PTHREADS}/include'
|
||||
BF_PTHREADS_LIB = 'pthreadGC2'
|
||||
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'liblibjpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = LIBDIR + '/zlib'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'fftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
BF_WINTAB = LIBDIR + '/wintab'
|
||||
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE_INC = '#extern'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = 'C:\\MingW'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
BF_OPENGL_LIB = 'opengl32 glu32'
|
||||
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
|
||||
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
|
||||
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
|
||||
|
||||
WITH_BF_COLLADA = True
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
|
||||
#Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
|
||||
|
||||
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_OCIO = True
|
||||
BF_OCIO = LIBDIR + '/opencolorio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB = 'OpenColorIO'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = LIBDIR + '/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'boost_date_time-mgw46-mt-s-1_49 boost_filesystem-mgw46-mt-s-1_49 boost_regex-mgw46-mt-s-1_49 boost_system-mgw46-mt-s-1_49 boost_thread-mgw46-mt-s-1_49'
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mgw46-mt-s-1_49'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
##
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
|
||||
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||
CXXFLAGS = []
|
||||
|
||||
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2']
|
||||
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
|
||||
CC_WARN = [ '-Wall' ]
|
||||
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-ldbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('-limm32')
|
||||
|
||||
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
|
||||
|
||||
## DISABLED, causes linking errors!
|
||||
## for re-distribution, so users dont need mingw installed
|
||||
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS= ['-g']
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_BUILDDIR = '..\\build\\win32-mingw'
|
||||
BF_INSTALLDIR='..\\install\\win32-mingw'
|
@@ -1,256 +0,0 @@
|
||||
import subprocess
|
||||
|
||||
CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
CL_STDOUT, CL_STDERR = CL_OUT.communicate()
|
||||
|
||||
if "18.00." in CL_STDERR:
|
||||
VC_VERSION = '12.0'
|
||||
LCGDIR = '#../lib/windows_vc12'
|
||||
else:
|
||||
import sys
|
||||
print("Visual C version not supported {}\n".format(CL_STDERR))
|
||||
sys.exit(1)
|
||||
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = LIBDIR +'/ffmpeg'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include '
|
||||
BF_OPENAL_LIB = 'OpenAL32'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = LIBDIR + '/iconv'
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = LIBDIR + '/jack'
|
||||
BF_JACK_INC = '${BF_JACK}/include ${BF_FFMPEG}/include/msvc'
|
||||
BF_JACK_LIB = 'libjack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = True
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'libsndfile-1'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL2.lib'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
BF_PTHREADS = LIBDIR + '/pthreads'
|
||||
BF_PTHREADS_INC = '${BF_PTHREADS}/include'
|
||||
BF_PTHREADS_LIB = 'pthreadVC2'
|
||||
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
|
||||
BF_OPENEXR_LIB = ' Iex-2_2 Half IlmImf-2_2 Imath-2_2 IlmThread-2_2 '
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'libjpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'libpng'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'libtiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = LIBDIR + '/zlib'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'libz_st'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
WITH_BF_ELTOPO = False
|
||||
BF_LAPACK = LIBDIR + '/lapack'
|
||||
BF_LAPACK_LIB = 'libf2c clapack_nowrap BLAS_nowrap'
|
||||
BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
|
||||
|
||||
BF_WINTAB = LIBDIR + '/wintab'
|
||||
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
WITH_BF_BINRELOC = False
|
||||
|
||||
BF_WITH_FREETYPE = True
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype2ST'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'libfftw'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE_INC = '#extern'
|
||||
|
||||
WITH_BF_COLLADA = True
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_3DMOUSE = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
WITH_BF_STATICOSL = True
|
||||
BF_OSL = '${LIBDIR}/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_LIB_STATIC = '${BF_OSL_LIBPATH}/oslcomp.lib ${BF_OSL_LIBPATH}/oslexec.lib ${BF_OSL_LIBPATH}/oslquery.lib '
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
BF_LLVM = LIBDIR + '/llvm'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMObject LLVMRuntimeDyld LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
BF_OIIO = '${LIBDIR}/openimageio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib'
|
||||
WITH_BF_STATICOIIO = True
|
||||
|
||||
WITH_BF_OCIO = True
|
||||
BF_OCIO = '${LIBDIR}/opencolorio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/OpenColorIO.lib'
|
||||
WITH_BF_STATICOCIO = True
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = '${LIBDIR}/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
BF_OPENGL_LIB = 'opengl32 glu32'
|
||||
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
|
||||
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
|
||||
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
|
||||
|
||||
CC = 'cl.exe'
|
||||
CXX = 'cl.exe'
|
||||
|
||||
CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4127', '/wd4181', '/wd4200', '/wd4244', '/wd4267', '/wd4305', '/wd4800', '/we4013', '/we4431']
|
||||
CXXFLAGS = ['/EHsc']
|
||||
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
|
||||
|
||||
if VC_VERSION == '12.0':
|
||||
CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
|
||||
|
||||
BF_DEBUG_CCFLAGS = ['/Zi', '/Ob0', '/Od', '/FR${TARGET}.sbr']
|
||||
|
||||
CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2', '/Ob2']
|
||||
|
||||
C_WARN = []
|
||||
CC_WARN = []
|
||||
CXX_WARN = []
|
||||
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'Dbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('imm32')
|
||||
|
||||
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
|
||||
|
||||
# # Todo
|
||||
# BF_PROFILE_CCFLAGS = ['-pg', '-g ']
|
||||
# BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
# BF_PROFILE = False
|
||||
|
||||
BF_BSC=False
|
||||
|
||||
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
||||
BF_BUILDDIR = '..\\build\\win32-vc'
|
||||
BF_INSTALLDIR='..\\install\\win32-vc'
|
@@ -1,216 +0,0 @@
|
||||
LCGDIR = '#../lib/mingw64'
|
||||
LIBDIR = "${LCGDIR}"
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
|
||||
BF_PYTHON_DLL = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'wrap_oal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG_LIB = 'avformat.dll avcodec.dll avdevice.dll avutil.dll swscale.dll swresample.dll'
|
||||
BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
|
||||
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll ${BF_FFMPEG_LIBPATH}/xvidcore.dll'
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = LIBDIR + '/jack'
|
||||
BF_JACK_INC = '${BF_JACK}/include'
|
||||
BF_JACK_LIB = 'libjack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = False
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'libsndfile-1'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
BF_PTHREADS = '' # Part of MinGW-w64
|
||||
BF_PTHREADS_INC = ''
|
||||
BF_PTHREADS_LIB = ''
|
||||
BF_PTHREADS_LIBPATH = ''
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = LIBDIR + '/zlib'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'fftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_LIBMV = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
BF_WINTAB = LIBDIR + '/wintab'
|
||||
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
# enable freetype2 support for text objects
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2/'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE_INC = '#extern'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = 'C:\\MingW'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
BF_OPENGL_LIB = 'opengl32 glu32'
|
||||
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
|
||||
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
|
||||
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
|
||||
|
||||
WITH_BF_COLLADA = True
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
|
||||
#Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
|
||||
|
||||
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_OCIO = True
|
||||
BF_OCIO = LIBDIR + '/opencolorio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB = 'OpenColorIO'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = LIBDIR + '/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'boost_date_time-mgw47-mt-s-1_49 boost_date_time-mgw47-mt-sd-1_49 boost_filesystem-mgw47-mt-s-1_49 boost_filesystem-mgw47-mt-sd-1_49 boost_regex-mgw47-mt-s-1_49 boost_regex-mgw47-mt-sd-1_49 boost_system-mgw47-mt-s-1_49 boost_system-mgw47-mt-sd-1_49 boost_thread-mgw47-mt-s-1_49 boost_thread-mgw47-mt-sd-1_49'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' boost_locale-mgw47-mt-s-1_49 boost_locale-mgw47-mt-sd-1_49'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
##
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
|
||||
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||
CXXFLAGS = [ '-fpermissive' ]
|
||||
|
||||
CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2', '-ftree-vectorize']
|
||||
|
||||
# NOTE: C_WARN seems to get ignored - at least -Wno-char-subscripts doesn't work!
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
|
||||
CC_WARN = [ '-Wall', '-Wno-char-subscripts' ]
|
||||
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread', '-ldbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('-limm32')
|
||||
|
||||
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
|
||||
|
||||
## DISABLED, causes linking errors!
|
||||
## for re-distribution, so users dont need mingw installed
|
||||
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS= ['-g']
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_BUILDDIR = '..\\build\\win64-mingw'
|
||||
BF_INSTALLDIR='..\\install\\win64-mingw'
|
@@ -1,256 +0,0 @@
|
||||
import subprocess
|
||||
|
||||
CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
CL_STDOUT, CL_STDERR = CL_OUT.communicate()
|
||||
|
||||
if "18.00." in CL_STDERR:
|
||||
VC_VERSION = '12.0'
|
||||
LCGDIR = '#../lib/win64_vc12'
|
||||
else:
|
||||
import sys
|
||||
print("Visual C version not supported {}\n".format(CL_STDERR))
|
||||
sys.exit(1)
|
||||
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = LIBDIR +'/ffmpeg'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc '
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include '
|
||||
BF_OPENAL_LIB = 'OpenAL32'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = True
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'libsndfile-1'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = LIBDIR + '/iconv'
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL2.lib'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_JACK = False
|
||||
|
||||
BF_PTHREADS = LIBDIR + '/pthreads'
|
||||
BF_PTHREADS_INC = '${BF_PTHREADS}/include'
|
||||
BF_PTHREADS_LIB = 'pthreadVC2'
|
||||
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
|
||||
BF_OPENEXR_LIB = ' Iex-2_2 Half IlmImf-2_2 Imath-2_2 IlmThread-2_2 '
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'libjpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'libpng'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'libtiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = LIBDIR + '/zlib'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'libz_st'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
WITH_BF_ELTOPO = False
|
||||
BF_LAPACK = LIBDIR + '/lapack'
|
||||
BF_LAPACK_LIB = 'libf2c clapack_nowrap BLAS_nowrap'
|
||||
BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
|
||||
|
||||
BF_WINTAB = LIBDIR + '/wintab'
|
||||
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
WITH_BF_BINRELOC = False
|
||||
|
||||
BF_WITH_FREETYPE = True
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype2ST'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = False
|
||||
BF_QUICKTIME = LIBDIR + '/QTDevWin'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
|
||||
BF_QUICKTIME_LIB = 'qtmlClient'
|
||||
BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'libfftw'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE_INC = '#extern'
|
||||
|
||||
WITH_BF_COLLADA = True
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_3DMOUSE = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
WITH_BF_STATICOSL = True
|
||||
BF_OSL = '${LIBDIR}/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_LIB_STATIC = '${BF_OSL_LIBPATH}/oslcomp.lib ${BF_OSL_LIBPATH}/oslexec.lib ${BF_OSL_LIBPATH}/oslquery.lib '
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
BF_LLVM = LIBDIR + '/llvm'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMObject LLVMRuntimeDyld LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
BF_OIIO = '${LIBDIR}/openimageio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib ${BF_OIIO_LIBPATH}/OpenImageIO_Util.lib'
|
||||
WITH_BF_STATICOIIO = True
|
||||
|
||||
WITH_BF_OCIO = True
|
||||
BF_OCIO = '${LIBDIR}/opencolorio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/OpenColorIO.lib'
|
||||
WITH_BF_STATICOCIO = True
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = '${LIBDIR}/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
# No need to manually specify SSE/SSE2 on x64 systems.
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['']
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
BF_OPENGL_LIB = 'opengl32 glu32'
|
||||
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
|
||||
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
|
||||
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
|
||||
CC = 'cl.exe'
|
||||
CXX = 'cl.exe'
|
||||
|
||||
CFLAGS = []
|
||||
CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4127', '/wd4181', '/wd4200', '/wd4244', '/wd4267', '/wd4305', '/wd4800', '/we4013', '/we4431']
|
||||
|
||||
# We want to support Vista level ABI for x64
|
||||
if VC_VERSION == '12.0':
|
||||
CCFLAGS.append('/D_WIN32_WINNT=0x600')
|
||||
CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
|
||||
|
||||
CXXFLAGS = ['/EHsc']
|
||||
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast']
|
||||
|
||||
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od', '/Ob0']
|
||||
|
||||
CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2', '/Ob2']
|
||||
|
||||
C_WARN = []
|
||||
CC_WARN = []
|
||||
CXX_WARN = []
|
||||
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'Dbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('imm32')
|
||||
|
||||
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
|
||||
|
||||
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
||||
BF_BUILDDIR = '..\\build\\win64-vc'
|
||||
BF_INSTALLDIR='..\\install\\win64-vc'
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user