Compare commits
20 Commits
render-lay
...
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"
|
||||
}
|
41
.gitignore
vendored
41
.gitignore
vendored
@@ -1,41 +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
|
||||
/BUILD_NOTES.txt
|
||||
|
||||
# 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/
|
||||
/doc/python_api/rst/bmesh.ops.rst
|
||||
/doc/python_api/rst/in_menu.png
|
||||
/doc/python_api/rst/menu_id.png
|
||||
/doc/python_api/rst/op_prop.png
|
||||
/doc/python_api/rst/run_script.png
|
||||
/doc/python_api/rst/spacebar.png
|
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 "source/tools"]
|
||||
path = source/tools
|
||||
url = ../blender-dev-tools.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)
|
2132
CMakeLists.txt
2132
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
|
||||
|
447
GNUmakefile
447
GNUmakefile
@@ -1,447 +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
|
||||
|
||||
# Allow to use alternative binary (pypy3, etc)
|
||||
ifndef PYTHON
|
||||
PYTHON:=python3
|
||||
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
|
||||
ifndef NPROCS
|
||||
NPROCS:=1
|
||||
ifeq ($(OS), Linux)
|
||||
NPROCS:=$(shell nproc)
|
||||
endif
|
||||
ifeq ($(OS), Darwin)
|
||||
NPROCS:=$(shell sysctl -n hw.ncpu)
|
||||
endif
|
||||
ifeq ($(OS), FreeBSD)
|
||||
NPROCS:=$(shell sysctl -n hw.ncpu)
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
NPROCS:=$(shell sysctl -n hw.ncpu)
|
||||
endif
|
||||
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 in \"$(BUILD_DIR)\" ...
|
||||
|
||||
# # 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 successfully built, 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,"
|
||||
@echo " operator execution and that python modules load"
|
||||
@echo " * test_cmake - runs our own cmake file checker"
|
||||
@echo " which detects errors in the cmake file list definitions"
|
||||
@echo " * test_pep8 - checks all python script are pep8"
|
||||
@echo " 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:"
|
||||
@echo " 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:"
|
||||
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo " * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide:"
|
||||
@echo " 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 "Environment Variables"
|
||||
@echo " * BUILD_CMAKE_ARGS - arguments passed to CMake."
|
||||
@echo " * BUILD_DIR - override default build path."
|
||||
@echo " * PYTHON - use this for the Python command (used for checking tools)."
|
||||
@echo " * NPROCS - number of processes to use building (auto-detect when omitted)."
|
||||
@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"
|
||||
@echo ""
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 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
|
||||
$(PYTHON) tests/python/pep8.py > test_pep8.log 2>&1
|
||||
@echo "written: test_pep8.log"
|
||||
|
||||
# run some checks on our cmakefiles.
|
||||
test_cmake: .FORCE
|
||||
$(PYTHON) 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
|
||||
$(PYTHON) tests/check_deprecated.py
|
||||
|
||||
test_style_c: .FORCE
|
||||
# run our own checks on C/C++ style
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(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 $(PYTHON) \
|
||||
"$(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 $(PYTHON) \
|
||||
"$(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 $(PYTHON) \
|
||||
"$(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
|
||||
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
|
||||
|
||||
project_netbeans: .FORCE
|
||||
$(PYTHON) 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)" ; \
|
||||
$(PYTHON) "$(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)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
|
||||
|
||||
check_splint: .FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
|
||||
|
||||
check_sparse: .FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
|
||||
|
||||
check_smatch: .FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
|
||||
|
||||
check_spelling_py: .FORCE
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/release/scripts"
|
||||
|
||||
check_spelling_c: .FORCE
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(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 $(PYTHON) \
|
||||
"$(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 $(PYTHON) \
|
||||
"$(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
|
||||
$(PYTHON) doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
|
||||
|
||||
help_features: .FORCE
|
||||
@$(PYTHON) -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
|
630
SConstruct
Normal file
630
SConstruct
Normal file
@@ -0,0 +1,630 @@
|
||||
#!/usr/bin/env python
|
||||
# $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): Nathan Letwory.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
#
|
||||
# Main entry-point for the SCons building system
|
||||
# Set up some custom actions and target/argument handling
|
||||
# Then read all SConscripts and build
|
||||
|
||||
import sys
|
||||
import os
|
||||
import os.path
|
||||
import string
|
||||
import shutil
|
||||
import glob
|
||||
import re
|
||||
from tempfile import mkdtemp
|
||||
|
||||
import tools.Blender
|
||||
import tools.btools
|
||||
import tools.bcolors
|
||||
|
||||
EnsureSConsVersion(1,0,0)
|
||||
|
||||
BlenderEnvironment = tools.Blender.BlenderEnvironment
|
||||
btools = tools.btools
|
||||
B = tools.Blender
|
||||
|
||||
### globals ###
|
||||
platform = sys.platform
|
||||
quickie = None
|
||||
quickdebug = None
|
||||
nsis_build = None
|
||||
|
||||
##### BEGIN SETUP #####
|
||||
|
||||
B.possible_types = ['core', 'common', 'blender', 'intern',
|
||||
'international', 'game', 'game2',
|
||||
'player', 'player2', 'system']
|
||||
|
||||
B.binarykind = ['blender' , 'blenderplayer']
|
||||
##################################
|
||||
# target and argument validation #
|
||||
##################################
|
||||
# XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
|
||||
use_color = ARGUMENTS.get('BF_FANCY', '1')
|
||||
if platform=='win32':
|
||||
use_color = None
|
||||
|
||||
if not use_color=='1':
|
||||
B.bc.disable()
|
||||
|
||||
#on defaut white Os X terminal, some colors are totally unlegible
|
||||
if platform=='darwin':
|
||||
B.bc.OKGREEN = '\033[34m'
|
||||
B.bc.WARNING = '\033[36m'
|
||||
|
||||
# arguments
|
||||
print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
|
||||
B.arguments = btools.validate_arguments(ARGUMENTS, B.bc)
|
||||
btools.print_arguments(B.arguments, B.bc)
|
||||
|
||||
# targets
|
||||
print B.bc.HEADER+'Command-line targets'+B.bc.ENDC
|
||||
B.targets = btools.validate_targets(COMMAND_LINE_TARGETS, B.bc)
|
||||
btools.print_targets(B.targets, B.bc)
|
||||
|
||||
##########################
|
||||
# setting up environment #
|
||||
##########################
|
||||
|
||||
# handling cmd line arguments & config file
|
||||
|
||||
# first check cmdline for toolset and we create env to work on
|
||||
quickie = B.arguments.get('BF_QUICK', None)
|
||||
quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
|
||||
|
||||
if quickdebug:
|
||||
B.quickdebug=string.split(quickdebug, ',')
|
||||
else:
|
||||
B.quickdebug=[]
|
||||
|
||||
if quickie:
|
||||
B.quickie=string.split(quickie,',')
|
||||
else:
|
||||
B.quickie=[]
|
||||
|
||||
toolset = B.arguments.get('BF_TOOLSET', None)
|
||||
if toolset:
|
||||
print "Using " + toolset
|
||||
if toolset=='mstoolkit':
|
||||
env = BlenderEnvironment(ENV = os.environ)
|
||||
env.Tool('mstoolkit', ['tools'])
|
||||
else:
|
||||
env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
|
||||
# xxx commented out, as was supressing warnings under mingw..
|
||||
#if env:
|
||||
# btools.SetupSpawn(env)
|
||||
else:
|
||||
env = BlenderEnvironment(ENV = os.environ)
|
||||
|
||||
if not env:
|
||||
print "Could not create a build environment"
|
||||
Exit()
|
||||
|
||||
|
||||
cc = B.arguments.get('CC', None)
|
||||
cxx = B.arguments.get('CXX', None)
|
||||
if cc:
|
||||
env['CC'] = cc
|
||||
if cxx:
|
||||
env['CXX'] = cxx
|
||||
|
||||
if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32':
|
||||
platform = 'win32-vc'
|
||||
elif env['CC'] in ['gcc'] and sys.platform=='win32':
|
||||
platform = 'win32-mingw'
|
||||
|
||||
env.SConscriptChdir(0)
|
||||
|
||||
crossbuild = B.arguments.get('BF_CROSS', None)
|
||||
if crossbuild and platform!='win32':
|
||||
platform = 'linuxcross'
|
||||
|
||||
env['OURPLATFORM'] = platform
|
||||
|
||||
configfile = 'config'+os.sep+platform+'-config.py'
|
||||
|
||||
if os.path.exists(configfile):
|
||||
print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
|
||||
else:
|
||||
print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
|
||||
|
||||
if crossbuild and env['PLATFORM'] != 'win32':
|
||||
print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
|
||||
env.Tool('crossmingw', ['tools'])
|
||||
# todo: determine proper libs/includes etc.
|
||||
# Needed for gui programs, console programs should do without it
|
||||
env.Append(LINKFLAGS=['-mwindows'])
|
||||
|
||||
userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
|
||||
# first read platform config. B.arguments will override
|
||||
optfiles = [configfile]
|
||||
if os.path.exists(userconfig):
|
||||
print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
|
||||
optfiles += [userconfig]
|
||||
else:
|
||||
print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
|
||||
|
||||
opts = btools.read_opts(optfiles, B.arguments)
|
||||
opts.Update(env)
|
||||
|
||||
if not env['BF_FANCY']:
|
||||
B.bc.disable()
|
||||
|
||||
SetOption('num_jobs', int(env['BF_NUMJOBS']))
|
||||
print "Build with %d parallel jobs" % (GetOption('num_jobs'))
|
||||
|
||||
# disable elbeem (fluidsim) compilation?
|
||||
if env['BF_NO_ELBEEM'] == 1:
|
||||
env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
|
||||
env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
|
||||
env['CCFLAGS'].append('-DDISABLE_ELBEEM')
|
||||
|
||||
if env['WITH_BF_OPENMP'] == 1:
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
env['CCFLAGS'].append('/openmp')
|
||||
env['CPPFLAGS'].append('/openmp')
|
||||
env['CXXFLAGS'].append('/openmp')
|
||||
else:
|
||||
if env['CC'][-3:] == 'icc': # to be able to handle CC=/opt/bla/icc case
|
||||
env.Append(LINKFLAGS=['-openmp', '-static-intel'])
|
||||
env['CCFLAGS'].append('-openmp')
|
||||
env['CPPFLAGS'].append('-openmp')
|
||||
env['CXXFLAGS'].append('-openmp')
|
||||
else:
|
||||
env.Append(CCFLAGS=['-fopenmp'])
|
||||
env.Append(CPPFLAGS=['-fopenmp'])
|
||||
env.Append(CXXFLAGS=['-fopenmp'])
|
||||
# env.Append(LINKFLAGS=['-fprofile-generate'])
|
||||
|
||||
#check for additional debug libnames
|
||||
|
||||
if env.has_key('BF_DEBUG_LIBS'):
|
||||
B.quickdebug += env['BF_DEBUG_LIBS']
|
||||
|
||||
printdebug = B.arguments.get('BF_LISTDEBUG', 0)
|
||||
|
||||
# see if this linux distro has libalut
|
||||
|
||||
if env['OURPLATFORM'] == 'linux2' :
|
||||
if env['WITH_BF_OPENAL']:
|
||||
mylib_test_source_file = """
|
||||
#include "AL/alut.h"
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
alutGetMajorVersion();
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
|
||||
def CheckFreeAlut(context,env):
|
||||
context.Message( B.bc.OKGREEN + "Linux platform detected:\n checking for FreeAlut... " + B.bc.ENDC )
|
||||
env['LIBS'] = 'alut'
|
||||
result = context.TryLink(mylib_test_source_file, '.c')
|
||||
context.Result(result)
|
||||
return result
|
||||
|
||||
env2 = env.Clone( LIBPATH = env['BF_OPENAL'] )
|
||||
sconf_temp = mkdtemp()
|
||||
conf = Configure( env2, {'CheckFreeAlut' : CheckFreeAlut}, sconf_temp, '/dev/null' )
|
||||
if conf.CheckFreeAlut( env2 ):
|
||||
env['BF_OPENAL_LIB'] += ' alut'
|
||||
del env2
|
||||
root = ''
|
||||
for root, dirs, files in os.walk(sconf_temp, topdown=False):
|
||||
for name in files:
|
||||
os.remove(os.path.join(root, name))
|
||||
for name in dirs:
|
||||
os.rmdir(os.path.join(root, name))
|
||||
if root: os.rmdir(root)
|
||||
|
||||
if len(B.quickdebug) > 0 and printdebug != 0:
|
||||
print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
|
||||
for l in B.quickdebug:
|
||||
print "\t" + l
|
||||
|
||||
# remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS
|
||||
if env['WITH_BF_STATICCXX']:
|
||||
if 'stdc++' in env['LLIBS']:
|
||||
env['LLIBS'].remove('stdc++')
|
||||
else:
|
||||
print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
|
||||
|
||||
# check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
|
||||
if 'blenderplayer' in B.targets:
|
||||
env['WITH_BF_PLAYER'] = True
|
||||
|
||||
if 'blendernogame' in B.targets:
|
||||
env['WITH_BF_GAMEENGINE'] = False
|
||||
|
||||
if 'blenderlite' in B.targets:
|
||||
target_env_defs = {}
|
||||
target_env_defs['WITH_BF_GAMEENGINE'] = False
|
||||
target_env_defs['WITH_BF_PLAYER'] = False
|
||||
target_env_defs['WITH_BF_OPENAL'] = False
|
||||
target_env_defs['WITH_BF_OPENEXR'] = False
|
||||
target_env_defs['WITH_BF_ICONV'] = False
|
||||
target_env_defs['WITH_BF_INTERNATIONAL'] = False
|
||||
target_env_defs['WITH_BF_OPENJPEG'] = False
|
||||
target_env_defs['WITH_BF_FFMPEG'] = False
|
||||
target_env_defs['WITH_BF_QUICKTIME'] = False
|
||||
target_env_defs['WITH_BF_YAFRAY'] = False
|
||||
target_env_defs['WITH_BF_REDCODE'] = False
|
||||
target_env_defs['WITH_BF_FTGL'] = False
|
||||
target_env_defs['WITH_BF_DDS'] = False
|
||||
target_env_defs['WITH_BF_ZLIB'] = False
|
||||
target_env_defs['WITH_BF_SDL'] = False
|
||||
target_env_defs['WITH_BF_JPEG'] = False
|
||||
target_env_defs['WITH_BF_PNG'] = False
|
||||
target_env_defs['WITH_BF_ODE'] = False
|
||||
target_env_defs['WITH_BF_BULLET'] = False
|
||||
target_env_defs['WITH_BF_SOLID'] = False
|
||||
target_env_defs['WITH_BF_BINRELOC'] = False
|
||||
target_env_defs['BF_BUILDINFO'] = False
|
||||
target_env_defs['BF_NO_ELBEEM'] = True
|
||||
target_env_defs['WITH_BF_PYTHON'] = False
|
||||
|
||||
# Merge blenderlite, let command line to override
|
||||
for k,v in target_env_defs.iteritems():
|
||||
if k not in B.arguments:
|
||||
env[k] = v
|
||||
|
||||
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
|
||||
#B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep)
|
||||
B.root_build_dir = env['BF_BUILDDIR']
|
||||
B.doc_build_dir = env['BF_DOCDIR']
|
||||
if not B.root_build_dir[-1]==os.sep:
|
||||
B.root_build_dir += os.sep
|
||||
if not B.doc_build_dir[-1]==os.sep:
|
||||
B.doc_build_dir += os.sep
|
||||
|
||||
# We do a shortcut for clean when no quicklist is given: just delete
|
||||
# builddir without reading in SConscripts
|
||||
do_clean = None
|
||||
if 'clean' in B.targets:
|
||||
do_clean = True
|
||||
|
||||
if not quickie and do_clean:
|
||||
if os.path.exists(B.doc_build_dir):
|
||||
print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC
|
||||
dirs = os.listdir(B.doc_build_dir)
|
||||
for entry in dirs:
|
||||
if os.path.isdir(B.doc_build_dir + entry) == 1:
|
||||
print "clean dir %s"%(B.doc_build_dir+entry)
|
||||
shutil.rmtree(B.doc_build_dir+entry)
|
||||
else: # remove file
|
||||
print "remove file %s"%(B.doc_build_dir+entry)
|
||||
os.remove(B.root_build_dir+entry)
|
||||
if os.path.exists(B.root_build_dir):
|
||||
print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC
|
||||
dirs = os.listdir(B.root_build_dir)
|
||||
for entry in dirs:
|
||||
if os.path.isdir(B.root_build_dir + entry) == 1:
|
||||
print "clean dir %s"%(B.root_build_dir+entry)
|
||||
shutil.rmtree(B.root_build_dir+entry)
|
||||
else: # remove file
|
||||
print "remove file %s"%(B.root_build_dir+entry)
|
||||
os.remove(B.root_build_dir+entry)
|
||||
for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
|
||||
'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']:
|
||||
if os.path.exists(confile):
|
||||
print "clean file %s"%confile
|
||||
if os.path.isdir(confile):
|
||||
for root, dirs, files in os.walk(confile):
|
||||
for name in files:
|
||||
os.remove(os.path.join(root, name))
|
||||
else:
|
||||
os.remove(confile)
|
||||
print B.bc.OKGREEN+'...done'+B.bc.ENDC
|
||||
else:
|
||||
print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
|
||||
Exit()
|
||||
|
||||
if not os.path.isdir ( B.root_build_dir):
|
||||
os.makedirs ( B.root_build_dir )
|
||||
os.makedirs ( B.root_build_dir + 'source' )
|
||||
os.makedirs ( B.root_build_dir + 'intern' )
|
||||
os.makedirs ( B.root_build_dir + 'extern' )
|
||||
os.makedirs ( B.root_build_dir + 'lib' )
|
||||
os.makedirs ( B.root_build_dir + 'bin' )
|
||||
if not os.path.isdir(B.doc_build_dir):
|
||||
os.makedirs ( B.doc_build_dir )
|
||||
|
||||
Help(opts.GenerateHelpText(env))
|
||||
|
||||
# default is new quieter output, but if you need to see the
|
||||
# commands, do 'scons BF_QUIET=0'
|
||||
bf_quietoutput = B.arguments.get('BF_QUIET', '1')
|
||||
if env['BF_QUIET']:
|
||||
B.set_quiet_output(env)
|
||||
else:
|
||||
if toolset=='msvc':
|
||||
B.msvc_hack(env)
|
||||
|
||||
print B.bc.HEADER+'Building in '+B.bc.ENDC+B.root_build_dir
|
||||
env.SConsignFile(B.root_build_dir+'scons-signatures')
|
||||
B.init_lib_dict()
|
||||
|
||||
##### END SETUP ##########
|
||||
|
||||
Export('env')
|
||||
|
||||
BuildDir(B.root_build_dir+'/intern', 'intern', duplicate=0)
|
||||
SConscript(B.root_build_dir+'/intern/SConscript')
|
||||
BuildDir(B.root_build_dir+'/extern', 'extern', duplicate=0)
|
||||
SConscript(B.root_build_dir+'/extern/SConscript')
|
||||
BuildDir(B.root_build_dir+'/source', 'source', duplicate=0)
|
||||
SConscript(B.root_build_dir+'/source/SConscript')
|
||||
|
||||
# now that we have read all SConscripts, we know what
|
||||
# libraries will be built. Create list of
|
||||
# libraries to give as objects to linking phase
|
||||
mainlist = []
|
||||
for tp in B.possible_types:
|
||||
if not tp == 'player' and not tp == 'player2':
|
||||
mainlist += B.create_blender_liblist(env, tp)
|
||||
|
||||
if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
|
||||
B.propose_priorities()
|
||||
|
||||
dobj = B.buildinfo(env, "dynamic") + B.resources
|
||||
thestatlibs, thelibincs = B.setup_staticlibs(env)
|
||||
thesyslibs = B.setup_syslibs(env)
|
||||
|
||||
if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
|
||||
env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
|
||||
if env['WITH_BF_PLAYER']:
|
||||
playerlist = B.create_blender_liblist(env, 'player')
|
||||
env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
|
||||
|
||||
##### Now define some targets
|
||||
|
||||
|
||||
#------------ INSTALL
|
||||
|
||||
#-- binaries
|
||||
blenderinstall = []
|
||||
if env['OURPLATFORM']=='darwin':
|
||||
for prg in B.program_list:
|
||||
bundle = '%s.app' % prg[0]
|
||||
bundledir = os.path.dirname(bundle)
|
||||
for dp, dn, df in os.walk(bundle):
|
||||
if 'CVS' in dn:
|
||||
dn.remove('CVS')
|
||||
if '.svn' in dn:
|
||||
dn.remove('.svn')
|
||||
dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
|
||||
source=[dp+os.sep+f for f in df]
|
||||
blenderinstall.append(env.Install(dir=dir,source=source))
|
||||
else:
|
||||
blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list)
|
||||
|
||||
#-- .blender
|
||||
#- dont do .blender and scripts for darwin, it is already in the bundle
|
||||
dotblendlist = []
|
||||
dottargetlist = []
|
||||
scriptinstall = []
|
||||
|
||||
if env['OURPLATFORM']!='darwin':
|
||||
for dp, dn, df in os.walk('bin/.blender'):
|
||||
if 'CVS' in dn:
|
||||
dn.remove('CVS')
|
||||
if '.svn' in dn:
|
||||
dn.remove('.svn')
|
||||
|
||||
for f in df:
|
||||
if not env['WITH_BF_INTERNATIONAL']:
|
||||
if 'locale' in dp:
|
||||
continue
|
||||
if f == '.Blanguages':
|
||||
continue
|
||||
if not env['WITH_BF_FREETYPE']:
|
||||
if f.endswith('.ttf'):
|
||||
continue
|
||||
|
||||
dotblendlist.append(os.path.join(dp, f))
|
||||
dottargetlist.append(env['BF_INSTALLDIR']+dp[3:]+os.sep+f)
|
||||
|
||||
dotblenderinstall = []
|
||||
for targetdir,srcfile in zip(dottargetlist, dotblendlist):
|
||||
td, tf = os.path.split(targetdir)
|
||||
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
|
||||
|
||||
if env['WITH_BF_PYTHON']:
|
||||
#-- .blender/scripts
|
||||
scriptpath='release/scripts'
|
||||
for dp, dn, df in os.walk(scriptpath):
|
||||
if 'CVS' in dn:
|
||||
dn.remove('CVS')
|
||||
if '.svn' in dn:
|
||||
dn.remove('.svn')
|
||||
dir=env['BF_INSTALLDIR']+'/.blender/scripts'+dp[len(scriptpath):]
|
||||
source=[dp+os.sep+f for f in df]
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
|
||||
#-- icons
|
||||
if env['OURPLATFORM']=='linux2':
|
||||
iconlist = []
|
||||
icontargetlist = []
|
||||
|
||||
for tp, tn, tf in os.walk('release/freedesktop/icons'):
|
||||
if 'CVS' in tn:
|
||||
tn.remove('CVS')
|
||||
if '.svn' in tn:
|
||||
tn.remove('.svn')
|
||||
for f in tf:
|
||||
iconlist.append(tp+os.sep+f)
|
||||
icontargetlist.append(env['BF_INSTALLDIR']+tp[19:]+os.sep+f)
|
||||
|
||||
iconinstall = []
|
||||
for targetdir,srcfile in zip(icontargetlist, iconlist):
|
||||
td, tf = os.path.split(targetdir)
|
||||
iconinstall.append(env.Install(dir=td, source=srcfile))
|
||||
|
||||
# dlls for linuxcross
|
||||
# TODO - add more libs, for now this lets blenderlite run
|
||||
if env['OURPLATFORM']=='linuxcross':
|
||||
dir=env['BF_INSTALLDIR']
|
||||
source = ['../lib/windows/pthreads/lib/pthreadGC2.dll']
|
||||
scriptinstall.append(env.Install(dir=dir, source=source))
|
||||
|
||||
#-- plugins
|
||||
pluglist = []
|
||||
plugtargetlist = []
|
||||
for tp, tn, tf in os.walk('release/plugins'):
|
||||
if 'CVS' in tn:
|
||||
tn.remove('CVS')
|
||||
if '.svn' in tn:
|
||||
tn.remove('.svn')
|
||||
for f in tf:
|
||||
pluglist.append(tp+os.sep+f)
|
||||
plugtargetlist.append(env['BF_INSTALLDIR']+tp[7:]+os.sep+f)
|
||||
|
||||
# header files for plugins
|
||||
pluglist.append('source/blender/blenpluginapi/documentation.h')
|
||||
plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'documentation.h')
|
||||
pluglist.append('source/blender/blenpluginapi/externdef.h')
|
||||
plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'externdef.h')
|
||||
pluglist.append('source/blender/blenpluginapi/floatpatch.h')
|
||||
plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'floatpatch.h')
|
||||
pluglist.append('source/blender/blenpluginapi/iff.h')
|
||||
plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'iff.h')
|
||||
pluglist.append('source/blender/blenpluginapi/plugin.h')
|
||||
plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'plugin.h')
|
||||
pluglist.append('source/blender/blenpluginapi/util.h')
|
||||
plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'util.h')
|
||||
pluglist.append('source/blender/blenpluginapi/plugin.DEF')
|
||||
plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep + 'plugin.def')
|
||||
|
||||
plugininstall = []
|
||||
for targetdir,srcfile in zip(plugtargetlist, pluglist):
|
||||
td, tf = os.path.split(targetdir)
|
||||
plugininstall.append(env.Install(dir=td, source=srcfile))
|
||||
|
||||
textlist = []
|
||||
texttargetlist = []
|
||||
for tp, tn, tf in os.walk('release/text'):
|
||||
if 'CVS' in tn:
|
||||
tn.remove('CVS')
|
||||
if '.svn' in tn:
|
||||
tn.remove('.svn')
|
||||
for f in tf:
|
||||
textlist.append(tp+os.sep+f)
|
||||
|
||||
textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
|
||||
|
||||
if env['OURPLATFORM']=='darwin':
|
||||
allinstall = [blenderinstall, plugininstall, textinstall]
|
||||
elif env['OURPLATFORM']=='linux2':
|
||||
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall]
|
||||
else:
|
||||
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
|
||||
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
|
||||
dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll',
|
||||
'${BF_PNG_LIBPATH}/libpng.dll',
|
||||
'${BF_ZLIB_LIBPATH}/zlib.dll',
|
||||
'${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
|
||||
dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
|
||||
if env['WITH_BF_SDL']:
|
||||
dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
|
||||
if env['WITH_BF_PYTHON']:
|
||||
ver = env["BF_PYTHON_VERSION"].replace(".", "")
|
||||
|
||||
dllsources.append('${LCGDIR}/release/python' + ver + '.zip')
|
||||
dllsources.append('${LCGDIR}/release/zlib.pyd')
|
||||
if env['BF_DEBUG']:
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_LIB}_d.dll')
|
||||
else:
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_LIB}.dll')
|
||||
if env['WITH_BF_ICONV']:
|
||||
dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
|
||||
if env['WITH_BF_OPENAL']:
|
||||
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
|
||||
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
|
||||
if env['WITH_BF_FFMPEG']:
|
||||
dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-52.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/avformat-52.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/avutil-50.dll',
|
||||
# '${LCGDIR}/ffmpeg/lib/libfaad-2.dll',
|
||||
# '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
|
||||
# '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
|
||||
# '${LCGDIR}/ffmpeg/lib/libx264-67.dll',
|
||||
# '${LCGDIR}/ffmpeg/lib/xvidcore.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/swscale-0.dll']
|
||||
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
|
||||
allinstall += windlls
|
||||
|
||||
installtarget = env.Alias('install', allinstall)
|
||||
bininstalltarget = env.Alias('install-bin', blenderinstall)
|
||||
|
||||
nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print)
|
||||
nsiscmd = env.Command('nsisinstaller', None, nsisaction)
|
||||
nsisalias = env.Alias('nsis', nsiscmd)
|
||||
|
||||
if 'blender' in B.targets:
|
||||
blenderexe= env.Alias('blender', B.program_list)
|
||||
Depends(blenderexe,installtarget)
|
||||
|
||||
if env['WITH_BF_PLAYER']:
|
||||
blenderplayer = env.Alias('blenderplayer', B.program_list)
|
||||
Depends(blenderplayer,installtarget)
|
||||
|
||||
if not env['WITH_BF_GAMEENGINE']:
|
||||
blendernogame = env.Alias('blendernogame', B.program_list)
|
||||
Depends(blendernogame,installtarget)
|
||||
|
||||
if 'blenderlite' in B.targets:
|
||||
blenderlite = env.Alias('blenderlite', B.program_list)
|
||||
Depends(blenderlite,installtarget)
|
||||
|
||||
Depends(nsiscmd, allinstall)
|
||||
|
||||
Default(B.program_list)
|
||||
|
||||
if not env['WITHOUT_BF_INSTALL']:
|
||||
Default(installtarget)
|
||||
|
||||
#------------ RELEASE
|
||||
# TODO: zipup the installation
|
||||
|
||||
#------------ BLENDERPLAYER
|
||||
# TODO: build stubs and link into blenderplayer
|
||||
|
||||
#------------ EPYDOC
|
||||
if env['WITH_BF_DOCS']:
|
||||
try: import epydoc
|
||||
except: epydoc = None
|
||||
|
||||
if epydoc:
|
||||
SConscript('source/blender/python/api2_2x/doc/SConscript')
|
||||
SConscript('source/gameengine/PyDoc/SConscript')
|
||||
else:
|
||||
print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "
|
||||
|
||||
|
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
@@ -1,11 +0,0 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -14,7 +14,7 @@
|
||||
set(LLVM_VERSION_MINOR 4)
|
||||
|
||||
if (NOT PACKAGE_VERSION)
|
||||
- set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}svn")
|
||||
+ set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
|
||||
endif()
|
||||
|
||||
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
|
@@ -1,12 +0,0 @@
|
||||
--- a/src/shaders/CMakeLists.txt
|
||||
+++ b/src/shaders/CMakeLists.txt
|
||||
@@ -27,7 +27,7 @@ macro (osl_compile oslsrc objlist headers)
|
||||
message (STATUS "cmd: ${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc ${oslsrc}")
|
||||
endif ()
|
||||
add_custom_command (OUTPUT ${osofile}
|
||||
- COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc" ${oslsrc}
|
||||
+ COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc" "-o" ${osofile} ${oslsrc}
|
||||
MAIN_DEPENDENCY ${oslsrc}
|
||||
DEPENDS ${${headers}} ${oslsrc} "${CMAKE_CURRENT_BINARY_DIR}/stdosl.h" "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
@@ -1,143 +0,0 @@
|
||||
# ######## Global feature set settings ########
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_full.cmake")
|
||||
|
||||
# Detect which libc we'll be linking against.
|
||||
# Some of the paths will depend on this
|
||||
|
||||
if (EXISTS "/lib/x86_64-linux-gnu/libc-2.19.so")
|
||||
message(STATUS "Building in GLibc-2.19 environment")
|
||||
set(GLIBC "2.19")
|
||||
set(MULTILIB "/x86_64-linux-gnu")
|
||||
elseif (EXISTS "/lib/i386-linux-gnu//libc-2.19.so")
|
||||
message(STATUS "Building in GLibc-2.19 environment")
|
||||
set(GLIBC "2.19")
|
||||
set(MULTILIB "/i386-linux-gnu")
|
||||
elseif (EXISTS "/lib/libc-2.11.3.so")
|
||||
message(STATUS "Building in GLibc-2.11 environment")
|
||||
set(GLIBC "2.11")
|
||||
set(MULTILIB "")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown build environment")
|
||||
endif()
|
||||
|
||||
# Default to only build Blender, not the player
|
||||
set(WITH_BLENDER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PLAYER OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# ######## Linux-specific build options ########
|
||||
# Options which are specific to Linux-only platforms
|
||||
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# ######## Official release-specific build options ########
|
||||
# Options which are specific to Linux release builds only
|
||||
set(WITH_JACK_DYNLOAD ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL_DYNLOAD ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SYSTEM_GLEW OFF CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_OPENMP_STATIC ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_PYTHON_INSTALL_NUMPY ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL_REQUESTS ON CACHE BOOL "" FORCE)
|
||||
|
||||
# ######## Release environment specific settings ########
|
||||
# All the hardcoded libraru paths and such
|
||||
|
||||
# LLVM libraries
|
||||
set(LLVM_VERSION "3.4" CACHE STRING "" FORCE)
|
||||
set(LLVM_ROOT_DIR "/opt/lib/llvm-${LLVM_VERSION}" CACHE STRING "" FORCE)
|
||||
set(LLVM_STATIC ON CACHE BOOL "" FORCE)
|
||||
|
||||
# BOOST libraries
|
||||
set(BOOST_ROOT "/opt/lib/boost" CACHE STRING "" FORCE)
|
||||
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "" FORCE)
|
||||
|
||||
# FFmpeg libraries
|
||||
set(FFMPEG "/opt/lib/ffmpeg" CACHE STRING "" FORCE)
|
||||
set(FFMPEG_LIBRARIES
|
||||
avdevice avformat avcodec avutil avfilter swscale swresample
|
||||
/usr/lib${MULTILIB}/libxvidcore.a
|
||||
/usr/lib${MULTILIB}/libx264.a
|
||||
/usr/lib${MULTILIB}/libmp3lame.a
|
||||
/usr/lib${MULTILIB}/libvpx.a
|
||||
/usr/lib${MULTILIB}/libvorbis.a
|
||||
/usr/lib${MULTILIB}/libogg.a
|
||||
/usr/lib${MULTILIB}/libvorbisenc.a
|
||||
/usr/lib${MULTILIB}/libtheora.a
|
||||
/usr/lib${MULTILIB}/libschroedinger-1.0.a
|
||||
/usr/lib${MULTILIB}/liborc-0.4.a
|
||||
CACHE STRING "" FORCE
|
||||
)
|
||||
|
||||
# SndFile libraries
|
||||
set(SNDFILE_LIBRARY "/usr/lib/libsndfile.a;/usr/lib/libFLAC.a" CACHE STRING "" FORCE)
|
||||
|
||||
# OpenAL libraries
|
||||
set(OPENAL_ROOT_DIR "/opt/lib/openal" CACHE STRING "" FORCE)
|
||||
set(OPENAL_INCLUDE_DIR "${OPENAL_ROOT_DIR}/include" CACHE STRING "" FORCE)
|
||||
set(OPENAL_LIBRARY
|
||||
${OPENAL_ROOT_DIR}/lib/libopenal.a
|
||||
${OPENAL_ROOT_DIR}/lib/libcommon.a
|
||||
CACHE STRING "" FORCE
|
||||
)
|
||||
|
||||
# OpenCollada libraries
|
||||
set(OPENCOLLADA_UTF_LIBRARY "" CACHE STRING "" FORCE)
|
||||
set(PCRE_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
|
||||
set(PCRE_LIBRARY "/usr/lib${MULTILIB}/libpcre.a" CACHE STRING "" FORCE)
|
||||
set(XML2_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
|
||||
set(XML2_LIBRARY "/usr/lib${MULTILIB}/libxml2.a" CACHE STRING "" FORCE)
|
||||
|
||||
# OpenColorIO libraries
|
||||
set(OPENCOLORIO_ROOT_DIR "/opt/lib/ocio" CACHE STRING "" FORCE)
|
||||
set(OPENCOLORIO_OPENCOLORIO_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libOpenColorIO.a" CACHE STRING "" FORCE)
|
||||
set(OPENCOLORIO_TINYXML_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libtinyxml.a" CACHE STRING "" FORCE)
|
||||
set(OPENCOLORIO_YAML-CPP_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libyaml-cpp.a" CACHE STRING "" FORCE)
|
||||
|
||||
# OpenImageIO
|
||||
if(GLIBC EQUAL "2.19")
|
||||
set(OPENIMAGEIO_LIBRARY
|
||||
/opt/lib/oiio/lib/libOpenImageIO.a
|
||||
/opt/lib/oiio/lib/libOpenImageIO_Util.a
|
||||
/usr/lib${MULTILIB}/libwebp.a
|
||||
/usr/lib${MULTILIB}/liblzma.a
|
||||
/usr/lib${MULTILIB}/libjbig.a
|
||||
CACHE STRING "" FORCE
|
||||
)
|
||||
endif()
|
||||
|
||||
# OpenSubdiv libraries
|
||||
set(OPENSUBDIV_ROOT_DIR "/opt/lib/opensubdiv" CACHE STRING "" FORCE)
|
||||
set(OPENSUBDIV_OSDCPU_LIBRARY "${OPENSUBDIV_ROOT_DIR}/lib/libosdCPU.a" CACHE STRING "" FORCE)
|
||||
set(OPENSUBDIV_OSDGPU_LIBRARY "${OPENSUBDIV_ROOT_DIR}/lib/libosdGPU.a" CACHE STRING "" FORCE)
|
||||
|
||||
# OpenEXR libraries
|
||||
set(OPENEXR_ROOT_DIR "/opt/lib/openexr" CACHE STRING "" FORCE)
|
||||
set(OPENEXR_HALF_LIBRARY "/opt/lib/openexr/lib/libHalf.a" CACHE STRING "" FORCE)
|
||||
set(OPENEXR_IEX_LIBRARY "/opt/lib/openexr/lib/libIex.a" CACHE STRING "" FORCE)
|
||||
set(OPENEXR_ILMIMF_LIBRARY "/opt/lib/openexr/lib/libIlmImf.a" CACHE STRING "" FORCE)
|
||||
set(OPENEXR_ILMTHREAD_LIBRARY "/opt/lib/openexr/lib/libIlmThread.a" CACHE STRING "" FORCE)
|
||||
set(OPENEXR_IMATH_LIBRARY "/opt/lib/openexr/lib/libImath.a" CACHE STRING "" FORCE)
|
||||
|
||||
# JeMalloc library
|
||||
set(JEMALLOC_LIBRARY "/opt/lib/jemalloc/lib/libjemalloc.a" CACHE STRING "" FORCE)
|
||||
|
||||
# Space navigation
|
||||
set(SPACENAV_ROOT_DIR "/opt/lib/libspnav" CACHE STRING "" FORCE)
|
||||
|
||||
# Force some system libraries to be static
|
||||
set(FFTW3_LIBRARY "/usr/lib${MULTILIB}/libfftw3.a" CACHE STRING "" FORCE)
|
||||
set(JPEG_LIBRARY "/usr/lib${MULTILIB}/libjpeg.a" CACHE STRING "" FORCE)
|
||||
set(PNG_LIBRARY "/usr/lib${MULTILIB}/libpng.a" CACHE STRING "" FORCE)
|
||||
set(TIFF_LIBRARY "/usr/lib${MULTILIB}/libtiff.a" CACHE STRING "" FORCE)
|
||||
set(ZLIB_LIBRARY "/usr/lib${MULTILIB}/libz.a" CACHE STRING "" FORCE)
|
||||
|
||||
# OpenVDB
|
||||
set(OPENVDB_LIBRARY
|
||||
/opt/lib/openvdb/lib/libopenvdb.a
|
||||
/opt/lib/blosc/lib/libblosc.a
|
||||
CACHE BOOL "" FORCE
|
||||
)
|
||||
|
||||
# Additional linking libraries
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-lrt -static-libstdc++" CACHE STRING "" FORCE)
|
@@ -1,12 +0,0 @@
|
||||
# This is applied as an ovveride on top of blender_linux.config
|
||||
# Disables all the areas which are not needed for the player.
|
||||
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_BLENDER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
|
@@ -1,360 +0,0 @@
|
||||
# -*- python -*-
|
||||
# ex: set syntax=python:
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# List of the branches being built automatically overnight
|
||||
NIGHT_SCHEDULE_BRANCHES = [None]
|
||||
|
||||
# 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 control 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/blender-dev-tools.git': 'blender-dev-tools',
|
||||
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="blender-dev-tools"),
|
||||
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"},
|
||||
"blender-dev-tools": {"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',
|
||||
'blender-dev-tools'):
|
||||
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))
|
||||
else:
|
||||
f.addStep(FileUpload(name='upload',
|
||||
slavesrc='buildbot_upload.zip',
|
||||
masterdest=filename,
|
||||
maxsize=150 * 1024 * 1024,
|
||||
workdir='install'))
|
||||
f.addStep(MasterShellCommand(name='unpack',
|
||||
command=['python2.7', unpack_script, filename],
|
||||
description='unpacking',
|
||||
descriptionDone='unpacked'))
|
||||
return f
|
||||
|
||||
# Builders
|
||||
|
||||
add_builder(c, 'mac_x86_64_10_6_cmake', 'darwin-9.x.universal', generic_builder, hour=5)
|
||||
# add_builder(c, 'linux_glibc211_i686_cmake', '', generic_builder, hour=1)
|
||||
# add_builder(c, 'linux_glibc211_x86_64_cmake', '', generic_builder, hour=2)
|
||||
add_builder(c, 'linux_glibc219_i686_cmake', '', generic_builder, hour=3)
|
||||
add_builder(c, 'linux_glibc219_x86_64_cmake', '', generic_builder, hour=4)
|
||||
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, 'win32_cmake_vc2015', 'windows_vc14', generic_builder, hour=5)
|
||||
add_builder(c, 'win64_cmake_vc2015', 'win64_vc14', generic_builder, hour=6)
|
||||
|
||||
# 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,148 +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:
|
||||
filename = os.path.join(directory, packagename)
|
||||
zf = z.open(package)
|
||||
f = file(filename, "wb")
|
||||
|
||||
shutil.copyfileobj(zf, f)
|
||||
os.chmod(filename, 0644)
|
||||
|
||||
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,210 +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 = os.path.join('..', 'blender.git')
|
||||
|
||||
|
||||
def parse_header_file(filename, define):
|
||||
import re
|
||||
regex = re.compile("^#\s*define\s+%s\s+(.*)" % define)
|
||||
with open(filename, "r") as file:
|
||||
for l in file:
|
||||
match = regex.match(l)
|
||||
if match:
|
||||
return match.group(1)
|
||||
return None
|
||||
|
||||
if 'cmake' in builder:
|
||||
# cmake
|
||||
|
||||
# Some fine-tuning configuration
|
||||
blender_dir = os.path.join('..', blender_dir)
|
||||
build_dir = os.path.abspath(os.path.join('..', 'build', builder))
|
||||
install_dir = os.path.abspath(os.path.join('..', 'install', builder))
|
||||
targets = ['blender']
|
||||
|
||||
chroot_name = None # If not None command will be delegated to that chroot
|
||||
cuda_chroot_name = None # If not None cuda compilationcommand will be delegated to that chroot
|
||||
build_cubins = True # Whether to build Cycles CUDA kernels
|
||||
bits = 64
|
||||
|
||||
# Config file to be used (relative to blender's sources root)
|
||||
cmake_config_file = "build_files/cmake/config/blender_full.cmake"
|
||||
cmake_player_config_file = None
|
||||
cmake_cuda_config_file = None
|
||||
|
||||
# Set build options.
|
||||
cmake_options = []
|
||||
cmake_extra_options = ['-DCMAKE_BUILD_TYPE:STRING=Release']
|
||||
cuda_cmake_options = []
|
||||
|
||||
if builder.startswith('mac'):
|
||||
# Set up OSX architecture
|
||||
if builder.endswith('x86_64_10_6_cmake'):
|
||||
cmake_extra_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64')
|
||||
cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda8-hack/bin/nvcc')
|
||||
cmake_extra_options.append('-DWITH_CODEC_QUICKTIME=OFF')
|
||||
cmake_extra_options.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=10.6')
|
||||
build_cubins = False
|
||||
|
||||
|
||||
elif builder.startswith('win'):
|
||||
if builder.endswith('_vc2015'):
|
||||
if builder.startswith('win64'):
|
||||
cmake_options.extend(['-G', 'Visual Studio 14 2015 Win64'])
|
||||
elif builder.startswith('win32'):
|
||||
bits = 32
|
||||
cmake_options.extend(['-G', 'Visual Studio 14 2015'])
|
||||
cmake_extra_options.append('-DCUDA_NVCC_FLAGS=--cl-version;2013;' +
|
||||
'--compiler-bindir;C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin')
|
||||
else:
|
||||
if builder.startswith('win64'):
|
||||
cmake_options.extend(['-G', 'Visual Studio 12 2013 Win64'])
|
||||
elif builder.startswith('win32'):
|
||||
bits = 32
|
||||
cmake_options.extend(['-G', 'Visual Studio 12 2013'])
|
||||
cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE:FILEPATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/nvcc.exe')
|
||||
|
||||
elif builder.startswith('linux'):
|
||||
tokens = builder.split("_")
|
||||
glibc = tokens[1]
|
||||
if glibc == 'glibc219':
|
||||
deb_name = "jessie"
|
||||
elif glibc == 'glibc211':
|
||||
deb_name = "squeeze"
|
||||
cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
|
||||
cmake_player_config_file = "build_files/buildbot/config/blender_linux_player.cmake"
|
||||
if builder.endswith('x86_64_cmake'):
|
||||
chroot_name = 'buildbot_' + deb_name + '_x86_64'
|
||||
targets = ['player', 'blender']
|
||||
elif builder.endswith('i686_cmake'):
|
||||
bits = 32
|
||||
chroot_name = 'buildbot_' + deb_name + '_i686'
|
||||
cuda_chroot_name = 'buildbot_' + deb_name + '_x86_64'
|
||||
targets = ['player', 'blender', 'cuda']
|
||||
|
||||
cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-8.0/bin/nvcc')
|
||||
|
||||
cmake_options.append("-C" + os.path.join(blender_dir, cmake_config_file))
|
||||
|
||||
# Prepare CMake options needed to configure cuda binaries compilation.
|
||||
cuda_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=%s" % ('ON' if build_cubins else 'OFF'))
|
||||
cuda_cmake_options.append("-DCYCLES_CUDA_BINARIES_ARCH=sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61")
|
||||
if build_cubins or 'cuda' in targets:
|
||||
if bits == 32:
|
||||
cuda_cmake_options.append("-DCUDA_64_BIT_DEVICE_CODE=OFF")
|
||||
else:
|
||||
cuda_cmake_options.append("-DCUDA_64_BIT_DEVICE_CODE=ON")
|
||||
|
||||
# Only modify common cmake options if cuda doesn't require separate target.
|
||||
if 'cuda' not in targets:
|
||||
cmake_options += cuda_cmake_options
|
||||
|
||||
cmake_options.append("-DCMAKE_INSTALL_PREFIX=%s" % (install_dir))
|
||||
|
||||
cmake_options += cmake_extra_options
|
||||
|
||||
# Prepare chroot command prefix if needed
|
||||
if chroot_name:
|
||||
chroot_prefix = ['schroot', '-c', chroot_name, '--']
|
||||
else:
|
||||
chroot_prefix = []
|
||||
if cuda_chroot_name:
|
||||
cuda_chroot_prefix = ['schroot', '-c', cuda_chroot_name, '--']
|
||||
else:
|
||||
cuda_chroot_prefix = chroot_prefix[:]
|
||||
|
||||
# Make sure no garbage remained from the previous run
|
||||
if os.path.isdir(install_dir):
|
||||
shutil.rmtree(install_dir)
|
||||
|
||||
for target in targets:
|
||||
print("Building target %s" % (target))
|
||||
# Construct build directory name based on the target
|
||||
target_build_dir = build_dir
|
||||
target_chroot_prefix = chroot_prefix[:]
|
||||
if target != 'blender':
|
||||
target_build_dir += '_' + target
|
||||
target_name = 'install'
|
||||
# Make sure build directory exists and enter it
|
||||
if not os.path.isdir(target_build_dir):
|
||||
os.mkdir(target_build_dir)
|
||||
os.chdir(target_build_dir)
|
||||
# Tweaking CMake options to respect the target
|
||||
target_cmake_options = cmake_options[:]
|
||||
if target == 'player':
|
||||
target_cmake_options.append("-C" + os.path.join(blender_dir, cmake_player_config_file))
|
||||
elif target == 'cuda':
|
||||
target_cmake_options += cuda_cmake_options
|
||||
target_chroot_prefix = cuda_chroot_prefix[:]
|
||||
target_name = 'cycles_kernel_cuda'
|
||||
# If cuda binaries are compiled as a separate target, make sure
|
||||
# other targets don't compile cuda binaries.
|
||||
if 'cuda' in targets and target != 'cuda':
|
||||
target_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=OFF")
|
||||
# Configure the build
|
||||
print("CMake options:")
|
||||
print(target_cmake_options)
|
||||
if os.path.exists('CMakeCache.txt'):
|
||||
print("Removing CMake cache")
|
||||
os.remove('CMakeCache.txt')
|
||||
retcode = subprocess.call(target_chroot_prefix + ['cmake', blender_dir] + target_cmake_options)
|
||||
if retcode != 0:
|
||||
print('Condifuration FAILED!')
|
||||
sys.exit(retcode)
|
||||
|
||||
if 'win32' in builder or 'win64' in builder:
|
||||
command = ['cmake', '--build', '.', '--target', target_name, '--config', 'Release']
|
||||
else:
|
||||
command = target_chroot_prefix + ['make', '-s', '-j2', target_name]
|
||||
|
||||
print("Executing command:")
|
||||
print(command)
|
||||
retcode = subprocess.call(command)
|
||||
|
||||
if retcode != 0:
|
||||
sys.exit(retcode)
|
||||
|
||||
if builder.startswith('linux') and target == 'cuda':
|
||||
blender_h = os.path.join(blender_dir, "source", "blender", "blenkernel", "BKE_blender_version.h")
|
||||
blender_version = int(parse_header_file(blender_h, 'BLENDER_VERSION'))
|
||||
blender_version = "%d.%d" % (blender_version // 100, blender_version % 100)
|
||||
kernels = os.path.join(target_build_dir, 'intern', 'cycles', 'kernel')
|
||||
install_kernels = os.path.join(install_dir, blender_version, 'scripts', 'addons', 'cycles', 'lib')
|
||||
os.mkdir(install_kernels)
|
||||
print("Copying cuda binaries from %s to %s" % (kernels, install_kernels))
|
||||
os.system('cp %s/*.cubin %s' % (kernels, install_kernels))
|
||||
|
||||
else:
|
||||
print("Unknown building system")
|
||||
sys.exit(1)
|
@@ -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.
|
||||
#
|
||||
# ##### 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 ''
|
||||
|
||||
blender_dir = os.path.join('..', 'blender.git')
|
||||
build_dir = os.path.join('..', 'build', builder)
|
||||
install_dir = os.path.join('..', 'install', builder)
|
||||
buildbot_upload_zip = os.path.abspath(os.path.join(os.path.dirname(install_dir), "buildbot_upload.zip"))
|
||||
|
||||
upload_filename = None # Name of the archive to be uploaded
|
||||
# (this is the name of archive which will appear on the
|
||||
# download page)
|
||||
upload_filepath = None # Filepath to be uploaded to the server
|
||||
# (this folder will be packed)
|
||||
|
||||
|
||||
def parse_header_file(filename, define):
|
||||
import re
|
||||
regex = re.compile("^#\s*define\s+%s\s+(.*)" % define)
|
||||
with open(filename, "r") as file:
|
||||
for l in file:
|
||||
match = regex.match(l)
|
||||
if match:
|
||||
return match.group(1)
|
||||
return None
|
||||
|
||||
|
||||
# Make sure install directory always exists
|
||||
if not os.path.exists(install_dir):
|
||||
os.makedirs(install_dir)
|
||||
|
||||
|
||||
def create_tar_bz2(src, dest, package_name):
|
||||
# One extra to remove leading os.sep when cleaning root for package_root
|
||||
ln = len(src) + 1
|
||||
flist = list()
|
||||
|
||||
# Create list of tuples containing file and archive name
|
||||
for root, dirs, files in os.walk(src):
|
||||
package_root = os.path.join(package_name, root[ln:])
|
||||
flist.extend([(os.path.join(root, file), os.path.join(package_root, file)) for file in files])
|
||||
|
||||
import tarfile
|
||||
package = tarfile.open(dest, 'w:bz2')
|
||||
for entry in flist:
|
||||
package.add(entry[0], entry[1], recursive=False)
|
||||
package.close()
|
||||
|
||||
|
||||
if builder.find('cmake') != -1:
|
||||
# CMake
|
||||
if 'win' in builder or 'mac' in builder:
|
||||
os.chdir(build_dir)
|
||||
|
||||
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]
|
||||
|
||||
# TODO(sergey): Such magic usually happens in SCon's packaging but we don't have it
|
||||
# in the CMake yet. For until then we do some magic here.
|
||||
tokens = result_file.split('-')
|
||||
blender_version = tokens[1].split('.')
|
||||
blender_full_version = '.'.join(blender_version[0:2])
|
||||
git_hash = tokens[2].split('.')[1]
|
||||
platform = builder.split('_')[0]
|
||||
if platform == 'mac':
|
||||
# Special exception for OSX
|
||||
platform = 'OSX-10.6-'
|
||||
if builder.endswith('x86_64_10_6_cmake'):
|
||||
platform += 'x86_64'
|
||||
elif builder.endswith('i386_10_6_cmake'):
|
||||
platform += 'i386'
|
||||
elif builder.endswith('ppc_10_6_cmake'):
|
||||
platform += 'ppc'
|
||||
if builder.endswith('vc2015'):
|
||||
platform += "-vc14"
|
||||
builderified_name = 'blender-{}-{}-{}'.format(blender_full_version, git_hash, platform)
|
||||
if branch != '':
|
||||
builderified_name = branch + "-" + builderified_name
|
||||
|
||||
os.rename(result_file, "{}.zip".format(builderified_name))
|
||||
# create zip file
|
||||
try:
|
||||
if os.path.exists(buildbot_upload_zip):
|
||||
os.remove(buildbot_upload_zip)
|
||||
z = zipfile.ZipFile(buildbot_upload_zip, "w", compression=zipfile.ZIP_STORED)
|
||||
z.write("{}.zip".format(builderified_name))
|
||||
z.close()
|
||||
sys.exit(retcode)
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
elif builder.startswith('linux_'):
|
||||
blender = os.path.join(install_dir, 'blender')
|
||||
blenderplayer = os.path.join(install_dir, 'blenderplayer')
|
||||
|
||||
buildinfo_h = os.path.join(build_dir, "source", "creator", "buildinfo.h")
|
||||
blender_h = os.path.join(blender_dir, "source", "blender", "blenkernel", "BKE_blender_version.h")
|
||||
|
||||
# Get version information
|
||||
blender_version = int(parse_header_file(blender_h, 'BLENDER_VERSION'))
|
||||
blender_version = "%d.%d" % (blender_version // 100, blender_version % 100)
|
||||
blender_hash = parse_header_file(buildinfo_h, 'BUILD_HASH')[1:-1]
|
||||
blender_glibc = builder.split('_')[1]
|
||||
|
||||
if builder.endswith('x86_64_cmake'):
|
||||
chroot_name = 'buildbot_squeeze_x86_64'
|
||||
bits = 64
|
||||
blender_arch = 'x86_64'
|
||||
elif builder.endswith('i686_cmake'):
|
||||
chroot_name = 'buildbot_squeeze_i686'
|
||||
bits = 32
|
||||
blender_arch = 'i686'
|
||||
|
||||
# Strip all unused symbols from the binaries
|
||||
print("Stripping binaries...")
|
||||
chroot_prefix = ['schroot', '-c', chroot_name, '--']
|
||||
subprocess.call(chroot_prefix + ['strip', '--strip-all', blender, blenderplayer])
|
||||
|
||||
print("Stripping python...")
|
||||
py_target = os.path.join(install_dir, blender_version)
|
||||
subprocess.call(chroot_prefix + ['find', py_target, '-iname', '*.so', '-exec', 'strip', '-s', '{}', ';'])
|
||||
|
||||
# Copy all specific files which are too specific to be copied by
|
||||
# the CMake rules themselves
|
||||
print("Copying extra scripts and libs...")
|
||||
|
||||
extra = '/' + os.path.join('home', 'sources', 'release-builder', 'extra')
|
||||
mesalibs = os.path.join(extra, 'mesalibs' + str(bits) + '.tar.bz2')
|
||||
software_gl = os.path.join(blender_dir, 'release', 'bin', 'blender-softwaregl')
|
||||
icons = os.path.join(blender_dir, 'release', 'freedesktop', 'icons')
|
||||
|
||||
os.system('tar -xpf %s -C %s' % (mesalibs, install_dir))
|
||||
os.system('cp %s %s' % (software_gl, install_dir))
|
||||
os.system('cp -r %s %s' % (icons, install_dir))
|
||||
os.system('chmod 755 %s' % (os.path.join(install_dir, 'blender-softwaregl')))
|
||||
|
||||
# Construct archive name
|
||||
package_name = 'blender-%s-%s-linux-%s-%s' % (blender_version,
|
||||
blender_hash,
|
||||
blender_glibc,
|
||||
blender_arch)
|
||||
if branch != '':
|
||||
package_name = branch + "-" + package_name
|
||||
|
||||
upload_filename = package_name + ".tar.bz2"
|
||||
|
||||
print("Creating .tar.bz2 archive")
|
||||
upload_filepath = install_dir + '.tar.bz2'
|
||||
create_tar_bz2(install_dir, upload_filepath, package_name)
|
||||
else:
|
||||
print("Unknown building system")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if upload_filepath is None:
|
||||
# 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)
|
||||
|
||||
upload_filename = file
|
||||
upload_filepath = filepath
|
||||
|
||||
# create zip file
|
||||
try:
|
||||
upload_zip = os.path.join(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(upload_filepath, arcname=upload_filename)
|
||||
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,59 +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 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]
|
||||
|
||||
# we run from build/ directory
|
||||
blender_dir = '../blender.git'
|
||||
|
||||
if "cmake" in builder:
|
||||
# cmake
|
||||
|
||||
print("Automated tests are still DISABLED!")
|
||||
sys.exit(0)
|
||||
|
||||
build_dir = os.path.abspath(os.path.join('..', 'build', builder))
|
||||
chroot_name = None
|
||||
chroot_prefix = []
|
||||
|
||||
"""
|
||||
if builder.endswith('x86_64_cmake'):
|
||||
chroot_name = 'buildbot_squeeze_x86_64'
|
||||
elif builder.endswith('i686_cmake'):
|
||||
chroot_name = 'buildbot_squeeze_i686'
|
||||
if chroot_name:
|
||||
chroot_prefix = ['schroot', '-c', chroot_name, '--']
|
||||
"""
|
||||
|
||||
os.chdir(build_dir)
|
||||
retcode = subprocess.call(chroot_prefix + ['ctest', '--output-on-failure'])
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
print("Unknown building system")
|
||||
sys.exit(1)
|
@@ -1,70 +0,0 @@
|
||||
# - Find Alembic library
|
||||
# Find the native Alembic includes and libraries
|
||||
# This module defines
|
||||
# ALEMBIC_INCLUDE_DIRS, where to find Alembic headers, Set when
|
||||
# ALEMBIC_INCLUDE_DIR is found.
|
||||
# ALEMBIC_LIBRARIES, libraries to link against to use Alembic.
|
||||
# ALEMBIC_ROOT_DIR, The base directory to search for Alembic.
|
||||
# This can also be an environment variable.
|
||||
# ALEMBIC_FOUND, If false, do not try to use Alembic.
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2016 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 ALEMBIC_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT ALEMBIC_ROOT_DIR AND NOT $ENV{ALEMBIC_ROOT_DIR} STREQUAL "")
|
||||
SET(ALEMBIC_ROOT_DIR $ENV{ALEMBIC_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_alembic_SEARCH_DIRS
|
||||
${ALEMBIC_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/alembic
|
||||
)
|
||||
|
||||
FIND_PATH(ALEMBIC_INCLUDE_DIR
|
||||
NAMES
|
||||
Alembic/Abc/All.h
|
||||
HINTS
|
||||
${_alembic_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ALEMBIC_LIBRARY
|
||||
NAMES
|
||||
Alembic
|
||||
HINTS
|
||||
${_alembic_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib lib/static
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set ALEMBIC_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALEMBIC DEFAULT_MSG ALEMBIC_LIBRARY ALEMBIC_INCLUDE_DIR)
|
||||
|
||||
IF(ALEMBIC_FOUND)
|
||||
SET(ALEMBIC_LIBRARIES ${ALEMBIC_LIBRARY})
|
||||
SET(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
|
||||
ENDIF(ALEMBIC_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
ALEMBIC_INCLUDE_DIR
|
||||
ALEMBIC_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_alembic_SEARCH_DIRS)
|
@@ -1,113 +0,0 @@
|
||||
# - Try to find audaspace
|
||||
# Once done, this will define
|
||||
#
|
||||
# AUDASPACE_FOUND - system has audaspace
|
||||
# AUDASPACE_INCLUDE_DIRS - the audaspace include directories
|
||||
# AUDASPACE_LIBRARIES - link these to use audaspace
|
||||
# AUDASPACE_C_FOUND - system has audaspace's C binding
|
||||
# AUDASPACE_C_INCLUDE_DIRS - the audaspace's C binding include directories
|
||||
# AUDASPACE_C_LIBRARIES - link these to use audaspace's C binding
|
||||
# AUDASPACE_PY_FOUND - system has audaspace's python binding
|
||||
# AUDASPACE_PY_INCLUDE_DIRS - the audaspace's python binding include directories
|
||||
# AUDASPACE_PY_LIBRARIES - link these to use audaspace's python binding
|
||||
|
||||
IF(NOT AUDASPACE_ROOT_DIR AND NOT $ENV{AUDASPACE_ROOT_DIR} STREQUAL "")
|
||||
SET(AUDASPACE_ROOT_DIR $ENV{AUDASPACE_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_audaspace_SEARCH_DIRS
|
||||
${AUDASPACE_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
# Use pkg-config to get hints about paths
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
IF(PKG_CONFIG_FOUND)
|
||||
PKG_CHECK_MODULES(AUDASPACE_PKGCONF audaspace)
|
||||
ENDIF(PKG_CONFIG_FOUND)
|
||||
|
||||
# Include dir
|
||||
FIND_PATH(AUDASPACE_INCLUDE_DIR
|
||||
NAMES ISound.h
|
||||
HINTS ${_audaspace_SEARCH_DIRS}
|
||||
PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES include/audaspace
|
||||
)
|
||||
|
||||
# Library
|
||||
FIND_LIBRARY(AUDASPACE_LIBRARY
|
||||
NAMES audaspace
|
||||
HINTS ${_audaspace_SEARCH_DIRS}
|
||||
PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
|
||||
PATH_SUFFIXES lib lib64
|
||||
)
|
||||
|
||||
# Include dir
|
||||
FIND_PATH(AUDASPACE_C_INCLUDE_DIR
|
||||
NAMES AUD_Sound.h
|
||||
HINTS ${_audaspace_SEARCH_DIRS}
|
||||
PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES include/audaspace
|
||||
)
|
||||
|
||||
# Library
|
||||
FIND_LIBRARY(AUDASPACE_C_LIBRARY
|
||||
NAMES audaspace-c
|
||||
HINTS ${_audaspace_SEARCH_DIRS}
|
||||
PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
|
||||
PATH_SUFFIXES lib lib64
|
||||
)
|
||||
|
||||
# Include dir
|
||||
FIND_PATH(AUDASPACE_PY_INCLUDE_DIR
|
||||
NAMES python/PyAPI.h
|
||||
HINTS ${_audaspace_SEARCH_DIRS}
|
||||
PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES include/audaspace
|
||||
)
|
||||
|
||||
# Library
|
||||
FIND_LIBRARY(AUDASPACE_PY_LIBRARY
|
||||
NAMES audaspace-py
|
||||
HINTS ${_audaspace_SEARCH_DIRS}
|
||||
PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
|
||||
PATH_SUFFIXES lib lib64
|
||||
)
|
||||
|
||||
FIND_PACKAGE(PackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace DEFAULT_MSG AUDASPACE_LIBRARY AUDASPACE_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace_C DEFAULT_MSG AUDASPACE_C_LIBRARY AUDASPACE_C_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace_Py DEFAULT_MSG AUDASPACE_PY_LIBRARY AUDASPACE_PY_INCLUDE_DIR)
|
||||
|
||||
IF(AUDASPACE_FOUND)
|
||||
SET(AUDASPACE_LIBRARIES ${AUDASPACE_LIBRARY})
|
||||
SET(AUDASPACE_INCLUDE_DIRS ${AUDASPACE_INCLUDE_DIR})
|
||||
ENDIF(AUDASPACE_FOUND)
|
||||
|
||||
IF(AUDASPACE_C_FOUND)
|
||||
SET(AUDASPACE_C_LIBRARIES ${AUDASPACE_C_LIBRARY})
|
||||
SET(AUDASPACE_C_INCLUDE_DIRS ${AUDASPACE_C_INCLUDE_DIR})
|
||||
ENDIF(AUDASPACE_C_FOUND)
|
||||
|
||||
IF(AUDASPACE_PY_FOUND)
|
||||
SET(AUDASPACE_PY_LIBRARIES ${AUDASPACE_PY_LIBRARY})
|
||||
SET(AUDASPACE_PY_INCLUDE_DIRS ${AUDASPACE_PY_INCLUDE_DIR})
|
||||
ENDIF(AUDASPACE_PY_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
AUDASPACE_LIBRARY
|
||||
AUDASPACE_LIBRARIES
|
||||
AUDASPACE_INCLUDE_DIR
|
||||
AUDASPACE_INCLUDE_DIRS
|
||||
AUDASPACE_C_LIBRARY
|
||||
AUDASPACE_C_LIBRARIES
|
||||
AUDASPACE_C_INCLUDE_DIR
|
||||
AUDASPACE_C_INCLUDE_DIRS
|
||||
AUDASPACE_PY_LIBRARY
|
||||
AUDASPACE_PY_LIBRARIES
|
||||
AUDASPACE_PY_INCLUDE_DIR
|
||||
AUDASPACE_PY_INCLUDE_DIRS
|
||||
)
|
@@ -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,69 +0,0 @@
|
||||
# - Find HDF5 library
|
||||
# Find the native HDF5 includes and libraries
|
||||
# This module defines
|
||||
# HDF5_INCLUDE_DIRS, where to find hdf5.h, Set when HDF5_INCLUDE_DIR is found.
|
||||
# HDF5_LIBRARIES, libraries to link against to use HDF5.
|
||||
# HDF5_ROOT_DIR, The base directory to search for HDF5.
|
||||
# This can also be an environment variable.
|
||||
# HDF5_FOUND, If false, do not try to use HDF5.
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2016 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 HDF5_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT HDF5_ROOT_DIR AND NOT $ENV{HDF5_ROOT_DIR} STREQUAL "")
|
||||
SET(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_hdf5_SEARCH_DIRS
|
||||
${HDF5_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/hdf5
|
||||
)
|
||||
|
||||
FIND_LIBRARY(HDF5_LIBRARY
|
||||
NAMES
|
||||
hdf5
|
||||
HINTS
|
||||
${_hdf5_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_PATH(HDF5_INCLUDE_DIR
|
||||
NAMES
|
||||
hdf5.h
|
||||
HINTS
|
||||
${_hdf5_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set HDF5_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HDF5 DEFAULT_MSG HDF5_LIBRARY HDF5_INCLUDE_DIR)
|
||||
|
||||
IF(HDF5_FOUND)
|
||||
SET(HDF5_LIBRARIES ${HDF5_LIBRARY})
|
||||
SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
|
||||
ENDIF(HDF5_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
HDF5_INCLUDE_DIR
|
||||
HDF5_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_hdf5_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,96 +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}
|
||||
LLVMAnalysis # check for the static library as a fall-back
|
||||
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,90 +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
|
||||
HINTS
|
||||
${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,112 +0,0 @@
|
||||
# - Find OpenSubdiv library
|
||||
# Find the native OpenSubdiv includes and library
|
||||
# This module defines
|
||||
# OPENSUBDIV_INCLUDE_DIRS, where to find OpenSubdiv headers, Set when
|
||||
# OPENSUBDIV_INCLUDE_DIR is found.
|
||||
# OPENSUBDIV_LIBRARIES, libraries to link against to use OpenSubdiv.
|
||||
# OPENSUBDIV_ROOT_DIR, the base directory to search for OpenSubdiv.
|
||||
# This can also be an environment variable.
|
||||
# OPENSUBDIV_FOUND, if false, do not try to use OpenSubdiv.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENSUBDIV_LIBRARY, where to find the OpenSubdiv library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2013 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 OPENSUBDIV_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENSUBDIV_ROOT_DIR AND NOT $ENV{OPENSUBDIV_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENSUBDIV_ROOT_DIR $ENV{OPENSUBDIV_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_opensubdiv_FIND_COMPONENTS
|
||||
osdGPU
|
||||
osdCPU
|
||||
)
|
||||
|
||||
SET(_opensubdiv_SEARCH_DIRS
|
||||
${OPENSUBDIV_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/opensubdiv
|
||||
/opt/lib/osd # install_deps.sh
|
||||
)
|
||||
|
||||
FIND_PATH(OPENSUBDIV_INCLUDE_DIR
|
||||
NAMES
|
||||
opensubdiv/osd/mesh.h
|
||||
HINTS
|
||||
${_opensubdiv_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
SET(_opensubdiv_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_opensubdiv_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_opensubdiv_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
LIST(APPEND _opensubdiv_LIBRARIES "${OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDFOREACH()
|
||||
|
||||
MACRO(OPENSUBDIV_CHECK_CONTROLLER
|
||||
controller_include_file
|
||||
variable_name)
|
||||
IF(EXISTS "${OPENSUBDIV_INCLUDE_DIR}/opensubdiv/osd/${controller_include_file}")
|
||||
SET(${variable_name} TRUE)
|
||||
ELSE()
|
||||
SET(${variable_name} FALSE)
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENSUBDIV_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSubdiv DEFAULT_MSG
|
||||
_opensubdiv_LIBRARIES OPENSUBDIV_INCLUDE_DIR)
|
||||
|
||||
IF(OPENSUBDIV_FOUND)
|
||||
SET(OPENSUBDIV_LIBRARIES ${_opensubdiv_LIBRARIES})
|
||||
SET(OPENSUBDIV_INCLUDE_DIRS ${OPENSUBDIV_INCLUDE_DIR})
|
||||
|
||||
# Find available compute controllers.
|
||||
|
||||
FIND_PACKAGE(OpenMP)
|
||||
IF(OPENMP_FOUND)
|
||||
SET(OPENSUBDIV_HAS_OPENMP TRUE)
|
||||
ELSE()
|
||||
SET(OPENSUBDIV_HAS_OPENMP FALSE)
|
||||
ENDIF()
|
||||
|
||||
OPENSUBDIV_CHECK_CONTROLLER("tbbEvaluator.h" OPENSUBDIV_HAS_TBB)
|
||||
OPENSUBDIV_CHECK_CONTROLLER("clEvaluator.h" OPENSUBDIV_HAS_OPENCL)
|
||||
OPENSUBDIV_CHECK_CONTROLLER("cudaEvaluator.h" OPENSUBDIV_HAS_CUDA)
|
||||
OPENSUBDIV_CHECK_CONTROLLER("glXFBEvaluator.h" OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK)
|
||||
OPENSUBDIV_CHECK_CONTROLLER("glComputeEvaluator.h" OPENSUBDIV_HAS_GLSL_COMPUTE)
|
||||
ENDIF(OPENSUBDIV_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENSUBDIV_INCLUDE_DIR
|
||||
)
|
||||
FOREACH(COMPONENT ${_opensubdiv_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
MARK_AS_ADVANCED(OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY)
|
||||
ENDFOREACH()
|
@@ -1,74 +0,0 @@
|
||||
# - Find OPENVDB library
|
||||
# Find the native OPENVDB includes and library
|
||||
# This module defines
|
||||
# OPENVDB_INCLUDE_DIRS, where to find openvdb.h, Set when
|
||||
# OPENVDB_INCLUDE_DIR is found.
|
||||
# OPENVDB_LIBRARIES, libraries to link against to use OPENVDB.
|
||||
# OPENVDB_ROOT_DIR, The base directory to search for OPENVDB.
|
||||
# This can also be an environment variable.
|
||||
# OPENVDB_FOUND, If false, do not try to use OPENVDB.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENVDB_LIBRARY, where to find the OPENVDB 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 OPENVDB_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENVDB_ROOT_DIR AND NOT $ENV{OPENVDB_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENVDB_ROOT_DIR $ENV{OPENVDB_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_openvdb_SEARCH_DIRS
|
||||
${OPENVDB_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/openvdb
|
||||
/opt/lib/openvdb
|
||||
)
|
||||
|
||||
FIND_PATH(OPENVDB_INCLUDE_DIR
|
||||
NAMES
|
||||
openvdb/openvdb.h
|
||||
HINTS
|
||||
${_openvdb_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENVDB_LIBRARY
|
||||
NAMES
|
||||
openvdb
|
||||
HINTS
|
||||
${_openvdb_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENVDB_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENVDB DEFAULT_MSG
|
||||
OPENVDB_LIBRARY OPENVDB_INCLUDE_DIR)
|
||||
|
||||
IF(OPENVDB_FOUND)
|
||||
SET(OPENVDB_LIBRARIES ${OPENVDB_LIBRARY})
|
||||
SET(OPENVDB_INCLUDE_DIRS ${OPENVDB_INCLUDE_DIR})
|
||||
ENDIF(OPENVDB_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENVDB_INCLUDE_DIR
|
||||
OPENVDB_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_openvdb_SEARCH_DIRS)
|
@@ -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,229 +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.5 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()
|
||||
|
||||
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}"
|
||||
)
|
||||
|
||||
# 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
|
||||
)
|
||||
|
||||
|
||||
|
||||
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)
|
||||
SET(_PYTHON_ABI_FLAGS "${_CURRENT_ABI_FLAGS}")
|
||||
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)
|
||||
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.5 packages...
|
||||
# GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
|
||||
|
||||
# not required for build, just used when bundling Python.
|
||||
FIND_PROGRAM(
|
||||
PYTHON_EXECUTABLE
|
||||
NAMES
|
||||
"python${PYTHON_VERSION}${_PYTHON_ABI_FLAGS}"
|
||||
"python${PYTHON_VERSION}"
|
||||
"python"
|
||||
HINTS
|
||||
${_python_SEARCH_DIRS}
|
||||
PATH_SUFFIXES bin
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
UNSET(_PYTHON_VERSION_NO_DOTS)
|
||||
UNSET(_PYTHON_ABI_FLAGS)
|
||||
UNSET(_python_SEARCH_DIRS)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
PYTHON_INCLUDE_DIR
|
||||
PYTHON_INCLUDE_CONFIG_DIR
|
||||
PYTHON_LIBRARY
|
||||
PYTHON_LIBPATH
|
||||
PYTHON_SITE_PACKAGES
|
||||
PYTHON_EXECUTABLE
|
||||
)
|
@@ -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,73 +0,0 @@
|
||||
# - Find TBB library
|
||||
# Find the native TBB includes and library
|
||||
# This module defines
|
||||
# TBB_INCLUDE_DIRS, where to find tbb.h, Set when
|
||||
# TBB is found.
|
||||
# TBB_LIBRARIES, libraries to link against to use TBB.
|
||||
# TBB_ROOT_DIR, The base directory to search for TBB.
|
||||
# This can also be an environment variable.
|
||||
# TBB_FOUND, If false, do not try to use TBB.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# TBB_LIBRARY, where to find the TBB library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2016 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 TBB_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT TBB_ROOT_DIR AND NOT $ENV{TBB_ROOT_DIR} STREQUAL "")
|
||||
SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_tbb_SEARCH_DIRS
|
||||
${TBB_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/tbb
|
||||
)
|
||||
|
||||
FIND_PATH(TBB_INCLUDE_DIR
|
||||
NAMES
|
||||
tbb/tbb.h
|
||||
HINTS
|
||||
${_tbb_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(TBB_LIBRARY
|
||||
NAMES
|
||||
tbb
|
||||
HINTS
|
||||
${_tbb_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set TBB_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB DEFAULT_MSG
|
||||
TBB_LIBRARY TBB_INCLUDE_DIR)
|
||||
|
||||
IF(TBB_FOUND)
|
||||
SET(TBB_LIBRARIES ${TBB_LIBRARY})
|
||||
SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(TBB_TBB_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
TBB_INCLUDE_DIR
|
||||
TBB_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,63 +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_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
|
||||
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/glog/src
|
||||
${CMAKE_SOURCE_DIR}/extern/gflags/src
|
||||
${CMAKE_SOURCE_DIR}/extern/gtest/include
|
||||
${CMAKE_SOURCE_DIR}/extern/gmock/include
|
||||
)
|
||||
unset(_current_include_directories)
|
||||
|
||||
add_executable(${NAME}_test ${SRC})
|
||||
target_link_libraries(${NAME}_test
|
||||
${EXTRA_LIBS}
|
||||
${PLATFORM_LINKLIBS}
|
||||
bf_testing_main
|
||||
bf_intern_guardedalloc
|
||||
extern_gtest
|
||||
extern_gmock
|
||||
# needed for glog
|
||||
${PTHREADS_LIBRARIES}
|
||||
extern_glog
|
||||
extern_gflags)
|
||||
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}")
|
||||
if(${DO_ADD_TEST})
|
||||
add_test(NAME ${NAME}_test COMMAND ${TESTS_OUTPUT_DIR}/${NAME}_test WORKING_DIRECTORY $<TARGET_FILE_DIR:blender>)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
|
||||
BLENDER_SRC_GTEST_EX("${NAME}" "${SRC}" "${EXTRA_LIBS}" "TRUE")
|
||||
endmacro()
|
||||
|
||||
macro(BLENDER_TEST NAME EXTRA_LIBS)
|
||||
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "TRUE")
|
||||
endmacro()
|
||||
|
||||
macro(BLENDER_TEST_PERFORMANCE NAME EXTRA_LIBS)
|
||||
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "FALSE")
|
||||
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,187 +0,0 @@
|
||||
# This is called by cmake as an external process from
|
||||
# ./source/creator/CMakeLists.txt to write ./source/creator/buildinfo.h
|
||||
# Caller must define:
|
||||
# SOURCE_DIR
|
||||
# Optional overrides:
|
||||
# BUILD_DATE
|
||||
# BUILD_TIME
|
||||
|
||||
# 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)
|
||||
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 blender-v* --contains ${MY_WC_HASH}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_contains_check
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT _git_contains_check STREQUAL "")
|
||||
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")
|
||||
else()
|
||||
execute_process(COMMAND git branch --contains ${MY_WC_HASH}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_contains_branches
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REGEX REPLACE "^\\*[ \t]+" "" _git_contains_branches "${_git_contains_branches}")
|
||||
string(REGEX REPLACE "[\r\n]+" ";" _git_contains_branches "${_git_contains_branches}")
|
||||
string(REGEX REPLACE ";[ \t]+" ";" _git_contains_branches "${_git_contains_branches}")
|
||||
foreach(_branch ${_git_contains_branches})
|
||||
if (NOT "${_branch}" MATCHES "\\(HEAD.*")
|
||||
set(MY_WC_BRANCH "${_branch}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
unset(_branch)
|
||||
unset(_git_contains_branches)
|
||||
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)
|
||||
# May fail in rare cases
|
||||
if(MY_WC_COMMIT_TIMESTAMP STREQUAL "")
|
||||
set(MY_WC_COMMIT_TIMESTAMP 0)
|
||||
endif()
|
||||
|
||||
# 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()
|
||||
|
||||
# BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
|
||||
# but BUILD_DATE and BUILD_TIME are platform dependent
|
||||
if(UNIX)
|
||||
if(NOT BUILD_DATE)
|
||||
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(NOT BUILD_TIME)
|
||||
execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
elseif(WIN32)
|
||||
if(NOT BUILD_DATE)
|
||||
execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(NOT BUILD_TIME)
|
||||
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
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,338 +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,
|
||||
BUILD_DIR,
|
||||
)
|
||||
|
||||
|
||||
import os
|
||||
from os.path import join, dirname, normpath, splitext
|
||||
|
||||
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)
|
||||
cmake_base_bin = os.path.join(BUILD_DIR, os.path.relpath(cmake_base, SOURCE_DIR))
|
||||
|
||||
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)
|
||||
l = l.replace("${CMAKE_CURRENT_BINARY_DIR}", cmake_base_bin)
|
||||
l = l.strip('"')
|
||||
|
||||
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 new_file.startswith(BUILD_DIR):
|
||||
# assume generated path
|
||||
pass
|
||||
elif 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()
|
||||
|
||||
|
||||
def is_ignore(f, ignore_used):
|
||||
for index, ig in enumerate(IGNORE):
|
||||
if ig in f:
|
||||
ignore_used[index] = True
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
print("Scanning:", SOURCE_DIR)
|
||||
|
||||
for cmake in source_list(SOURCE_DIR, is_cmake):
|
||||
cmake_get_src(cmake)
|
||||
|
||||
# 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.startswith(BUILD_DIR):
|
||||
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
|
||||
|
||||
ignore_used = [False] * len(IGNORE)
|
||||
|
||||
# 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, ignore_used):
|
||||
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, ignore_used):
|
||||
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()
|
||||
|
||||
# Check ignores aren't stale
|
||||
print("\nCheck for unused 'IGNORE' paths...")
|
||||
for index, ig in enumerate(IGNORE):
|
||||
if not ignore_used[index]:
|
||||
print("unused ignore: %r" % ig)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -1,41 +0,0 @@
|
||||
import os
|
||||
|
||||
IGNORE = (
|
||||
"/test/",
|
||||
"/tests/gtests/",
|
||||
"/release/",
|
||||
|
||||
# specific source files
|
||||
"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",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleFactory.cpp",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleReader.cpp",
|
||||
|
||||
"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/carve/include/carve/config.h",
|
||||
"extern/carve/include/carve/random/random.h",
|
||||
"extern/carve/patches/files/config.h",
|
||||
"extern/carve/patches/files/random.h",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleFactory.h",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleReader.h",
|
||||
)
|
||||
|
||||
UTF8_CHECK = True
|
||||
|
||||
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))))
|
||||
|
||||
# doesn't have to exist, just use as reference
|
||||
BUILD_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(SOURCE_DIR, "..", "build"))))
|
@@ -1,282 +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
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
# until we have arg parsing
|
||||
import project_info
|
||||
if not project_info.init(sys.argv[-1]):
|
||||
sys.exit(1)
|
||||
|
||||
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,
|
||||
cmake_cache_var,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
|
||||
import os
|
||||
from os.path import join, dirname, normpath, relpath, exists
|
||||
|
||||
|
||||
def create_nb_project_main():
|
||||
from xml.sax.saxutils import escape
|
||||
|
||||
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()
|
||||
|
||||
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")
|
||||
make_exe_basename = os.path.basename(make_exe)
|
||||
|
||||
# --------------- 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="95">\n')
|
||||
f.write(' <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">\n')
|
||||
f.write(' <df root="%s" name="0">\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(' <dependencyChecking>false</dependencyChecking>\n')
|
||||
f.write(' <rebuildPropChanged>false</rebuildPropChanged>\n')
|
||||
f.write(' </toolsSet>\n')
|
||||
f.write(' <codeAssistance>\n')
|
||||
f.write(' </codeAssistance>\n')
|
||||
f.write(' <makefileType>\n')
|
||||
|
||||
f.write(' <makeTool>\n')
|
||||
f.write(' <buildCommandWorkingDir>.</buildCommandWorkingDir>\n')
|
||||
|
||||
if make_exe_basename == "ninja":
|
||||
build_cmd = "ninja"
|
||||
clean_cmd = "ninja -t clean"
|
||||
else:
|
||||
build_cmd = "${MAKE} -f Makefile"
|
||||
clean_cmd = "${MAKE} -f Makefile clean"
|
||||
|
||||
f.write(' <buildCommand>%s</buildCommand>\n' % escape(build_cmd))
|
||||
f.write(' <cleanCommand>%s</cleanCommand>\n' % escape(clean_cmd))
|
||||
f.write(' <executablePath>./bin/blender</executablePath>\n')
|
||||
del build_cmd, clean_cmd
|
||||
|
||||
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' % escape(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:
|
||||
is_c = path.endswith(".c")
|
||||
f.write(' <item path="%s"\n' % path)
|
||||
f.write(' ex="false"\n')
|
||||
f.write(' tool="%d"\n' % (0 if is_c else 1))
|
||||
f.write(' flavor2="%d">\n' % (3 if is_c else 0))
|
||||
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,200 +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 --build-dir ~/blender-git/cmake
|
||||
|
||||
Example Win32 usage:
|
||||
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py --build-dir c:\blender_dev\cmake_build
|
||||
"""
|
||||
|
||||
|
||||
import os
|
||||
|
||||
|
||||
def quote_define(define):
|
||||
if " " in define.strip():
|
||||
return '"%s"' % define
|
||||
else:
|
||||
return define
|
||||
|
||||
|
||||
def create_qtc_project_main(name):
|
||||
from project_info import (
|
||||
SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
# CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
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 = name or "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()
|
||||
|
||||
# be tricky, get the project name from CMake if we can!
|
||||
PROJECT_NAME = name or 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 os.name != "nt":
|
||||
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(name):
|
||||
from project_info import (
|
||||
SOURCE_DIR,
|
||||
# CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_py,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
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
|
||||
# be tricky, get the project name from git if we can!
|
||||
PROJECT_NAME = (name or 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 argparse_create():
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="This script generates Qt Creator project files for Blender",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-n", "--name",
|
||||
dest="name",
|
||||
metavar='NAME', type=str,
|
||||
help="Override default project name (\"Blender\")",
|
||||
required=False,
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-b", "--build-dir",
|
||||
dest="build_dir",
|
||||
metavar='BUILD_DIR', type=str,
|
||||
help="Specify the build path (or fallback to the $PWD)",
|
||||
required=False,
|
||||
)
|
||||
|
||||
return parser
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse_create()
|
||||
args = parser.parse_args()
|
||||
name = args.name
|
||||
|
||||
import project_info
|
||||
if not project_info.init(args.build_dir):
|
||||
return
|
||||
|
||||
create_qtc_project_main(name)
|
||||
create_qtc_project_python(name)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -1,85 +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",
|
||||
]
|
||||
|
||||
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,89 +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",
|
||||
]
|
||||
|
||||
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,79 +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",
|
||||
]
|
||||
|
||||
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,77 +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",
|
||||
]
|
||||
|
||||
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,107 +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",
|
||||
]
|
||||
|
||||
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,78 +0,0 @@
|
||||
# Turn everything ON thats expected for an official release builds.
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_ALEMBIC ON CACHE BOOL "" FORCE)
|
||||
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_CYCLES_OSL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS 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_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_OPENVDB ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB_BLOSC 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)
|
||||
|
||||
|
||||
# platform dependent options
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(WIN32)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
if(NOT CMAKE_COMPILER_IS_GNUCC)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
else()
|
||||
# MinGW exceptions
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_QUICKTIME ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF 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,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_lite.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_INSTALL_PORTABLE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SYSTEM_GLEW ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_ALEMBIC OFF 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_CYCLES_OSL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LLVM 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_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_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB 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,79 +0,0 @@
|
||||
# Turn everything ON thats expected for an official release builds.
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/blender_release.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_ALEMBIC ON CACHE BOOL "" FORCE)
|
||||
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_CYCLES_OSL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS 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_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_OPENVDB ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB_BLOSC 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)
|
||||
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 CACHE STRING "" FORCE)
|
||||
|
||||
# platform dependent options
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(WIN32)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
if(NOT CMAKE_COMPILER_IS_GNUCC)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
else()
|
||||
# MinGW exceptions
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_QUICKTIME ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
@@ -1,35 +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)
|
||||
set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_ALEMBIC 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,138 +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/)
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
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)
|
||||
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
|
||||
if (MSVC)
|
||||
if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(PACKAGE_ARCH windows64)
|
||||
else()
|
||||
set(PACKAGE_ARCH windows32)
|
||||
endif()
|
||||
else(MSVC)
|
||||
set(PACKAGE_ARCH ${CMAKE_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
|
||||
if (CPACK_OVERRIDE_PACKAGENAME)
|
||||
set(CPACK_PACKAGE_FILE_NAME ${CPACK_OVERRIDE_PACKAGENAME}-${PACKAGE_ARCH})
|
||||
else()
|
||||
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME_LOWER}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${PACKAGE_ARCH})
|
||||
endif()
|
||||
|
||||
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}/release/windows/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}/release/windows/icons/winblender.ico)
|
||||
set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A")
|
||||
|
||||
set(CPACK_WIX_TEMPLATE ${LIBDIR}/package/installer_wix/WIX.template)
|
||||
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")
|
||||
set(CPACK_CREATE_DESKTOP_LINKS "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()
|
||||
|
||||
unset(MAJOR_VERSION)
|
||||
unset(MINOR_VERSION)
|
||||
unset(PATCH_VERSION)
|
||||
|
||||
unset(BUILD_REV)
|
||||
|
@@ -1,468 +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.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for Apple.
|
||||
|
||||
if(NOT DEFINED LIBDIR)
|
||||
if(WITH_CXX11)
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin)
|
||||
else()
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
|
||||
endif()
|
||||
if(NOT EXISTS "${LIBDIR}/")
|
||||
message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENAL)
|
||||
find_package(OpenAL)
|
||||
if(OPENAL_FOUND)
|
||||
set(WITH_OPENAL ON)
|
||||
set(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include")
|
||||
else()
|
||||
set(WITH_OPENAL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
set(ALEMBIC ${LIBDIR}/alembic)
|
||||
set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
|
||||
set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
|
||||
set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
|
||||
set(ALEMBIC_LIBRARIES Alembic)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
|
||||
set(OPENSUBDIV ${LIBDIR}/opensubdiv)
|
||||
set(OPENSUBDIV_LIBPATH ${OPENSUBDIV}/lib)
|
||||
find_library(OSD_LIB_CPU NAMES osdCPU PATHS ${OPENSUBDIV_LIBPATH})
|
||||
find_library(OSD_LIB_GPU NAMES osdGPU PATHS ${OPENSUBDIV_LIBPATH})
|
||||
set(OPENSUBDIV_INCLUDE_DIR ${OPENSUBDIV}/include)
|
||||
set(OPENSUBDIV_INCLUDE_DIRS ${OPENSUBDIV_INCLUDE_DIR})
|
||||
list(APPEND OPENSUBDIV_LIBRARIES ${OSD_LIB_CPU} ${OSD_LIB_GPU})
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
find_library(JACK_FRAMEWORK
|
||||
NAMES jackmp
|
||||
)
|
||||
set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
|
||||
if(NOT JACK_FRAMEWORK)
|
||||
set(WITH_JACK OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
set(SNDFILE ${LIBDIR}/sndfile)
|
||||
set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
|
||||
set(SNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
|
||||
set(SNDFILE_LIBPATH ${SNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# we use precompiled libraries for py 3.5 and up by default
|
||||
set(PYTHON_VERSION 3.5)
|
||||
if(NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK)
|
||||
# normally cached but not since we include them with blender
|
||||
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m")
|
||||
set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m")
|
||||
set(PYTHON_LIBRARY python${PYTHON_VERSION}m)
|
||||
set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
|
||||
# set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
|
||||
else()
|
||||
# module must be compiled against Python framework
|
||||
set(_py_framework "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}")
|
||||
|
||||
set(PYTHON_INCLUDE_DIR "${_py_framework}/include/python${PYTHON_VERSION}m")
|
||||
set(PYTHON_EXECUTABLE "${_py_framework}/bin/python${PYTHON_VERSION}m")
|
||||
set(PYTHON_LIBPATH "${_py_framework}/lib/python${PYTHON_VERSION}/config-${PYTHON_VERSION}m")
|
||||
#set(PYTHON_LIBRARY python${PYTHON_VERSION})
|
||||
#set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python") # won't build with this enabled
|
||||
|
||||
unset(_py_framework)
|
||||
endif()
|
||||
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
|
||||
if(NOT EXISTS "${PYTHON_EXECUTABLE}")
|
||||
message(FATAL_ERROR "Python executable missing: ${PYTHON_EXECUTABLE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_FFTW3)
|
||||
set(FFTW3 ${LIBDIR}/fftw3)
|
||||
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
|
||||
set(FFTW3_LIBRARIES fftw3)
|
||||
set(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
endif()
|
||||
|
||||
set(PNG_LIBRARIES png)
|
||||
set(JPEG_LIBRARIES jpeg)
|
||||
|
||||
set(ZLIB /usr)
|
||||
set(ZLIB_INCLUDE_DIRS "${ZLIB}/include")
|
||||
set(ZLIB_LIBRARIES z bz2)
|
||||
|
||||
set(FREETYPE ${LIBDIR}/freetype)
|
||||
set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
|
||||
set(FREETYPE_LIBPATH ${FREETYPE}/lib)
|
||||
set(FREETYPE_LIBRARY freetype)
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
set(OPENEXR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR}/include/OpenEXR)
|
||||
if(WITH_CXX11)
|
||||
set(OPENEXR_POSTFIX -2_2)
|
||||
else()
|
||||
set(OPENEXR_POSTFIX)
|
||||
endif()
|
||||
set(OPENEXR_LIBRARIES
|
||||
Iex${OPENEXR_POSTFIX}
|
||||
Half
|
||||
IlmImf${OPENEXR_POSTFIX}
|
||||
Imath${OPENEXR_POSTFIX}
|
||||
IlmThread${OPENEXR_POSTFIX})
|
||||
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG ${LIBDIR}/ffmpeg)
|
||||
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
|
||||
set(FFMPEG_LIBRARIES
|
||||
avcodec avdevice avformat avutil
|
||||
mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg
|
||||
)
|
||||
if(WITH_CXX11)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} schroedinger orc vpx webp swresample)
|
||||
endif()
|
||||
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENJPEG OR WITH_CODEC_FFMPEG)
|
||||
# use openjpeg from libdir that is linked into ffmpeg
|
||||
if(WITH_CXX11)
|
||||
set(OPENJPEG ${LIBDIR}/openjpeg)
|
||||
set(WITH_SYSTEM_OPENJPEG ON)
|
||||
set(OPENJPEG_INCLUDE_DIRS ${OPENJPEG}/include)
|
||||
set(OPENJPEG_LIBRARIES ${OPENJPEG}/lib/libopenjpeg.a)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_library(SYSTEMSTUBS_LIBRARY
|
||||
NAMES
|
||||
SystemStubs
|
||||
PATHS
|
||||
)
|
||||
mark_as_advanced(SYSTEMSTUBS_LIBRARY)
|
||||
if(SYSTEMSTUBS_LIBRARY)
|
||||
list(APPEND PLATFORM_LINKLIBS SystemStubs)
|
||||
endif()
|
||||
|
||||
set(PLATFORM_CFLAGS "-pipe -funsigned-char")
|
||||
set(PLATFORM_LINKFLAGS
|
||||
"-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio"
|
||||
)
|
||||
if(WITH_CODEC_QUICKTIME)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QTKit")
|
||||
if(CMAKE_OSX_ARCHITECTURES MATCHES i386)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
|
||||
# libSDL still needs 32bit carbon quicktime
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CXX11)
|
||||
list(APPEND PLATFORM_LINKLIBS c++)
|
||||
else()
|
||||
list(APPEND PLATFORM_LINKLIBS stdc++)
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -F/Library/Frameworks -weak_framework jackmp")
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON_MODULE OR WITH_PYTHON_FRAMEWORK)
|
||||
# force cmake to link right framework
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/Python")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
set(OPENCOLLADA ${LIBDIR}/opencollada)
|
||||
|
||||
set(OPENCOLLADA_INCLUDE_DIRS
|
||||
${LIBDIR}/opencollada/include/COLLADAStreamWriter
|
||||
${LIBDIR}/opencollada/include/COLLADABaseUtils
|
||||
${LIBDIR}/opencollada/include/COLLADAFramework
|
||||
${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader
|
||||
${LIBDIR}/opencollada/include/GeneratedSaxParser
|
||||
)
|
||||
|
||||
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
|
||||
set(OPENCOLLADA_LIBRARIES
|
||||
OpenCOLLADASaxFrameworkLoader
|
||||
-lOpenCOLLADAFramework
|
||||
-lOpenCOLLADABaseUtils
|
||||
-lOpenCOLLADAStreamWriter
|
||||
-lMathMLSolver
|
||||
-lGeneratedSaxParser
|
||||
-lxml2 -lbuffer -lftoa
|
||||
)
|
||||
# Use UTF functions from collada if LLVM is not enabled
|
||||
if(NOT WITH_LLVM)
|
||||
list(APPEND OPENCOLLADA_LIBRARIES -lUTF)
|
||||
endif()
|
||||
# pcre is bundled with openCollada
|
||||
#set(PCRE ${LIBDIR}/pcre)
|
||||
#set(PCRE_LIBPATH ${PCRE}/lib)
|
||||
set(PCRE_LIBRARIES pcre)
|
||||
#libxml2 is used
|
||||
#set(EXPAT ${LIBDIR}/expat)
|
||||
#set(EXPAT_LIBPATH ${EXPAT}/lib)
|
||||
set(EXPAT_LIB)
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
set(SDL ${LIBDIR}/sdl)
|
||||
set(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
set(SDL_LIBRARY SDL2)
|
||||
set(SDL_LIBPATH ${SDL}/lib)
|
||||
if(WITH_CXX11)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework ForceFeedback")
|
||||
else()
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lazy_framework ForceFeedback")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(PNG "${LIBDIR}/png")
|
||||
set(PNG_INCLUDE_DIRS "${PNG}/include")
|
||||
set(PNG_LIBPATH ${PNG}/lib)
|
||||
|
||||
set(JPEG "${LIBDIR}/jpeg")
|
||||
set(JPEG_INCLUDE_DIR "${JPEG}/include")
|
||||
set(JPEG_LIBPATH ${JPEG}/lib)
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
set(TIFF ${LIBDIR}/tiff)
|
||||
set(TIFF_INCLUDE_DIR ${TIFF}/include)
|
||||
set(TIFF_LIBRARY tiff)
|
||||
set(TIFF_LIBPATH ${TIFF}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
set(BOOST ${LIBDIR}/boost)
|
||||
set(BOOST_INCLUDE_DIR ${BOOST}/include)
|
||||
if(WITH_CXX11)
|
||||
set(BOOST_POSTFIX)
|
||||
else()
|
||||
set(BOOST_POSTFIX -mt)
|
||||
endif()
|
||||
set(BOOST_LIBRARIES
|
||||
boost_date_time${BOOST_POSTFIX}
|
||||
boost_filesystem${BOOST_POSTFIX}
|
||||
boost_regex${BOOST_POSTFIX}
|
||||
boost_system${BOOST_POSTFIX}
|
||||
boost_thread${BOOST_POSTFIX}
|
||||
boost_wave${BOOST_POSTFIX}
|
||||
)
|
||||
if(WITH_INTERNATIONAL)
|
||||
list(APPEND BOOST_LIBRARIES boost_locale${BOOST_POSTFIX})
|
||||
endif()
|
||||
if(WITH_CYCLES_NETWORK)
|
||||
list(APPEND BOOST_LIBRARIES boost_serialization${BOOST_POSTFIX})
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND BOOST_LIBRARIES boost_iostreams${BOOST_POSTFIX})
|
||||
endif()
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -liconv") # boost_locale and ffmpeg needs it !
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
set(OPENIMAGEIO ${LIBDIR}/openimageio)
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
|
||||
set(OPENIMAGEIO_LIBRARIES
|
||||
${OPENIMAGEIO}/lib/libOpenImageIO.a
|
||||
${PNG_LIBRARIES}
|
||||
${JPEG_LIBRARIES}
|
||||
${TIFF_LIBRARY}
|
||||
${OPENEXR_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
if(WITH_CXX11)
|
||||
set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${LIBDIR}/ffmpeg/lib/libwebp.a)
|
||||
endif()
|
||||
set(OPENIMAGEIO_LIBPATH
|
||||
${OPENIMAGEIO}/lib
|
||||
${JPEG_LIBPATH}
|
||||
${PNG_LIBPATH}
|
||||
${TIFF_LIBPATH}
|
||||
${OPENEXR_LIBPATH}
|
||||
${ZLIB_LIBPATH}
|
||||
)
|
||||
set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
|
||||
set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
set(OPENCOLORIO ${LIBDIR}/opencolorio)
|
||||
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
|
||||
set(OPENCOLORIO_LIBRARIES OpenColorIO tinyxml yaml-cpp)
|
||||
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
set(OPENVDB ${LIBDIR}/openvdb)
|
||||
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
|
||||
set(TBB_INCLUDE_DIRS ${LIBDIR}/tbb/include)
|
||||
set(TBB_LIBRARIES ${LIBDIR}/tbb/lib/libtbb.a)
|
||||
set(OPENVDB_LIBRARIES openvdb blosc ${TBB_LIBRARIES})
|
||||
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
|
||||
set(OPENVDB_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
|
||||
set(LLVM_VERSION "3.4" CACHE STRING "Version of LLVM to use")
|
||||
if(EXISTS "${LLVM_ROOT_DIR}/bin/llvm-config")
|
||||
set(LLVM_CONFIG "${LLVM_ROOT_DIR}/bin/llvm-config")
|
||||
else()
|
||||
set(LLVM_CONFIG llvm-config)
|
||||
endif()
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --version
|
||||
OUTPUT_VARIABLE LLVM_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --prefix
|
||||
OUTPUT_VARIABLE LLVM_ROOT_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --libdir
|
||||
OUTPUT_VARIABLE LLVM_LIBPATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
find_library(LLVM_LIBRARY
|
||||
NAMES LLVMAnalysis # first of a whole bunch of libs to get
|
||||
PATHS ${LLVM_LIBPATH})
|
||||
|
||||
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})
|
||||
else()
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lLLVM-3.4")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "LLVM not found.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
||||
|
||||
find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
|
||||
# WARNING! depends on correct order of OSL libs linking
|
||||
list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} -force_load ${OSL_LIB_EXEC} ${OSL_LIB_QUERY})
|
||||
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
|
||||
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
|
||||
|
||||
if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER)
|
||||
set(OSL_FOUND TRUE)
|
||||
else()
|
||||
message(STATUS "OSL not found")
|
||||
set(WITH_CYCLES_OSL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENMP)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} --version OUTPUT_VARIABLE COMPILER_VENDOR)
|
||||
string(SUBSTRING "${COMPILER_VENDOR}" 0 5 VENDOR_NAME) # truncate output
|
||||
if(${VENDOR_NAME} MATCHES "Apple") # Apple does not support OpenMP reliable with gcc and not with clang
|
||||
set(WITH_OPENMP OFF)
|
||||
else() # vanilla gcc or clang_omp support OpenMP
|
||||
message(STATUS "Using special OpenMP enabled compiler !") # letting find_package(OpenMP) module work for gcc
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang") # clang-omp in darwin libs
|
||||
set(OPENMP_FOUND ON)
|
||||
set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "C compiler flags for OpenMP parallization" FORCE)
|
||||
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "C++ compiler flags for OpenMP parallization" FORCE)
|
||||
include_directories(${LIBDIR}/openmp/include)
|
||||
link_directories(${LIBDIR}/openmp/lib)
|
||||
# This is a workaround for our helperbinaries ( datatoc, masgfmt, ... ),
|
||||
# They are linked also to omp lib, so we need it in builddir for runtime exexcution,
|
||||
# TODO: remove all unneeded dependencies from these
|
||||
|
||||
# for intermediate binaries, in respect to lib ID
|
||||
execute_process(
|
||||
COMMAND ditto -arch ${CMAKE_OSX_ARCHITECTURES}
|
||||
${LIBDIR}/openmp/lib/libiomp5.dylib
|
||||
${CMAKE_BINARY_DIR}/Resources/lib/libiomp5.dylib)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(EXETYPE MACOSX_BUNDLE)
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-fno-strict-aliasing -g")
|
||||
if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR CMAKE_OSX_ARCHITECTURES MATCHES "i386")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3")
|
||||
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ftree-vectorize -fvariable-expansion-in-unroller")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ftree-vectorize -fvariable-expansion-in-unroller")
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_C_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
|
||||
endif()
|
||||
|
||||
if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
|
||||
# Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
|
||||
endif()
|
||||
# Get rid of eventually clashes, we export some symbols explicite as local
|
||||
set(PLATFORM_LINKFLAGS
|
||||
"${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker ${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map"
|
||||
)
|
||||
|
||||
if(WITH_CXX11)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -stdlib=libc++")
|
||||
endif()
|
||||
|
||||
# Suppress ranlib "has no symbols" warnings (workaround for T48250)
|
||||
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
|
||||
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
|
@@ -1,428 +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.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for any *nix system including Linux and Unix.
|
||||
|
||||
macro(find_package_wrapper)
|
||||
if(WITH_STATIC_LIBS)
|
||||
find_package_static(${ARGV})
|
||||
else()
|
||||
find_package(${ARGV})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
find_package_wrapper(JPEG REQUIRED)
|
||||
find_package_wrapper(PNG REQUIRED)
|
||||
find_package_wrapper(ZLIB REQUIRED)
|
||||
find_package_wrapper(Freetype REQUIRED)
|
||||
|
||||
if(WITH_LZO AND WITH_SYSTEM_LZO)
|
||||
find_package_wrapper(LZO)
|
||||
if(NOT LZO_FOUND)
|
||||
message(FATAL_ERROR "Failed finding system LZO version!")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_SYSTEM_EIGEN3)
|
||||
find_package_wrapper(Eigen3)
|
||||
if(NOT EIGEN3_FOUND)
|
||||
message(FATAL_ERROR "Failed finding system Eigen3 version!")
|
||||
endif()
|
||||
endif()
|
||||
# else values are set below for all platforms
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# No way to set py35, remove for now.
|
||||
# find_package(PythonLibs)
|
||||
|
||||
# Use our own instead, since without py is such a rare case,
|
||||
# require this package
|
||||
# XXX Linking errors with debian static python :/
|
||||
# find_package_wrapper(PythonLibsUnix REQUIRED)
|
||||
find_package(PythonLibsUnix REQUIRED)
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
find_package_wrapper(OpenEXR) # our own module
|
||||
if(NOT OPENEXR_FOUND)
|
||||
set(WITH_IMAGE_OPENEXR OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENJPEG)
|
||||
find_package_wrapper(OpenJPEG)
|
||||
if(NOT OPENJPEG_FOUND)
|
||||
set(WITH_IMAGE_OPENJPEG OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
# XXX Linking errors with debian static tiff :/
|
||||
# find_package_wrapper(TIFF)
|
||||
find_package(TIFF)
|
||||
if(NOT TIFF_FOUND)
|
||||
set(WITH_IMAGE_TIFF OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Audio IO
|
||||
if(WITH_SYSTEM_AUDASPACE)
|
||||
find_package_wrapper(Audaspace)
|
||||
if(NOT AUDASPACE_FOUND OR NOT AUDASPACE_C_FOUND)
|
||||
message(FATAL_ERROR "Audaspace external library not found!")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENAL)
|
||||
find_package_wrapper(OpenAL)
|
||||
if(NOT OPENAL_FOUND)
|
||||
set(WITH_OPENAL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
if(WITH_SDL_DYNLOAD)
|
||||
set(SDL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/sdlew/include/SDL2")
|
||||
set(SDL_LIBRARY)
|
||||
else()
|
||||
find_package_wrapper(SDL2)
|
||||
if(SDL2_FOUND)
|
||||
# Use same names for both versions of SDL until we move to 2.x.
|
||||
set(SDL_INCLUDE_DIR "${SDL2_INCLUDE_DIR}")
|
||||
set(SDL_LIBRARY "${SDL2_LIBRARY}")
|
||||
set(SDL_FOUND "${SDL2_FOUND}")
|
||||
else()
|
||||
find_package_wrapper(SDL)
|
||||
endif()
|
||||
mark_as_advanced(
|
||||
SDL_INCLUDE_DIR
|
||||
SDL_LIBRARY
|
||||
)
|
||||
# unset(SDLMAIN_LIBRARY CACHE)
|
||||
if(NOT SDL_FOUND)
|
||||
set(WITH_SDL OFF)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
find_package_wrapper(Jack)
|
||||
if(NOT JACK_FOUND)
|
||||
set(WITH_JACK OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Codecs
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
find_package_wrapper(SndFile)
|
||||
if(NOT SNDFILE_FOUND)
|
||||
set(WITH_CODEC_SNDFILE OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG /usr CACHE PATH "FFMPEG Directory")
|
||||
set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
|
||||
|
||||
mark_as_advanced(FFMPEG)
|
||||
|
||||
# lame, but until we have proper find module for ffmpeg
|
||||
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
|
||||
if(EXISTS "${FFMPEG}/include/ffmpeg/")
|
||||
list(APPEND FFMPEG_INCLUDE_DIRS "${FFMPEG}/include/ffmpeg")
|
||||
endif()
|
||||
# end lameness
|
||||
|
||||
mark_as_advanced(FFMPEG_LIBRARIES)
|
||||
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_FFTW3)
|
||||
find_package_wrapper(Fftw3)
|
||||
if(NOT FFTW3_FOUND)
|
||||
set(WITH_FFTW3 OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
find_package_wrapper(OpenCOLLADA)
|
||||
if(OPENCOLLADA_FOUND)
|
||||
find_package_wrapper(XML2)
|
||||
find_package_wrapper(PCRE)
|
||||
else()
|
||||
set(WITH_OPENCOLLADA OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_MEM_JEMALLOC)
|
||||
find_package_wrapper(JeMalloc)
|
||||
if(NOT JEMALLOC_FOUND)
|
||||
set(WITH_MEM_JEMALLOC OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_INPUT_NDOF)
|
||||
find_package_wrapper(Spacenav)
|
||||
if(SPACENAV_FOUND)
|
||||
# use generic names within blenders buildsystem.
|
||||
set(NDOF_INCLUDE_DIRS ${SPACENAV_INCLUDE_DIRS})
|
||||
set(NDOF_LIBRARIES ${SPACENAV_LIBRARIES})
|
||||
else()
|
||||
set(WITH_INPUT_NDOF OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
||||
if(NOT OSL_ROOT)
|
||||
set(OSL_ROOT ${CYCLES_OSL})
|
||||
endif()
|
||||
find_package_wrapper(OpenShadingLanguage)
|
||||
if(OSL_FOUND)
|
||||
if(${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6")
|
||||
# Note: --whole-archive is needed to force loading of all symbols in liboslexec,
|
||||
# otherwise LLVM is missing the osl_allocate_closure_component function
|
||||
set(OSL_LIBRARIES
|
||||
${OSL_OSLCOMP_LIBRARY}
|
||||
-Wl,--whole-archive ${OSL_OSLEXEC_LIBRARY}
|
||||
-Wl,--no-whole-archive ${OSL_OSLQUERY_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "OSL not found, disabling it from Cycles")
|
||||
set(WITH_CYCLES_OSL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
find_package_wrapper(OpenVDB)
|
||||
find_package_wrapper(TBB)
|
||||
if(NOT OPENVDB_FOUND OR NOT TBB_FOUND)
|
||||
set(WITH_OPENVDB OFF)
|
||||
set(WITH_OPENVDB_BLOSC OFF)
|
||||
message(STATUS "OpenVDB not found, disabling it")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
find_package_wrapper(Alembic)
|
||||
|
||||
if(WITH_ALEMBIC_HDF5)
|
||||
set(HDF5_ROOT_DIR ${LIBDIR}/hdf5)
|
||||
find_package_wrapper(HDF5)
|
||||
endif()
|
||||
|
||||
if(NOT ALEMBIC_FOUND OR (WITH_ALEMBIC_HDF5 AND NOT HDF5_FOUND))
|
||||
set(WITH_ALEMBIC OFF)
|
||||
set(WITH_ALEMBIC_HDF5 OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
# uses in build instructions to override include and library variables
|
||||
if(NOT BOOST_CUSTOM)
|
||||
if(WITH_STATIC_LIBS)
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
endif()
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
set(__boost_packages filesystem regex thread date_time)
|
||||
if(WITH_CYCLES_OSL)
|
||||
if(NOT (${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6"))
|
||||
list(APPEND __boost_packages wave)
|
||||
else()
|
||||
endif()
|
||||
endif()
|
||||
if(WITH_INTERNATIONAL)
|
||||
list(APPEND __boost_packages locale)
|
||||
endif()
|
||||
if(WITH_CYCLES_NETWORK)
|
||||
list(APPEND __boost_packages serialization)
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND __boost_packages iostreams)
|
||||
endif()
|
||||
list(APPEND __boost_packages system)
|
||||
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
|
||||
if(NOT Boost_FOUND)
|
||||
# try to find non-multithreaded if -mt not found, this flag
|
||||
# doesn't matter for us, it has nothing to do with thread
|
||||
# safety, but keep it to not disturb build setups
|
||||
set(Boost_USE_MULTITHREADED OFF)
|
||||
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
|
||||
endif()
|
||||
unset(__boost_packages)
|
||||
if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU)
|
||||
find_package(IcuLinux)
|
||||
endif()
|
||||
mark_as_advanced(Boost_DIR) # why doesnt boost do this?
|
||||
endif()
|
||||
|
||||
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
||||
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
|
||||
set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS})
|
||||
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
find_package_wrapper(OpenImageIO)
|
||||
if(NOT OPENIMAGEIO_PUGIXML_FOUND AND WITH_CYCLES_STANDALONE)
|
||||
find_package_wrapper(PugiXML)
|
||||
else()
|
||||
set(PUGIXML_INCLUDE_DIR "${OPENIMAGEIO_INCLUDE_DIR/OpenImageIO}")
|
||||
set(PUGIXML_LIBRARIES "")
|
||||
endif()
|
||||
|
||||
set(OPENIMAGEIO_LIBRARIES
|
||||
${OPENIMAGEIO_LIBRARIES}
|
||||
${PNG_LIBRARIES}
|
||||
${JPEG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${BOOST_LIBRARIES}
|
||||
)
|
||||
set(OPENIMAGEIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
set(OPENIMAGEIO_DEFINITIONS "")
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
list(APPEND OPENIMAGEIO_LIBRARIES "${TIFF_LIBRARY}")
|
||||
endif()
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
list(APPEND OPENIMAGEIO_LIBRARIES "${OPENEXR_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
if(NOT OPENIMAGEIO_FOUND)
|
||||
set(WITH_OPENIMAGEIO OFF)
|
||||
message(STATUS "OpenImageIO not found, disabling WITH_CYCLES")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
find_package_wrapper(OpenColorIO)
|
||||
|
||||
set(OPENCOLORIO_LIBRARIES ${OPENCOLORIO_LIBRARIES})
|
||||
set(OPENCOLORIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
set(OPENCOLORIO_DEFINITIONS)
|
||||
|
||||
if(NOT OPENCOLORIO_FOUND)
|
||||
set(WITH_OPENCOLORIO OFF)
|
||||
message(STATUS "OpenColorIO not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
find_package_wrapper(LLVM)
|
||||
|
||||
if(NOT LLVM_FOUND)
|
||||
set(WITH_LLVM OFF)
|
||||
message(STATUS "LLVM not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM OR WITH_SDL_DYNLOAD)
|
||||
# Fix for conflict with Mesa llvmpipe
|
||||
set(PLATFORM_LINKFLAGS
|
||||
"${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
|
||||
find_package_wrapper(OpenSubdiv)
|
||||
|
||||
set(OPENSUBDIV_LIBRARIES ${OPENSUBDIV_LIBRARIES})
|
||||
set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
|
||||
if(NOT OPENSUBDIV_FOUND)
|
||||
set(WITH_OPENSUBDIV OFF)
|
||||
set(WITH_CYCLES_OPENSUBDIV OFF)
|
||||
message(STATUS "OpenSubdiv not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
|
||||
list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm)
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
list(APPEND PLATFORM_LINKLIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||
# used by other platforms
|
||||
set(PTHREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
if(CMAKE_DL_LIBS)
|
||||
list(APPEND PLATFORM_LINKLIBS ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
if(NOT WITH_PYTHON_MODULE)
|
||||
# binreloc is linux only
|
||||
set(BINRELOC_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/binreloc/include)
|
||||
set(WITH_BINRELOC ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# lfs on glibc, all compilers should use
|
||||
add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
|
||||
|
||||
# GNU Compiler
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||
|
||||
if(WITH_LINKER_GOLD)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version
|
||||
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
|
||||
if("${LD_VERSION}" MATCHES "GNU gold")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
|
||||
else()
|
||||
message(STATUS "GNU gold linker isn't available, using the default system linker.")
|
||||
endif()
|
||||
unset(LD_VERSION)
|
||||
endif()
|
||||
|
||||
# CLang is the same as GCC for now.
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||
# Solaris CC
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "SunPro")
|
||||
set(PLATFORM_CFLAGS "-pipe -features=extensions -fPIC -D__FUNCTION__=__func__")
|
||||
|
||||
# Intel C++ Compiler
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
# think these next two are broken
|
||||
find_program(XIAR xiar)
|
||||
if(XIAR)
|
||||
set(CMAKE_AR "${XIAR}")
|
||||
endif()
|
||||
mark_as_advanced(XIAR)
|
||||
|
||||
find_program(XILD xild)
|
||||
if(XILD)
|
||||
set(CMAKE_LINKER "${XILD}")
|
||||
endif()
|
||||
mark_as_advanced(XILD)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp-model precise -prec_div -parallel")
|
||||
|
||||
# set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -diag-enable sc3")
|
||||
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel")
|
||||
endif()
|
@@ -1,87 +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.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for Windows.
|
||||
|
||||
add_definitions(-DWIN32)
|
||||
|
||||
if(MSVC)
|
||||
include(platform_win32_msvc)
|
||||
elseif(CMAKE_COMPILER_IS_GNUCC)
|
||||
include(platform_win32_mingw)
|
||||
endif()
|
||||
|
||||
# Things common to both mingw and MSVC should go here
|
||||
|
||||
set(WINTAB_INC ${LIBDIR}/wintab/include)
|
||||
|
||||
if(WITH_OPENAL)
|
||||
set(OPENAL ${LIBDIR}/openal)
|
||||
set(OPENALDIR ${LIBDIR}/openal)
|
||||
set(OPENAL_INCLUDE_DIR ${OPENAL}/include)
|
||||
if(MSVC)
|
||||
set(OPENAL_LIBRARY openal32)
|
||||
else()
|
||||
set(OPENAL_LIBRARY wrap_oal)
|
||||
endif()
|
||||
set(OPENAL_LIBPATH ${OPENAL}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
set(SNDFILE ${LIBDIR}/sndfile)
|
||||
set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
|
||||
set(SNDFILE_LIBRARIES libsndfile-1)
|
||||
set(SNDFILE_LIBPATH ${SNDFILE}/lib) # TODO, deprecate
|
||||
endif()
|
||||
|
||||
if(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
|
||||
add_definitions(-D__SSE__ -D__MMX__)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
||||
|
||||
find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_EXEC_DEBUG NAMES oslexec_d PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_COMP_DEBUG NAMES oslcomp_d PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_QUERY_DEBUG NAMES oslquery_d PATHS ${CYCLES_OSL}/lib)
|
||||
list(APPEND OSL_LIBRARIES
|
||||
optimized ${OSL_LIB_COMP}
|
||||
optimized ${OSL_LIB_EXEC}
|
||||
optimized ${OSL_LIB_QUERY}
|
||||
debug ${OSL_LIB_EXEC_DEBUG}
|
||||
debug ${OSL_LIB_COMP_DEBUG}
|
||||
debug ${OSL_LIB_QUERY_DEBUG}
|
||||
)
|
||||
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
|
||||
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
|
||||
|
||||
if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER)
|
||||
set(OSL_FOUND TRUE)
|
||||
else()
|
||||
message(STATUS "OSL not found")
|
||||
set(WITH_CYCLES_OSL OFF)
|
||||
endif()
|
||||
endif()
|
@@ -1,302 +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.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for Windows when compiling with MinGW.
|
||||
|
||||
# keep GCC specific stuff here
|
||||
include(CheckCSourceCompiles)
|
||||
# Setup 64bit and 64bit windows systems
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#ifndef __MINGW64__
|
||||
#error
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
"
|
||||
WITH_MINGW64
|
||||
)
|
||||
|
||||
if(NOT DEFINED LIBDIR)
|
||||
if(WITH_MINGW64)
|
||||
message(STATUS "Compiling for 64 bit with MinGW-w64.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64)
|
||||
else()
|
||||
message(STATUS "Compiling for 32 bit with MinGW-w32.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
|
||||
|
||||
if(WITH_RAYOPTIMIZATION)
|
||||
message(WARNING "MinGW-w32 is known to be unstable with 'WITH_RAYOPTIMIZATION' option enabled.")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
|
||||
endif()
|
||||
if(NOT EXISTS "${LIBDIR}/")
|
||||
message(FATAL_ERROR "Windows requires pre-compiled libs at: '${LIBDIR}'")
|
||||
endif()
|
||||
|
||||
list(APPEND PLATFORM_LINKLIBS
|
||||
-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32
|
||||
-lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi -ldbghelp
|
||||
)
|
||||
|
||||
if(WITH_INPUT_IME)
|
||||
list(APPEND PLATFORM_LINKLIBS -limm32)
|
||||
endif()
|
||||
|
||||
set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
|
||||
|
||||
if(WITH_MINGW64)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
|
||||
list(APPEND PLATFORM_LINKLIBS -lpthread)
|
||||
|
||||
add_definitions(-DFREE_WINDOWS64 -DMS_WIN64)
|
||||
endif()
|
||||
|
||||
add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
|
||||
|
||||
add_definitions(-DFREE_WINDOWS)
|
||||
|
||||
set(PNG "${LIBDIR}/png")
|
||||
set(PNG_INCLUDE_DIRS "${PNG}/include")
|
||||
set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
|
||||
|
||||
if(WITH_MINGW64)
|
||||
set(JPEG_LIBRARIES jpeg)
|
||||
else()
|
||||
set(JPEG_LIBRARIES libjpeg)
|
||||
endif()
|
||||
set(PNG_LIBRARIES png)
|
||||
|
||||
set(ZLIB ${LIBDIR}/zlib)
|
||||
set(ZLIB_INCLUDE_DIRS ${ZLIB}/include)
|
||||
set(ZLIB_LIBPATH ${ZLIB}/lib)
|
||||
set(ZLIB_LIBRARIES z)
|
||||
|
||||
set(JPEG "${LIBDIR}/jpeg")
|
||||
set(JPEG_INCLUDE_DIR "${JPEG}/include")
|
||||
set(JPEG_LIBPATH ${JPEG}/lib) # not cmake defined
|
||||
|
||||
# comes with own pthread library
|
||||
if(NOT WITH_MINGW64)
|
||||
set(PTHREADS ${LIBDIR}/pthreads)
|
||||
#set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
|
||||
set(PTHREADS_LIBPATH ${PTHREADS}/lib)
|
||||
set(PTHREADS_LIBRARIES pthreadGC2)
|
||||
endif()
|
||||
|
||||
set(FREETYPE ${LIBDIR}/freetype)
|
||||
set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
|
||||
set(FREETYPE_LIBPATH ${FREETYPE}/lib)
|
||||
set(FREETYPE_LIBRARY freetype)
|
||||
|
||||
if(WITH_FFTW3)
|
||||
set(FFTW3 ${LIBDIR}/fftw3)
|
||||
set(FFTW3_LIBRARIES fftw3)
|
||||
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
|
||||
set(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
set(OPENCOLLADA ${LIBDIR}/opencollada)
|
||||
set(OPENCOLLADA_INCLUDE_DIRS
|
||||
${OPENCOLLADA}/include/opencollada/COLLADAStreamWriter
|
||||
${OPENCOLLADA}/include/opencollada/COLLADABaseUtils
|
||||
${OPENCOLLADA}/include/opencollada/COLLADAFramework
|
||||
${OPENCOLLADA}/include/opencollada/COLLADASaxFrameworkLoader
|
||||
${OPENCOLLADA}/include/opencollada/GeneratedSaxParser
|
||||
)
|
||||
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib/opencollada)
|
||||
set(OPENCOLLADA_LIBRARIES
|
||||
OpenCOLLADAStreamWriter
|
||||
OpenCOLLADASaxFrameworkLoader
|
||||
OpenCOLLADAFramework
|
||||
OpenCOLLADABaseUtils
|
||||
GeneratedSaxParser
|
||||
UTF MathMLSolver buffer ftoa xml
|
||||
)
|
||||
set(PCRE_LIBRARIES pcre)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG ${LIBDIR}/ffmpeg)
|
||||
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
|
||||
if(WITH_MINGW64)
|
||||
set(FFMPEG_LIBRARIES avcodec.dll avformat.dll avdevice.dll avutil.dll swscale.dll swresample.dll)
|
||||
else()
|
||||
set(FFMPEG_LIBRARIES avcodec-55 avformat-55 avdevice-55 avutil-52 swscale-2)
|
||||
endif()
|
||||
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
set(OPENEXR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
|
||||
set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
|
||||
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
set(TIFF ${LIBDIR}/tiff)
|
||||
set(TIFF_LIBRARY tiff)
|
||||
set(TIFF_INCLUDE_DIR ${TIFF}/include)
|
||||
set(TIFF_LIBPATH ${TIFF}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
set(JACK ${LIBDIR}/jack)
|
||||
set(JACK_INCLUDE_DIRS ${JACK}/include/jack ${JACK}/include)
|
||||
set(JACK_LIBRARIES jack)
|
||||
set(JACK_LIBPATH ${JACK}/lib)
|
||||
|
||||
# TODO, gives linking errors, force off
|
||||
set(WITH_JACK OFF)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# normally cached but not since we include them with blender
|
||||
set(PYTHON_VERSION 3.5) # CACHE STRING)
|
||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}") # CACHE PATH)
|
||||
set(PYTHON_LIBRARY "${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}mw.lib") # CACHE FILEPATH)
|
||||
unset(_PYTHON_VERSION_NO_DOTS)
|
||||
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
set(BOOST ${LIBDIR}/boost)
|
||||
set(BOOST_INCLUDE_DIR ${BOOST}/include)
|
||||
if(WITH_MINGW64)
|
||||
set(BOOST_POSTFIX "mgw47-mt-s-1_49")
|
||||
set(BOOST_DEBUG_POSTFIX "mgw47-mt-sd-1_49")
|
||||
else()
|
||||
set(BOOST_POSTFIX "mgw46-mt-s-1_49")
|
||||
set(BOOST_DEBUG_POSTFIX "mgw46-mt-sd-1_49")
|
||||
endif()
|
||||
set(BOOST_LIBRARIES
|
||||
optimized boost_date_time-${BOOST_POSTFIX} boost_filesystem-${BOOST_POSTFIX}
|
||||
boost_regex-${BOOST_POSTFIX}
|
||||
boost_system-${BOOST_POSTFIX} boost_thread-${BOOST_POSTFIX}
|
||||
debug boost_date_time-${BOOST_DEBUG_POSTFIX} boost_filesystem-${BOOST_DEBUG_POSTFIX}
|
||||
boost_regex-${BOOST_DEBUG_POSTFIX}
|
||||
boost_system-${BOOST_DEBUG_POSTFIX} boost_thread-${BOOST_DEBUG_POSTFIX})
|
||||
if(WITH_INTERNATIONAL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized boost_locale-${BOOST_POSTFIX}
|
||||
debug boost_locale-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
endif()
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized boost_wave-${BOOST_POSTFIX}
|
||||
debug boost_wave-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
endif()
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB -DBOOST_THREAD_USE_LIB ")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
set(OPENIMAGEIO ${LIBDIR}/openimageio)
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
|
||||
set(OPENIMAGEIO_LIBRARIES OpenImageIO)
|
||||
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
|
||||
set(OPENIMAGEIO_DEFINITIONS "")
|
||||
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
|
||||
set(LLVM_LIBPATH ${LLVM_ROOT_DIR}/lib)
|
||||
# Explicitly set llvm lib order.
|
||||
#---- WARNING ON GCC ORDER OF LIBS IS IMPORTANT, DO NOT CHANGE! ---------
|
||||
set(LLVM_LIBRARY LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMAnalysis LLVMArchive
|
||||
LLVMAsmParser LLVMAsmPrinter
|
||||
LLVMBitReader LLVMBitWriter
|
||||
LLVMDebugInfo LLVMExecutionEngine
|
||||
LLVMInstCombine LLVMInstrumentation
|
||||
LLVMInterpreter LLVMJIT
|
||||
LLVMLinker LLVMMC
|
||||
LLVMMCDisassembler LLVMMCJIT
|
||||
LLVMMCParser LLVMObject
|
||||
LLVMRuntimeDyld
|
||||
LLVMSupport
|
||||
LLVMTableGen LLVMTarget
|
||||
LLVMTransformUtils LLVMVectorize
|
||||
LLVMX86AsmParser LLVMX86AsmPrinter
|
||||
LLVMX86CodeGen LLVMX86Desc
|
||||
LLVMX86Disassembler LLVMX86Info
|
||||
LLVMX86Utils LLVMipa
|
||||
LLVMipo LLVMCore)
|
||||
# imagehelp is needed by LLVM 3.1 on MinGW, check lib\Support\Windows\Signals.inc
|
||||
list(APPEND PLATFORM_LINKLIBS -limagehlp)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
set(OPENCOLORIO ${LIBDIR}/opencolorio)
|
||||
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
|
||||
set(OPENCOLORIO_LIBRARIES OpenColorIO)
|
||||
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
|
||||
set(OPENCOLORIO_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
set(SDL ${LIBDIR}/sdl)
|
||||
set(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
set(SDL_LIBRARY SDL)
|
||||
set(SDL_LIBPATH ${SDL}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
set(OPENVDB ${LIBDIR}/openvdb)
|
||||
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
|
||||
set(OPENVDB_LIBRARIES openvdb ${TBB_LIBRARIES})
|
||||
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
|
||||
set(OPENVDB_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
# TODO(sergey): For until someone drops by and compiles libraries for
|
||||
# MinGW we allow users to compile their own Alembic library and use
|
||||
# that via find_package(),
|
||||
#
|
||||
# Once precompiled libraries are there we'll use hardcoded locations.
|
||||
find_package_wrapper(Alembic)
|
||||
if(WITH_ALEMBIC_HDF5)
|
||||
set(HDF5_ROOT_DIR ${LIBDIR}/hdf5)
|
||||
find_package_wrapper(HDF5)
|
||||
endif()
|
||||
if(NOT ALEMBIC_FOUND OR (WITH_ALEMBIC_HDF5 AND NOT HDF5_FOUND))
|
||||
set(WITH_ALEMBIC OFF)
|
||||
set(WITH_ALEMBIC_HDF5 OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(PLATFORM_LINKFLAGS "-Xlinker --stack=2097152")
|
||||
|
||||
## DISABLE - causes linking errors
|
||||
## for re-distribution, so users dont need mingw installed
|
||||
# set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-libgcc -static-libstdc++")
|
@@ -1,500 +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.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for Windows when compiling with MSVC.
|
||||
|
||||
macro(warn_hardcoded_paths package_name
|
||||
)
|
||||
if(WITH_WINDOWS_FIND_MODULES)
|
||||
message(WARNING "Using HARDCODED ${package_name} locations")
|
||||
endif(WITH_WINDOWS_FIND_MODULES)
|
||||
endmacro()
|
||||
|
||||
macro(windows_find_package package_name
|
||||
)
|
||||
if(WITH_WINDOWS_FIND_MODULES)
|
||||
find_package( ${package_name})
|
||||
endif(WITH_WINDOWS_FIND_MODULES)
|
||||
endmacro()
|
||||
|
||||
add_definitions(-DWIN32)
|
||||
# Minimum MSVC Version
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
if(MSVC_VERSION EQUAL 1800)
|
||||
set(_min_ver "18.0.31101")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${_min_ver})
|
||||
message(FATAL_ERROR
|
||||
"Visual Studio 2013 (Update 4, ${_min_ver}) required, "
|
||||
"found (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
endif()
|
||||
endif()
|
||||
if(MSVC_VERSION EQUAL 1900)
|
||||
set(_min_ver "19.0.24210")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${_min_ver})
|
||||
message(FATAL_ERROR
|
||||
"Visual Studio 2015 (Update 3, ${_min_ver}) required, "
|
||||
"found (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
unset(_min_ver)
|
||||
|
||||
# needed for some MSVC installations
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
|
||||
|
||||
list(APPEND PLATFORM_LINKLIBS
|
||||
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32
|
||||
advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp
|
||||
)
|
||||
|
||||
if(WITH_INPUT_IME)
|
||||
list(APPEND PLATFORM_LINKLIBS imm32)
|
||||
endif()
|
||||
|
||||
add_definitions(
|
||||
-D_CRT_NONSTDC_NO_DEPRECATE
|
||||
-D_CRT_SECURE_NO_DEPRECATE
|
||||
-D_SCL_SECURE_NO_DEPRECATE
|
||||
-D_CONSOLE
|
||||
-D_LIB
|
||||
)
|
||||
|
||||
# MSVC11 needs _ALLOW_KEYWORD_MACROS to build
|
||||
add_definitions(-D_ALLOW_KEYWORD_MACROS)
|
||||
|
||||
# We want to support Vista level ABI
|
||||
add_definitions(-D_WIN32_WINNT=0x600)
|
||||
|
||||
# Make cmake find the msvc redistributables
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MT")
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MT")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT")
|
||||
|
||||
set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO ")
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib ")
|
||||
|
||||
# Ignore meaningless for us linker warnings.
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /ignore:4049 /ignore:4217 /ignore:4221")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
|
||||
|
||||
# MSVC only, Mingw doesnt need
|
||||
if(CMAKE_CL_64)
|
||||
set(PLATFORM_LINKFLAGS "/MACHINE:X64 ${PLATFORM_LINKFLAGS}")
|
||||
else()
|
||||
set(PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ${PLATFORM_LINKFLAGS}")
|
||||
endif()
|
||||
|
||||
set(PLATFORM_LINKFLAGS_DEBUG "/IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
|
||||
|
||||
if(NOT DEFINED LIBDIR)
|
||||
|
||||
# Setup 64bit and 64bit windows systems
|
||||
if(CMAKE_CL_64)
|
||||
message(STATUS "64 bit compiler detected.")
|
||||
set(LIBDIR_BASE "win64")
|
||||
else()
|
||||
message(STATUS "32 bit compiler detected.")
|
||||
set(LIBDIR_BASE "windows")
|
||||
endif()
|
||||
if(MSVC_VERSION EQUAL 1910)
|
||||
message(STATUS "Visual Studio 2017 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
|
||||
elseif(MSVC_VERSION EQUAL 1900)
|
||||
message(STATUS "Visual Studio 2015 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
|
||||
else()
|
||||
message(STATUS "Visual Studio 2013 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc12)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
|
||||
endif()
|
||||
if(NOT EXISTS "${LIBDIR}/")
|
||||
message(FATAL_ERROR "Windows requires pre-compiled libs at: '${LIBDIR}'")
|
||||
endif()
|
||||
|
||||
# Add each of our libraries to our cmake_prefix_path so find_package() could work
|
||||
file(GLOB children RELATIVE ${LIBDIR} ${LIBDIR}/*)
|
||||
foreach(child ${children})
|
||||
if(IS_DIRECTORY ${LIBDIR}/${child})
|
||||
list(APPEND CMAKE_PREFIX_PATH ${LIBDIR}/${child})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include)
|
||||
set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/libz_st.lib)
|
||||
set(ZLIB_INCLUDE_DIR ${LIBDIR}/zlib/include)
|
||||
set(ZLIB_LIBRARY ${LIBDIR}/zlib/lib/libz_st.lib)
|
||||
set(ZLIB_DIR ${LIBDIR}/zlib)
|
||||
|
||||
windows_find_package(zlib) # we want to find before finding things that depend on it like png
|
||||
windows_find_package(png)
|
||||
|
||||
if(NOT PNG_FOUND)
|
||||
warn_hardcoded_paths(libpng)
|
||||
set(PNG_PNG_INCLUDE_DIR ${LIBDIR}/png/include)
|
||||
set(PNG_LIBRARIES libpng)
|
||||
set(PNG "${LIBDIR}/png")
|
||||
set(PNG_INCLUDE_DIRS "${PNG}/include")
|
||||
set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
|
||||
endif()
|
||||
|
||||
set(JPEG_NAMES ${JPEG_NAMES} libjpeg)
|
||||
windows_find_package(jpeg REQUIRED)
|
||||
if(NOT JPEG_FOUND)
|
||||
warn_hardcoded_paths(jpeg)
|
||||
set(JPEG_INCLUDE_DIR ${LIBDIR}/jpeg/include)
|
||||
set(JPEG_LIBRARIES ${LIBDIR}/jpeg/lib/libjpeg.lib)
|
||||
endif()
|
||||
|
||||
set(PTHREADS_INCLUDE_DIRS ${LIBDIR}/pthreads/include)
|
||||
set(PTHREADS_LIBRARIES ${LIBDIR}/pthreads/lib/pthreadVC2.lib)
|
||||
|
||||
set(FREETYPE ${LIBDIR}/freetype)
|
||||
set(FREETYPE_INCLUDE_DIRS
|
||||
${LIBDIR}/freetype/include
|
||||
${LIBDIR}/freetype/include/freetype2
|
||||
)
|
||||
set(FREETYPE_LIBRARY ${LIBDIR}/freetype/lib/freetype2ST.lib)
|
||||
windows_find_package(freetype REQUIRED)
|
||||
|
||||
if(WITH_FFTW3)
|
||||
set(FFTW3 ${LIBDIR}/fftw3)
|
||||
set(FFTW3_LIBRARIES libfftw)
|
||||
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
|
||||
set(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
set(OPENCOLLADA ${LIBDIR}/opencollada)
|
||||
|
||||
set(OPENCOLLADA_INCLUDE_DIRS
|
||||
${OPENCOLLADA}/include/opencollada/COLLADAStreamWriter
|
||||
${OPENCOLLADA}/include/opencollada/COLLADABaseUtils
|
||||
${OPENCOLLADA}/include/opencollada/COLLADAFramework
|
||||
${OPENCOLLADA}/include/opencollada/COLLADASaxFrameworkLoader
|
||||
${OPENCOLLADA}/include/opencollada/GeneratedSaxParser
|
||||
)
|
||||
|
||||
set(OPENCOLLADA_LIBRARIES
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADAFramework.lib
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADABaseUtils.lib
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADAStreamWriter.lib
|
||||
${OPENCOLLADA}/lib/opencollada/MathMLSolver.lib
|
||||
${OPENCOLLADA}/lib/opencollada/GeneratedSaxParser.lib
|
||||
${OPENCOLLADA}/lib/opencollada/xml.lib
|
||||
${OPENCOLLADA}/lib/opencollada/buffer.lib
|
||||
${OPENCOLLADA}/lib/opencollada/ftoa.lib
|
||||
)
|
||||
|
||||
if(NOT WITH_LLVM)
|
||||
list(APPEND OPENCOLLADA_LIBRARIES ${OPENCOLLADA}/lib/opencollada/UTF.lib)
|
||||
endif()
|
||||
|
||||
set(PCRE_LIBRARIES
|
||||
${OPENCOLLADA}/lib/opencollada/pcre.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG_INCLUDE_DIRS
|
||||
${LIBDIR}/ffmpeg/include
|
||||
${LIBDIR}/ffmpeg/include/msvc
|
||||
)
|
||||
windows_find_package(FFMPEG)
|
||||
if(NOT FFMPEG_FOUND)
|
||||
warn_hardcoded_paths(ffmpeg)
|
||||
set(FFMPEG_LIBRARY_VERSION 57)
|
||||
set(FFMPEG_LIBRARY_VERSION_AVU 55)
|
||||
set(FFMPEG_LIBRARIES
|
||||
${LIBDIR}/ffmpeg/lib/avcodec.lib
|
||||
${LIBDIR}/ffmpeg/lib/avformat.lib
|
||||
${LIBDIR}/ffmpeg/lib/avdevice.lib
|
||||
${LIBDIR}/ffmpeg/lib/avutil.lib
|
||||
${LIBDIR}/ffmpeg/lib/swscale.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
set(OPENEXR_ROOT_DIR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_VERSION "2.1")
|
||||
windows_find_package(OPENEXR REQUIRED)
|
||||
if(NOT OPENEXR_FOUND)
|
||||
warn_hardcoded_paths(OpenEXR)
|
||||
set(OPENEXR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR}/include/OpenEXR)
|
||||
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
set(OPENEXR_LIBRARIES
|
||||
optimized ${OPENEXR_LIBPATH}/Iex-2_2.lib
|
||||
optimized ${OPENEXR_LIBPATH}/Half.lib
|
||||
optimized ${OPENEXR_LIBPATH}/IlmImf-2_2.lib
|
||||
optimized ${OPENEXR_LIBPATH}/Imath-2_2.lib
|
||||
optimized ${OPENEXR_LIBPATH}/IlmThread-2_2.lib
|
||||
debug ${OPENEXR_LIBPATH}/Iex-2_2_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/Half_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/IlmImf-2_2_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/Imath-2_2_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/IlmThread-2_2_d.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
# Try to find tiff first then complain and set static and maybe wrong paths
|
||||
windows_find_package(TIFF)
|
||||
if(NOT TIFF_FOUND)
|
||||
warn_hardcoded_paths(libtiff)
|
||||
set(TIFF_LIBRARY ${LIBDIR}/tiff/lib/libtiff.lib)
|
||||
set(TIFF_INCLUDE_DIR ${LIBDIR}/tiff/include)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
set(JACK_INCLUDE_DIRS
|
||||
${LIBDIR}/jack/include/jack
|
||||
${LIBDIR}/jack/include
|
||||
)
|
||||
set(JACK_LIBRARIES optimized ${LIBDIR}/jack/lib/libjack.lib debug ${LIBDIR}/jack/lib/libjack_d.lib)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
set(PYTHON_VERSION 3.5) # CACHE STRING)
|
||||
|
||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
# Use shared libs for vc2008 and vc2010 until we actually have vc2010 libs
|
||||
set(PYTHON_LIBRARY ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.lib)
|
||||
unset(_PYTHON_VERSION_NO_DOTS)
|
||||
|
||||
# Shared includes for both vc2008 and vc2010
|
||||
set(PYTHON_INCLUDE_DIR ${LIBDIR}/python/include/python${PYTHON_VERSION})
|
||||
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(boost_extra_libs wave)
|
||||
endif()
|
||||
if(WITH_INTERNATIONAL)
|
||||
list(APPEND boost_extra_libs locale)
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND boost_extra_libs iostreams)
|
||||
endif()
|
||||
set(Boost_USE_STATIC_RUNTIME ON) # prefix lib
|
||||
set(Boost_USE_MULTITHREADED ON) # suffix -mt
|
||||
set(Boost_USE_STATIC_LIBS ON) # suffix -s
|
||||
if (WITH_WINDOWS_FIND_MODULES)
|
||||
find_package(Boost COMPONENTS date_time filesystem thread regex system ${boost_extra_libs})
|
||||
endif (WITH_WINDOWS_FIND_MODULES)
|
||||
if(NOT Boost_FOUND)
|
||||
warn_hardcoded_paths(BOOST)
|
||||
set(BOOST ${LIBDIR}/boost)
|
||||
set(BOOST_INCLUDE_DIR ${BOOST}/include)
|
||||
if(MSVC12)
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_POSTFIX "vc120-mt-s-1_60.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc120-mt-sgd-1_60.lib")
|
||||
else()
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_POSTFIX "vc140-mt-s-1_60.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc140-mt-sgd-1_60.lib")
|
||||
endif()
|
||||
set(BOOST_LIBRARIES
|
||||
optimized libboost_date_time-${BOOST_POSTFIX}
|
||||
optimized libboost_filesystem-${BOOST_POSTFIX}
|
||||
optimized libboost_regex-${BOOST_POSTFIX}
|
||||
optimized libboost_system-${BOOST_POSTFIX}
|
||||
optimized libboost_thread-${BOOST_POSTFIX}
|
||||
debug libboost_date_time-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_filesystem-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_regex-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_system-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_thread-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized libboost_wave-${BOOST_POSTFIX}
|
||||
debug libboost_wave-${BOOST_DEBUG_POSTFIX})
|
||||
endif()
|
||||
if(WITH_INTERNATIONAL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized libboost_locale-${BOOST_POSTFIX}
|
||||
debug libboost_locale-${BOOST_DEBUG_POSTFIX})
|
||||
endif()
|
||||
else() # we found boost using find_package
|
||||
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
||||
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
|
||||
set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS})
|
||||
endif()
|
||||
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
windows_find_package(OpenImageIO)
|
||||
set(OPENIMAGEIO ${LIBDIR}/openimageio)
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
|
||||
set(OIIO_OPTIMIZED optimized OpenImageIO optimized OpenImageIO_Util)
|
||||
set(OIIO_DEBUG debug OpenImageIO_d debug OpenImageIO_Util_d)
|
||||
set(OPENIMAGEIO_LIBRARIES ${OIIO_OPTIMIZED} ${OIIO_DEBUG})
|
||||
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
|
||||
set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
|
||||
set(OPENCOLORIO_DEFINITIONS "-DOCIO_STATIC_BUILD")
|
||||
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
|
||||
add_definitions(-DOIIO_STATIC_BUILD)
|
||||
add_definitions(-DOIIO_NO_SSE=1)
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
|
||||
file(GLOB LLVM_LIBRARY_OPTIMIZED ${LLVM_ROOT_DIR}/lib/*.lib)
|
||||
|
||||
if(EXISTS ${LLVM_ROOT_DIR}/debug/lib)
|
||||
foreach(LLVM_OPTIMIZED_LIB ${LLVM_LIBRARY_OPTIMIZED})
|
||||
get_filename_component(LIBNAME ${LLVM_OPTIMIZED_LIB} ABSOLUTE)
|
||||
list(APPEND LLVM_LIBS optimized ${LIBNAME})
|
||||
endforeach(LLVM_OPTIMIZED_LIB)
|
||||
|
||||
file(GLOB LLVM_LIBRARY_DEBUG ${LLVM_ROOT_DIR}/debug/lib/*.lib)
|
||||
|
||||
foreach(LLVM_DEBUG_LIB ${LLVM_LIBRARY_DEBUG})
|
||||
get_filename_component(LIBNAME ${LLVM_DEBUG_LIB} ABSOLUTE)
|
||||
list(APPEND LLVM_LIBS debug ${LIBNAME})
|
||||
endforeach(LLVM_DEBUG_LIB)
|
||||
|
||||
set(LLVM_LIBRARY ${LLVM_LIBS})
|
||||
else()
|
||||
message(WARNING "LLVM debug libs not present on this system. Using release libs for debug builds.")
|
||||
set(LLVM_LIBRARY ${LLVM_LIBRARY_OPTIMIZED})
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
set(OPENCOLORIO ${LIBDIR}/opencolorio)
|
||||
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
|
||||
set(OPENCOLORIO_LIBRARIES OpenColorIO)
|
||||
set(OPENCOLORIO_LIBPATH ${LIBDIR}/opencolorio/lib)
|
||||
set(OPENCOLORIO_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
set(BLOSC_LIBRARIES optimized ${LIBDIR}/blosc/lib/libblosc.lib debug ${LIBDIR}/blosc/lib/libblosc_d.lib)
|
||||
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
|
||||
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
|
||||
set(OPENVDB ${LIBDIR}/openvdb)
|
||||
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include ${TBB_INCLUDE_DIR})
|
||||
set(OPENVDB_LIBRARIES optimized openvdb debug openvdb_d ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
|
||||
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
set(ALEMBIC ${LIBDIR}/alembic)
|
||||
set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
|
||||
set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
|
||||
set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
|
||||
set(ALEMBIC_LIBRARIES optimized alembic debug alembic_d)
|
||||
endif()
|
||||
|
||||
if(WITH_MOD_CLOTH_ELTOPO)
|
||||
set(LAPACK ${LIBDIR}/lapack)
|
||||
# set(LAPACK_INCLUDE_DIR ${LAPACK}/include)
|
||||
set(LAPACK_LIBPATH ${LAPACK}/lib)
|
||||
set(LAPACK_LIBRARIES
|
||||
${LIBDIR}/lapack/lib/libf2c.lib
|
||||
${LIBDIR}/lapack/lib/clapack_nowrap.lib
|
||||
${LIBDIR}/lapack/lib/BLAS_nowrap.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
|
||||
set(OPENSUBDIV_INCLUDE_DIR ${LIBDIR}/opensubdiv/include)
|
||||
set(OPENSUBDIV_LIBPATH ${LIBDIR}/opensubdiv/lib)
|
||||
set(OPENSUBDIV_LIBRARIES optimized ${OPENSUBDIV_LIBPATH}/osdCPU.lib
|
||||
optimized ${OPENSUBDIV_LIBPATH}/osdGPU.lib
|
||||
debug ${OPENSUBDIV_LIBPATH}/osdCPU_d.lib
|
||||
debug ${OPENSUBDIV_LIBPATH}/osdGPU_d.lib
|
||||
)
|
||||
set(OPENSUBDIV_HAS_OPENMP TRUE)
|
||||
set(OPENSUBDIV_HAS_TBB FALSE)
|
||||
set(OPENSUBDIV_HAS_OPENCL TRUE)
|
||||
set(OPENSUBDIV_HAS_CUDA FALSE)
|
||||
set(OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK TRUE)
|
||||
set(OPENSUBDIV_HAS_GLSL_COMPUTE TRUE)
|
||||
windows_find_package(OpenSubdiv)
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
set(SDL ${LIBDIR}/sdl)
|
||||
set(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
set(SDL_LIBPATH ${SDL}/lib)
|
||||
# MinGW TODO: Update MinGW to SDL2
|
||||
if(NOT CMAKE_COMPILER_IS_GNUCC)
|
||||
set(SDL_LIBRARY SDL2)
|
||||
else()
|
||||
set(SDL_LIBRARY SDL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Audio IO
|
||||
if(WITH_SYSTEM_AUDASPACE)
|
||||
set(AUDASPACE_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
|
||||
set(AUDASPACE_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace.lib)
|
||||
set(AUDASPACE_C_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
|
||||
set(AUDASPACE_C_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-c.lib)
|
||||
set(AUDASPACE_PY_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
|
||||
set(AUDASPACE_PY_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-py.lib)
|
||||
endif()
|
||||
|
||||
# used in many places so include globally, like OpenGL
|
||||
blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}")
|
||||
|
||||
#find signtool
|
||||
SET(ProgramFilesX86_NAME "ProgramFiles(x86)") #env dislikes the ( )
|
||||
find_program(SIGNTOOL_EXE signtool
|
||||
HINTS
|
||||
"$ENV{${ProgramFilesX86_NAME}}/Windows Kits/10/bin/x86/"
|
||||
"$ENV{ProgramFiles}/Windows Kits/10/bin/x86/"
|
||||
"$ENV{${ProgramFilesX86_NAME}}/Windows Kits/8.1/bin/x86/"
|
||||
"$ENV{ProgramFiles}/Windows Kits/8.1/bin/x86/"
|
||||
"$ENV{${ProgramFilesX86_NAME}}/Windows Kits/8.0/bin/x86/"
|
||||
"$ENV{ProgramFiles}/Windows Kits/8.0/bin/x86/"
|
||||
)
|
@@ -1,254 +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>
|
||||
|
||||
"""
|
||||
Module for accessing project file data for Blender.
|
||||
|
||||
Before use, call init(cmake_build_dir).
|
||||
"""
|
||||
|
||||
__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",
|
||||
"init",
|
||||
)
|
||||
|
||||
|
||||
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
|
||||
|
||||
# must initialize from 'init'
|
||||
CMAKE_DIR = None
|
||||
|
||||
|
||||
def init(cmake_path):
|
||||
global CMAKE_DIR, PROJECT_DIR
|
||||
|
||||
# get cmake path
|
||||
cmake_path = cmake_path or ""
|
||||
|
||||
if (not cmake_path) or (not exists(join(cmake_path, "CMakeCache.txt"))):
|
||||
cmake_path = os.getcwd()
|
||||
if not exists(join(cmake_path, "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_path, os.getcwd()))
|
||||
return False
|
||||
|
||||
PROJECT_DIR = CMAKE_DIR = cmake_path
|
||||
return True
|
||||
|
||||
|
||||
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():
|
||||
""" Extract 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(("//", "#"))
|
||||
]
|
||||
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,248 +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_iter():
|
||||
import re
|
||||
re_cache = re.compile(r'([A-Za-z0-9_\-]+)?:?([A-Za-z0-9_\-]+)?=(.*)$')
|
||||
with open(join(CMAKE_DIR, "CMakeCache.txt"), 'r', encoding='utf-8') as cache_file:
|
||||
for l in cache_file:
|
||||
match = re_cache.match(l.strip())
|
||||
if match is not None:
|
||||
var, type_, val = match.groups()
|
||||
yield (var, type_ or "", val)
|
||||
|
||||
|
||||
def cmake_cache_var(var):
|
||||
for var_iter, type_iter, value_iter in cmake_cache_var_iter():
|
||||
if var == var_iter:
|
||||
return value_iter
|
||||
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 python3
|
||||
|
||||
# <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)"/../.."
|
||||
blender_version=$(grep "BLENDER_VERSION\s" $blender_srcdir/source/blender/blenkernel/BKE_blender_version.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_version.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.5'
|
||||
'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,72 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script can run from any location,
|
||||
# output is created in the $CWD
|
||||
|
||||
BASE_DIR="$PWD"
|
||||
|
||||
blender_srcdir=$(dirname -- $0)/../..
|
||||
blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
|
||||
blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
|
||||
blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
|
||||
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
|
||||
|
||||
if [ "$blender_version_cycle" = "release" ] ; then
|
||||
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)$blender_version_char
|
||||
SUBMODULE_EXCLUDE="^\(release/scripts/addons_contrib\)$"
|
||||
else
|
||||
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)_$blender_subversion
|
||||
SUBMODULE_EXCLUDE="^$" # dummy regex
|
||||
fi
|
||||
|
||||
MANIFEST="blender-$VERSION-manifest.txt"
|
||||
TARBALL="blender-$VERSION.tar.gz"
|
||||
|
||||
cd "$blender_srcdir"
|
||||
|
||||
# not so nice, but works
|
||||
FILTER_FILES_PY=\
|
||||
"import os, sys; "\
|
||||
"[print(l[:-1]) for l in sys.stdin.readlines() "\
|
||||
"if os.path.isfile(l[:-1]) "\
|
||||
"if os.path.basename(l[:-1]) not in {"\
|
||||
"'.gitignore', "\
|
||||
"'.gitmodules', "\
|
||||
"'.arcconfig', "\
|
||||
"}"\
|
||||
"]"
|
||||
|
||||
# Build master list
|
||||
echo -n "Building manifest of files: \"$BASE_DIR/$MANIFEST\" ..."
|
||||
git ls-files | python3 -c "$FILTER_FILES_PY" > $BASE_DIR/$MANIFEST
|
||||
|
||||
# Enumerate submodules
|
||||
for lcv in $(git submodule | awk '{print $2}' | grep -v "$SUBMODULE_EXCLUDE"); do
|
||||
cd "$BASE_DIR"
|
||||
cd "$blender_srcdir/$lcv"
|
||||
git ls-files | python3 -c "$FILTER_FILES_PY" | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST
|
||||
cd "$BASE_DIR"
|
||||
done
|
||||
echo "OK"
|
||||
|
||||
|
||||
# Create the tarball
|
||||
cd "$blender_srcdir"
|
||||
echo -n "Creating archive: \"$BASE_DIR/$TARBALL\" ..."
|
||||
GZIP=-9 tar --transform "s,^,blender-$VERSION/,g" -zcf "$BASE_DIR/$TARBALL" -T "$BASE_DIR/$MANIFEST"
|
||||
echo "OK"
|
||||
|
||||
|
||||
# Create checksum file
|
||||
cd "$BASE_DIR"
|
||||
echo -n "Createing checksum: \"$BASE_DIR/$TARBALL.md5sum\" ..."
|
||||
md5sum "$TARBALL" > "$TARBALL.md5sum"
|
||||
echo "OK"
|
||||
|
||||
|
||||
# Cleanup
|
||||
echo -n "Cleaning up ..."
|
||||
rm "$BASE_DIR/$MANIFEST"
|
||||
echo "OK"
|
||||
|
||||
echo "Done!"
|
269
config/darwin-config.py
Normal file
269
config/darwin-config.py
Normal file
@@ -0,0 +1,269 @@
|
||||
#
|
||||
# Note : if you want to alter this file
|
||||
# copy it as a whole in the upper folder
|
||||
# as user-config.py
|
||||
# dont create a new file with only some
|
||||
# vars changed.
|
||||
|
||||
import commands
|
||||
|
||||
# IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs
|
||||
USE_SDK=True
|
||||
|
||||
BF_PYTHON_VERSION = '2.3'
|
||||
|
||||
cmd = 'uname -p'
|
||||
MAC_PROC=commands.getoutput(cmd)
|
||||
cmd = 'uname -r'
|
||||
cmd_res=commands.getoutput(cmd)
|
||||
if cmd_res[0]=='7':
|
||||
MAC_CUR_VER='10.3'
|
||||
elif cmd_res[0]=='8':
|
||||
MAC_CUR_VER='10.4'
|
||||
else:
|
||||
MAC_CUR_VER='10.5'
|
||||
|
||||
if MAC_PROC == 'powerpc':
|
||||
LCGDIR = '#../lib/darwin-6.1-powerpc'
|
||||
else :
|
||||
LCGDIR = '#../lib/darwin-8.x.i386'
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
if MAC_PROC== 'powerpc' and BF_PYTHON_VERSION == '2.3':
|
||||
MAC_MIN_VERS = '10.3'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
|
||||
else:
|
||||
MAC_MIN_VERS = '10.4'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
|
||||
BF_FFMPEG = "#extern/ffmpeg"
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}'
|
||||
if USE_SDK==True:
|
||||
BF_FFMPEG_EXTRA = '-isysroot '+MACOSX_SDK+' -mmacosx-version-min='+MAC_MIN_VERS
|
||||
#BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
#BF_FFMPEG_LIB = 'avformat.a avcodec.a avutil.a'
|
||||
|
||||
WITH_BF_VERSE = False
|
||||
BF_VERSE = "#extern/verse/dist"
|
||||
BF_VERSE_LIBPATH = "${BF_BUILDDIR}/extern/verse/dist"
|
||||
BF_VERSE_INCLUDE = BF_VERSE
|
||||
BF_VERSE_LIBS = "libverse"
|
||||
|
||||
# python.org libs install in /library we want to use that for 2.5
|
||||
#
|
||||
# if you want py2.5 on leopard without installing
|
||||
# change value to BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
|
||||
# BEWARE: in that case it will work only on leopard
|
||||
|
||||
if BF_PYTHON_VERSION=='2.3':
|
||||
BF_PYTHON = '/System/Library/Frameworks/Python.framework/Versions/'
|
||||
else:
|
||||
BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
|
||||
|
||||
BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = ''
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config'
|
||||
BF_PYTHON_LINKFLAGS = '-u _PyMac_Error -framework System -framework Python'
|
||||
if MAC_CUR_VER=='10.3' or MAC_CUR_VER=='10.4':
|
||||
BF_PYTHON_LINKFLAGS ='-u __dummy '+BF_PYTHON_LINKFLAGS
|
||||
|
||||
BF_QUIET = '1'
|
||||
WITH_BF_OPENMP = '0'
|
||||
|
||||
# Note : should be true, but openal simply dont work on intel
|
||||
if MAC_PROC == 'i386':
|
||||
WITH_BF_OPENAL = False
|
||||
else:
|
||||
WITH_BF_OPENAL = True
|
||||
#different lib must be used following version of gcc
|
||||
# for gcc 3.3
|
||||
#BF_OPENAL = LIBDIR + '/openal'
|
||||
# for gcc 3.4 and ulterior
|
||||
if MAC_PROC == 'powerpc':
|
||||
BF_OPENAL = '#../lib/darwin-8.0.0-powerpc/openal'
|
||||
else :
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
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'
|
||||
|
||||
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 = 'SDL' #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_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
BF_GETTEXT = LIBDIR + '/gettext'
|
||||
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
|
||||
BF_GETTEXT_LIB = 'intl'
|
||||
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
|
||||
|
||||
WITH_BF_FTGL = True
|
||||
BF_FTGL = '#extern/bFTGL'
|
||||
BF_FTGL_INC = '${BF_FTGL}/include'
|
||||
BF_FTGL_LIB = 'extern_ftgl'
|
||||
|
||||
WITH_BF_GAMEENGINE=True
|
||||
WITH_BF_PLAYER=True
|
||||
|
||||
WITH_BF_ODE = False
|
||||
BF_ODE = LIBDIR + '/ode'
|
||||
BF_ODE_INC = '${BF_ODE}/include'
|
||||
BF_ODE_LIB = '${BF_ODE}/lib/libode.a'
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
BF_SOLID = '#extern/solid'
|
||||
BF_SOLID_INC = '${BF_SOLID}'
|
||||
BF_SOLID_LIB = 'extern_solid'
|
||||
|
||||
WITH_BF_YAFRAY = True
|
||||
|
||||
#WITH_BF_NSPR = True
|
||||
#BF_NSPR = $(LIBDIR)/nspr
|
||||
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
||||
#BF_NSPR_LIB =
|
||||
|
||||
# Uncomment the following line to use Mozilla inplace of netscape
|
||||
#CPPFLAGS += -DMOZ_NOT_NET
|
||||
# Location of MOZILLA/Netscape header files...
|
||||
#BF_MOZILLA = $(LIBDIR)/mozilla
|
||||
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
|
||||
#BF_MOZILLA_LIB =
|
||||
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
|
||||
# if this is not set.
|
||||
#
|
||||
# Be paranoid regarding library creation (do not update archives)
|
||||
#BF_PARANOID = True
|
||||
|
||||
# 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_QUICKTIME = True # -DWITH_QUICKTIME
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
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'
|
||||
|
||||
CFLAGS = ['-pipe','-fPIC','-funsigned-char']
|
||||
|
||||
CPPFLAGS = ['-fpascal-strings']
|
||||
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fpascal-strings']
|
||||
CXXFLAGS = [ '-pipe','-fPIC','-funsigned-char', '-fpascal-strings']
|
||||
PLATFORM_LINKFLAGS = '-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime'
|
||||
|
||||
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
|
||||
LLIBS = ['stdc++', 'SystemStubs']
|
||||
|
||||
# some flags shuffling for different Os versions
|
||||
if MAC_MIN_VERS == '10.3':
|
||||
CFLAGS = ['-fuse-cxa-atexit']+CFLAGS
|
||||
CXXFLAGS = ['-fuse-cxa-atexit']+CXXFLAGS
|
||||
PLATFORM_LINKFLAGS = '-fuse-cxa-atexit '+PLATFORM_LINKFLAGS
|
||||
LLIBS.append('crt3.o')
|
||||
|
||||
if USE_SDK==True:
|
||||
SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS]
|
||||
PLATFORM_LINKFLAGS = '-mmacosx-version-min='+MAC_MIN_VERS+ ' -Wl,-syslibroot,' + MACOSX_SDK+" "+PLATFORM_LINKFLAGS
|
||||
CCFLAGS=SDK_FLAGS+CCFLAGS
|
||||
CXXFLAGS=SDK_FLAGS+CXXFLAGS
|
||||
|
||||
# you can add -mssse3 if gcc >= 4.2
|
||||
if MAC_PROC == 'i386':
|
||||
REL_CFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3']
|
||||
REL_CCFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3']
|
||||
else:
|
||||
CFLAGS = CFLAGS+['-fno-strict-aliasing']
|
||||
CCFLAGS = CCFLAGS+['-fno-strict-aliasing']
|
||||
CXXFLAGS = CXXFLAGS+['-fno-strict-aliasing']
|
||||
|
||||
REL_CFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-O2']
|
||||
|
||||
##BF_DEPEND = True
|
||||
##
|
||||
##AR = ar
|
||||
##ARFLAGS = ruv
|
||||
##ARFLAGSQUIET = ru
|
||||
##
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
C_WARN = ['-Wdeclaration-after-statement']
|
||||
|
||||
CC_WARN = ['-Wall', '-Wno-long-double']
|
||||
|
||||
##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']
|
||||
|
||||
BF_BUILDDIR='../build/darwin'
|
||||
BF_INSTALLDIR='../install/darwin'
|
||||
BF_DOCDIR='../install/doc'
|
223
config/irix6-config.py
Normal file
223
config/irix6-config.py
Normal file
@@ -0,0 +1,223 @@
|
||||
import os
|
||||
|
||||
LCGDIR = os.getcwd()+"/../lib/irix-6.5-mips"
|
||||
LIBDIR = LCGDIR
|
||||
print LCGDIR
|
||||
|
||||
WITH_BF_VERSE = 'false'
|
||||
BF_VERSE_INCLUDE = "#extern/verse/dist"
|
||||
|
||||
BF_PYTHON = LCGDIR+'/python'
|
||||
BF_PYTHON_VERSION = '2.5'
|
||||
WITH_BF_STATICPYTHON = 'true'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #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}/lib/python2.5/config/libpython${BF_PYTHON_VERSION}.a'
|
||||
|
||||
WITH_BF_OPENAL = 'true'
|
||||
WITH_BF_STATICOPENAL = 'true'
|
||||
BF_OPENAL = LCGDIR+'/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'openal'
|
||||
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
BF_OPENAL_LIBPATH = LIBDIR + '/lib'
|
||||
|
||||
BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = 'false'
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_SDL = 'true'
|
||||
BF_SDL = LCGDIR+'/sdl' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL audio iconv charset' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = 'false'
|
||||
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 = 'false'
|
||||
|
||||
WITH_BF_JPEG = 'false'
|
||||
BF_JPEG = LCGDIR+'/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = 'false'
|
||||
BF_PNG = LCGDIR+"/png"
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
BF_TIFF = '/usr/nekoware'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
|
||||
WITH_BF_ZLIB = 'true'
|
||||
BF_ZLIB = LCGDIR+"/zlib"
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = 'true'
|
||||
|
||||
BF_GETTEXT = LCGDIR+'/gettext'
|
||||
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
|
||||
BF_GETTEXT_LIB = 'gettextpo intl'
|
||||
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
|
||||
|
||||
WITH_BF_FTGL = 'true'
|
||||
BF_FTGL = '#extern/bFTGL'
|
||||
BF_FTGL_INC = '${BF_FTGL}/include'
|
||||
BF_FTGL_LIB = 'extern_ftgl'
|
||||
|
||||
WITH_BF_GAMEENGINE='false'
|
||||
|
||||
WITH_BF_ODE = 'false'
|
||||
BF_ODE = LIBDIR + '/ode'
|
||||
BF_ODE_INC = BF_ODE + '/include'
|
||||
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
|
||||
|
||||
WITH_BF_BULLET = 'true'
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
BF_SOLID = '#extern/solid'
|
||||
BF_SOLID_INC = '${BF_SOLID}'
|
||||
BF_SOLID_LIB = 'extern_solid'
|
||||
|
||||
WITH_BF_YAFRAY = 'true'
|
||||
|
||||
#WITH_BF_NSPR = 'true'
|
||||
#BF_NSPR = $(LIBDIR)/nspr
|
||||
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
||||
#BF_NSPR_LIB =
|
||||
|
||||
# Uncomment the following line to use Mozilla inplace of netscape
|
||||
#CPPFLAGS += -DMOZ_NOT_NET
|
||||
# Location of MOZILLA/Netscape header files...
|
||||
#BF_MOZILLA = $(LIBDIR)/mozilla
|
||||
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
|
||||
#BF_MOZILLA_LIB =
|
||||
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
|
||||
# if this is not set.
|
||||
#
|
||||
# Be paranoid regarding library creation (do not update archives)
|
||||
#BF_PARANOID = 'true'
|
||||
|
||||
# enable freetype2 support for text objects
|
||||
BF_FREETYPE = LCGDIR+'/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
|
||||
BF_QUICKTIME = '/usr/local'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
|
||||
|
||||
WITH_BF_ICONV = 'true'
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv charset'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_BINRELOC = 'false'
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG
|
||||
# Uncomment the following two lines to use system's ffmpeg
|
||||
BF_FFMPEG = LCGDIR+'/ffmpeg'
|
||||
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice faad faac vorbis x264 ogg mp3lame z'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
|
||||
# enable ogg, vorbis and theora in ffmpeg
|
||||
WITH_BF_OGG = 'false' # -DWITH_OGG
|
||||
BF_OGG = '/usr'
|
||||
BF_OGG_INC = '${BF_OGG}/include'
|
||||
BF_OGG_LIB = 'ogg vorbis theoraenc theoradec'
|
||||
|
||||
WITH_BF_OPENJPEG = 'false'
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_REDCODE = 'false'
|
||||
BF_REDCODE = '#extern/libredcode'
|
||||
BF_REDCODE_LIB = ''
|
||||
BF_REDCODE_INC = '${BF_REDCODE}/include'
|
||||
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = 'false'
|
||||
BF_OPENGL = '/usr'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIB = 'GL GLU X11 Xi Xext'
|
||||
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
|
||||
BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/libGL.a ${BF_OPENGL}/libGLU.a ${BF_OPENGL}/libXxf86vm.a ${BF_OPENGL}/libX11.a ${BF_OPENGL}/libXi.a ${BF_OPENGL}/libXext.a ${BF_OPENGL}/libXxf86vm.a'
|
||||
|
||||
|
||||
CC = 'c99'
|
||||
CXX = 'CC'
|
||||
|
||||
|
||||
CCFLAGS = ['-pipe','-fPIC', '-n32']
|
||||
|
||||
CPPFLAGS = ['-DXP_UNIX']
|
||||
CXXFLAGS = ['-pipe','-fPIC', '-n32']
|
||||
REL_CFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-O2']
|
||||
##BF_DEPEND = 'true'
|
||||
##
|
||||
##AR = ar
|
||||
##ARFLAGS = ruv
|
||||
##ARFLAGSQUIET = ru
|
||||
##
|
||||
C_WARN = '-no_prelink -ptused'
|
||||
|
||||
CC_WARN = '-no_prelink -ptused'
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
||||
LLIBS = 'c m dl pthread dmedia movie'
|
||||
##LOPTS = --dynamic
|
||||
##DYNLDFLAGS = -shared $(LDFLAGS)
|
||||
|
||||
BF_PROFILE_FLAGS = ['-pg','-g']
|
||||
BF_PROFILE = 'false'
|
||||
|
||||
BF_DEBUG = 'false'
|
||||
BF_DEBUG_FLAGS = '-g'
|
||||
|
||||
BF_BUILDDIR = '../build/irix6'
|
||||
BF_INSTALLDIR='../install/irix6'
|
||||
BF_DOCDIR='../install/doc'
|
||||
|
||||
#Link against pthread
|
||||
LDIRS = []
|
||||
LDIRS.append(BF_FREETYPE_LIBPATH)
|
||||
LDIRS.append(BF_PNG_LIBPATH)
|
||||
LDIRS.append(BF_ZLIB_LIBPATH)
|
||||
LDIRS.append(BF_SDL_LIBPATH)
|
||||
LDIRS.append(BF_OPENAL_LIBPATH)
|
||||
LDIRS.append(BF_ICONV_LIBPATH)
|
||||
|
||||
PLATFORM_LINKFLAGS = []
|
||||
for x in LDIRS:
|
||||
PLATFORM_LINKFLAGS.append("-L"+x)
|
||||
|
||||
PLATFORM_LINKFLAGS += ['-L${LCGDIR}/jpeg/lib' , '-L/usr/lib32', '-n32', '-v', '-no_prelink']
|
||||
print PLATFORM_LINKFLAGS
|
||||
LINKFLAGS= PLATFORM_LINKFLAGS
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user