Compare commits
2 Commits
temp-works
...
fluidcontr
Author | SHA1 | Date | |
---|---|---|---|
32b13c13af | |||
9f802038b6 |
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"project_id" : "Blender",
|
||||
"conduit_uri" : "https://developer.blender.org/",
|
||||
"git.default-relative-commit" : "origin/blender2.8",
|
||||
"arc.land.update.default" : "rebase"
|
||||
}
|
38
.gitignore
vendored
38
.gitignore
vendored
@@ -1,38 +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
|
||||
/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
|
||||
|
||||
# in-source lib downloads
|
||||
/build_files/build_environment/downloads
|
24
.gitmodules
vendored
24
.gitmodules
vendored
@@ -1,24 +0,0 @@
|
||||
[submodule "release/scripts/addons"]
|
||||
path = release/scripts/addons
|
||||
url = ../blender-addons.git
|
||||
branch = blender2.8
|
||||
ignore = all
|
||||
branch = master
|
||||
[submodule "release/scripts/addons_contrib"]
|
||||
path = release/scripts/addons_contrib
|
||||
url = ../blender-addons-contrib.git
|
||||
branch = master
|
||||
ignore = all
|
||||
branch = master
|
||||
[submodule "release/datafiles/locale"]
|
||||
path = release/datafiles/locale
|
||||
url = ../blender-translations.git
|
||||
branch = master
|
||||
ignore = all
|
||||
branch = master
|
||||
[submodule "source/tools"]
|
||||
path = source/tools
|
||||
url = ../blender-dev-tools.git
|
||||
branch = master
|
||||
ignore = all
|
||||
branch = master
|
85
CMake/macros.cmake
Normal file
85
CMake/macros.cmake
Normal file
@@ -0,0 +1,85 @@
|
||||
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})
|
||||
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)
|
||||
ENDMACRO(SETUP_LIBLINKS)
|
2058
CMakeLists.txt
2058
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
|
||||
|
479
GNUmakefile
479
GNUmakefile
@@ -1,479 +0,0 @@
|
||||
# -*- mode: gnumakefile; tab-width: 4; 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
|
||||
|
||||
# Dependencies DIR's
|
||||
DEPS_SOURCE_DIR:=$(BLENDER_DIR)/build_files/build_environment
|
||||
DEPS_BUILD_DIR:=$(BUILD_DIR)/deps
|
||||
DEPS_INSTALL_DIR:=$(shell dirname "$(BLENDER_DIR)")/lib/$(OS_NCASE)
|
||||
|
||||
ifneq ($(OS_NCASE),darwin)
|
||||
# Add processor type to directory name
|
||||
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(shell uname -p)
|
||||
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
|
||||
ifneq (,$(filter $(OS),Darwin FreeBSD 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_INIT: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
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build dependencies
|
||||
DEPS_TARGET = install
|
||||
ifneq "$(findstring clean, $(MAKECMDGOALS))" ""
|
||||
DEPS_TARGET = clean
|
||||
endif
|
||||
|
||||
deps: .FORCE
|
||||
@echo
|
||||
@echo Configuring dependencies in \"$(DEPS_BUILD_DIR)\"
|
||||
|
||||
@cmake -H"$(DEPS_SOURCE_DIR)" \
|
||||
-B"$(DEPS_BUILD_DIR)" \
|
||||
-DHARVEST_TARGET=$(DEPS_INSTALL_DIR)
|
||||
|
||||
@echo
|
||||
@echo Building dependencies ...
|
||||
$(MAKE) -C "$(DEPS_BUILD_DIR)" -s -j $(NPROCS) $(DEPS_TARGET)
|
||||
@echo
|
||||
@echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR).
|
||||
@echo
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 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 " * deps - build library dependencies (intended only for platform maintainers)"
|
||||
@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 [ "$(OS_NCASE)" == "darwin" ] && [ ! -d "../lib/$(OS_NCASE)" ]; then \
|
||||
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/$(OS_NCASE) ../lib/$(OS_NCASE) ; \
|
||||
fi
|
||||
if [ -d "../lib" ]; then \
|
||||
svn cleanup ../lib/* ; \
|
||||
svn update ../lib/* ; \
|
||||
fi
|
||||
git pull --rebase
|
||||
git submodule update --init --recursive
|
||||
git submodule foreach git checkout master
|
||||
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:
|
63
Makefile
Normal file
63
Makefile
Normal file
@@ -0,0 +1,63 @@
|
||||
# $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 cvs).
|
||||
|
||||
sinclude user-def.mk
|
||||
|
||||
# To build without openAL, uncomment the following line, or 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
|
||||
endif
|
||||
|
||||
DIRS ?= extern intern source
|
||||
|
||||
ifneq ($(INTERNATIONAL),false)
|
||||
DIRS += 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
|
564
SConstruct
Normal file
564
SConstruct
Normal file
@@ -0,0 +1,564 @@
|
||||
#!/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
|
||||
|
||||
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)
|
||||
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()
|
||||
|
||||
# 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.Copy( 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'] = env['LLIBS'].replace('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:
|
||||
env['WITH_BF_GAMEENGINE'] = False
|
||||
env['WITH_BF_OPENAL'] = False
|
||||
env['WITH_BF_OPENEXR'] = False
|
||||
env['WITH_BF_ICONV'] = False
|
||||
env['WITH_BF_INTERNATIONAL'] = False
|
||||
env['WITH_BF_OPENJPEG'] = False
|
||||
env['WITH_BF_FFMPEG'] = False
|
||||
env['WITH_BF_QUICKTIME'] = False
|
||||
env['WITH_BF_YAFRAY'] = False
|
||||
env['WITH_BF_REDCODE'] = False
|
||||
env['WITH_BF_FTGL'] = False
|
||||
env['WITH_BF_DDS'] = False
|
||||
env['WITH_BF_ZLIB'] = False
|
||||
env['WITH_BF_SDL'] = False
|
||||
env['WITH_BF_JPEG'] = False
|
||||
env['WITH_BF_PNG'] = False
|
||||
env['WITH_BF_ODE'] = False
|
||||
env['WITH_BF_BULLET'] = False
|
||||
env['WITH_BF_BINRELOC'] = False
|
||||
env['BF_BUILDINFO'] = False
|
||||
env['BF_NO_ELBEEM'] = True
|
||||
|
||||
|
||||
|
||||
# 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']
|
||||
env['BUILDDIR'] = B.root_build_dir
|
||||
if not B.root_build_dir[-1]==os.sep:
|
||||
B.root_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.root_build_dir):
|
||||
print B.bc.HEADER+'Cleaning...'+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']:
|
||||
if os.path.exists(confile):
|
||||
print "clean file %s"%confile
|
||||
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' )
|
||||
|
||||
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)
|
||||
|
||||
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:
|
||||
dotblendlist.append(dp+os.sep+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))
|
||||
|
||||
#-- .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:
|
||||
print ">>>", env['BF_INSTALLDIR'], tp, f
|
||||
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))
|
||||
|
||||
#-- 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:
|
||||
print ">>>", env['BF_INSTALLDIR'], tp, f
|
||||
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',
|
||||
'${LCGDIR}/png/lib/libpng.dll',
|
||||
'#release/windows/extra/python25.zip',
|
||||
'#release/windows/extra/zlib.pyd',
|
||||
'${LCGDIR}/sdl/lib/SDL.dll',
|
||||
'${LCGDIR}/zlib/lib/zlib.dll',
|
||||
'${LCGDIR}/tiff/lib/libtiff.dll']
|
||||
if env['BF_DEBUG']:
|
||||
dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}_d.dll')
|
||||
else:
|
||||
dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}.dll')
|
||||
if env['OURPLATFORM'] == 'win32-mingw':
|
||||
dllsources += ['${LCGDIR}/pthreads/lib/pthreadGC2.dll']
|
||||
else:
|
||||
dllsources += ['${LCGDIR}/pthreads/lib/pthreadVC2.dll']
|
||||
if env['WITH_BF_ICONV']:
|
||||
dllsources += ['${LCGDIR}/iconv/lib/iconv.dll']
|
||||
if env['WITH_BF_FFMPEG']:
|
||||
dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/avformat-52.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/avutil-49.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/libfaad-0.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
|
||||
'${LCGDIR}/ffmpeg/lib/libx264-59.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 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
|
||||
# TODO: run epydoc
|
||||
|
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:kr
|
BIN
bin/.blender/.bfont.ttf
Normal file
BIN
bin/.blender/.bfont.ttf
Normal file
Binary file not shown.
134
blenderplayer/CMakeLists.txt
Normal file
134
blenderplayer/CMakeLists.txt
Normal file
@@ -0,0 +1,134 @@
|
||||
# $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_decimation
|
||||
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
|
||||
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)
|
@@ -1,132 +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 *****
|
||||
|
||||
####################################################################################################
|
||||
#
|
||||
# This is a build system used by platform maintainers to build library dependencies on
|
||||
# Windows and macOS. There is some support for Linux as well, but not ready for releases.
|
||||
#
|
||||
# Windows and macOS users should download the precompiled libraries in lib/, Linux users
|
||||
# should run install_deps.sh for building dependencies.
|
||||
#
|
||||
# WINDOWS USAGE:
|
||||
# Don't call this cmake file your self, use build_deps.cmd
|
||||
# build_deps 2013 x64 / build_deps 2013 x86
|
||||
# build_deps 2015 x64 / build_deps 2015 x86
|
||||
#
|
||||
# MAC OS X USAGE:
|
||||
# Install with homebrew: brew install autoconf automake libtool yasm openssl xz
|
||||
# Run "make deps" from main Blender directory
|
||||
#
|
||||
# LINUX USAGE:
|
||||
# Install compiler, cmake, autoconf, automake, libtool, yasm
|
||||
# Run "make deps" from main Blender directory
|
||||
#
|
||||
####################################################################################################
|
||||
|
||||
project("BlenderDependencies")
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
include(ExternalProject)
|
||||
include(cmake/options.cmake)
|
||||
include(cmake/versions.cmake)
|
||||
include(cmake/zlib.cmake)
|
||||
include(cmake/blendthumb.cmake)
|
||||
include(cmake/openal.cmake)
|
||||
include(cmake/png.cmake)
|
||||
include(cmake/jpeg.cmake)
|
||||
include(cmake/boost.cmake)
|
||||
include(cmake/blosc.cmake)
|
||||
include(cmake/pthreads.cmake)
|
||||
include(cmake/ilmbase.cmake)
|
||||
include(cmake/openexr.cmake)
|
||||
include(cmake/freetype.cmake)
|
||||
include(cmake/freeglut.cmake)
|
||||
include(cmake/glew.cmake)
|
||||
include(cmake/hdf5.cmake)
|
||||
include(cmake/alembic.cmake)
|
||||
include(cmake/glfw.cmake)
|
||||
include(cmake/clew.cmake)
|
||||
include(cmake/cuew.cmake)
|
||||
include(cmake/opensubdiv.cmake)
|
||||
include(cmake/sdl.cmake)
|
||||
include(cmake/opencollada.cmake)
|
||||
include(cmake/opencolorio.cmake)
|
||||
include(cmake/llvm.cmake)
|
||||
include(cmake/clang.cmake)
|
||||
include(cmake/openimageio.cmake)
|
||||
include(cmake/tiff.cmake)
|
||||
include(cmake/flexbison.cmake)
|
||||
include(cmake/osl.cmake)
|
||||
include(cmake/tbb.cmake)
|
||||
include(cmake/openvdb.cmake)
|
||||
include(cmake/python.cmake)
|
||||
include(cmake/python_site_packages.cmake)
|
||||
include(cmake/numpy.cmake)
|
||||
if(WITH_WEBP)
|
||||
include(cmake/webp.cmake)
|
||||
endif()
|
||||
if(WIN32)
|
||||
include(cmake/hidapi.cmake)
|
||||
endif()
|
||||
|
||||
if(ENABLE_MINGW64)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
include(cmake/setup_mingw64.cmake)
|
||||
else()
|
||||
include(cmake/setup_mingw32.cmake)
|
||||
endif()
|
||||
else()
|
||||
set(mingw_LIBDIR ${LIBDIR})
|
||||
endif()
|
||||
|
||||
if(NOT WIN32 OR ENABLE_MINGW64)
|
||||
include(cmake/openjpeg.cmake)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
if(WIN32)
|
||||
include(cmake/zlib_mingw.cmake)
|
||||
endif()
|
||||
include(cmake/lame.cmake)
|
||||
include(cmake/ogg.cmake)
|
||||
include(cmake/vorbis.cmake)
|
||||
include(cmake/theora.cmake)
|
||||
include(cmake/vpx.cmake)
|
||||
include(cmake/orc.cmake)
|
||||
include(cmake/schroedinger.cmake)
|
||||
include(cmake/x264.cmake)
|
||||
include(cmake/xvidcore.cmake)
|
||||
include(cmake/faad.cmake)
|
||||
include(cmake/ffmpeg.cmake)
|
||||
include(cmake/fftw.cmake)
|
||||
include(cmake/sndfile.cmake)
|
||||
if(WIN32)
|
||||
include(cmake/iconv.cmake)
|
||||
include(cmake/lapack.cmake)
|
||||
endif()
|
||||
if(UNIX)
|
||||
include(cmake/flac.cmake)
|
||||
if(NOT APPLE)
|
||||
include(cmake/spnav.cmake)
|
||||
include(cmake/jemalloc.cmake)
|
||||
include(cmake/xml2.cmake)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(cmake/harvest.cmake)
|
@@ -1,80 +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 *****
|
||||
|
||||
if(ALEMBIC_HDF5)
|
||||
set(ALEMBIC_HDF5_HL)
|
||||
# in debug mode we do not build HDF5_hdf5_hl_LIBRARY which makes cmake really
|
||||
# unhappy, stub it with the debug mode lib. it's not linking it in at this
|
||||
# point in time anyhow
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(ALEMBIC_HDF5_HL -DHDF5_hdf5_hl_LIBRARY=${LIBDIR}/hdf5/lib/libhdf5_hl_D.${LIBEXT})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(ALEMBIC_EXTRA_ARGS
|
||||
-DBUILDSTATIC=ON
|
||||
-DLINKSTATIC=ON
|
||||
-DALEMBIC_LIB_USES_BOOST=ON
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DUSE_STATIC_BOOST=On
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=ON
|
||||
-DBoost_DEBUG=ON
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DILMBASE_ROOT=${LIBDIR}/ilmbase
|
||||
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${LIBDIR}/ilmbase/include/OpenEXR
|
||||
-DALEMBIC_ILMBASE_HALF_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${LIBEXT}
|
||||
-DALEMBIC_ILMBASE_IMATH_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
|
||||
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
|
||||
-DALEMBIC_ILMBASE_IEX_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
|
||||
-DUSE_PYILMBASE=0
|
||||
-DUSE_PYALEMBIC=0
|
||||
-DUSE_ARNOLD=0
|
||||
-DUSE_MAYA=0
|
||||
-DUSE_PRMAN=0
|
||||
-DUSE_HDF5=Off
|
||||
-DUSE_STATIC_HDF5=Off
|
||||
-DHDF5_ROOT=${LIBDIR}/hdf5
|
||||
-DUSE_TESTS=Off
|
||||
-DALEMBIC_NO_OPENGL=1
|
||||
-DUSE_BINARIES=ON
|
||||
-DALEMBIC_ILMBASE_LINK_STATIC=On
|
||||
-DALEMBIC_SHARED_LIBS=OFF
|
||||
-DGLUT_INCLUDE_DIR=""
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
${ALEMBIC_HDF5_HL}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_alembic
|
||||
URL ${ALEMBIC_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${ALEMBIC_MD5}
|
||||
PREFIX ${BUILD_DIR}/alembic
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/alembic
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_alembic
|
||||
external_boost
|
||||
external_zlib
|
||||
external_ilmbase
|
||||
)
|
@@ -1,67 +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 *****
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
if(WIN32)
|
||||
set(THUMB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../release/windows/blendthumb)
|
||||
|
||||
ExternalProject_Add(external_zlib_32
|
||||
URL ${ZLIB_URI}
|
||||
CMAKE_GENERATOR ${GENERATOR_32}
|
||||
URL_HASH MD5=${ZLIB_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/zlib32
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib32 ${DEFAULT_CMAKE_FLAGS}
|
||||
INSTALL_DIR ${LIBDIR}/zlib32
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_zlib_64
|
||||
URL ${ZLIB_URI}
|
||||
CMAKE_GENERATOR ${GENERATOR_64}
|
||||
URL_HASH MD5=${ZLIB_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/zlib64
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib64 ${DEFAULT_CMAKE_FLAGS}
|
||||
INSTALL_DIR ${LIBDIR}/zlib64
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_blendthumb_32
|
||||
CMAKE_GENERATOR ${GENERATOR_32}
|
||||
SOURCE_DIR ${THUMB_DIR}
|
||||
PREFIX ${BUILD_DIR}/blendthumb32
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb32 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib32/include -DZLIB_LIBS=${LIBDIR}/zlib32/lib/zlibstatic.lib
|
||||
INSTALL_DIR ${LIBDIR}/blendthumb32
|
||||
)
|
||||
add_dependencies(
|
||||
external_blendthumb_32
|
||||
external_zlib_32
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_blendthumb_64
|
||||
CMAKE_GENERATOR ${GENERATOR_64}
|
||||
SOURCE_DIR ${THUMB_DIR}
|
||||
PREFIX ${BUILD_DIR}/blendthumb64
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb64 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib64/include -DZLIB_LIBS=${LIBDIR}/zlib64/lib/zlibstatic.lib
|
||||
INSTALL_DIR ${LIBDIR}/blendthumb64
|
||||
)
|
||||
add_dependencies(
|
||||
external_blendthumb_64
|
||||
external_zlib_64
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,49 +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 *****
|
||||
|
||||
set(BLOSC_EXTRA_ARGS
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_BENCHMARKS=OFF
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
-DThreads_FOUND=1
|
||||
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC2.lib
|
||||
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_blosc
|
||||
URL ${BLOSC_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${BLOSC_HASH}
|
||||
PREFIX ${BUILD_DIR}/blosc
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/blosc/src/external_blosc < ${PATCH_DIR}/blosc.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blosc ${DEFAULT_CMAKE_FLAGS} ${BLOSC_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/blosc
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_blosc
|
||||
external_zlib
|
||||
)
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_blosc
|
||||
external_pthreads
|
||||
)
|
||||
endif()
|
@@ -1,110 +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 *****
|
||||
|
||||
if(WIN32)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(PYTHON_ARCH x64)
|
||||
set(PYTHON_ARCH2 win-AMD64)
|
||||
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
|
||||
else()
|
||||
set(PYTHON_ARCH x86)
|
||||
set(PYTHON_ARCH2 win32)
|
||||
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
|
||||
endif()
|
||||
if(MSVC12)
|
||||
set(BOOST_TOOLSET toolset=msvc-12.0)
|
||||
set(BOOST_COMPILER_STRING -vc120)
|
||||
set(PYTHON_COMPILER_STRING v120)
|
||||
endif()
|
||||
if(MSVC14)
|
||||
set(BOOST_TOOLSET toolset=msvc-14.0)
|
||||
set(BOOST_COMPILER_STRING -vc140)
|
||||
set(PYTHON_COMPILER_STRING v140)
|
||||
endif()
|
||||
set(JAM_FILE ${BUILD_DIR}/boost/src/external_boost/user-config.jam)
|
||||
set(semi_path "${PATCH_DIR}/semi.txt")
|
||||
FILE(TO_NATIVE_PATH ${semi_path} semi_path)
|
||||
set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
|
||||
echo using python : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
|
||||
echo. : ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/pc >> "${JAM_FILE}" &&
|
||||
echo. : ${BUILD_DIR}/python/src/external_python/pcbuild >> "${JAM_FILE}" &&
|
||||
type ${semi_path} >> "${JAM_FILE}"
|
||||
)
|
||||
set(BOOST_BUILD_COMMAND bjam)
|
||||
#--user-config=user-config.jam
|
||||
set(BOOST_BUILD_OPTIONS runtime-link=static )
|
||||
#set(BOOST_WITH_PYTHON --with-python)
|
||||
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_60/ ${HARVEST_TARGET}/boost/include/)
|
||||
endif()
|
||||
|
||||
elseif(APPLE)
|
||||
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
|
||||
set(BOOST_BUILD_COMMAND ./bjam)
|
||||
set(BOOST_BUILD_OPTIONS toolset=clang cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
|
||||
set(BOOST_HARVEST_CMD echo .)
|
||||
else()
|
||||
set(BOOST_HARVEST_CMD echo .)
|
||||
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
|
||||
set(BOOST_BUILD_COMMAND ./bjam)
|
||||
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
|
||||
endif()
|
||||
|
||||
set(BOOST_OPTIONS
|
||||
--with-filesystem
|
||||
--with-locale
|
||||
--with-thread
|
||||
--with-regex
|
||||
--with-system
|
||||
--with-date_time
|
||||
--with-wave
|
||||
--with-atomic
|
||||
--with-serialization
|
||||
--with-program_options
|
||||
--with-iostreams
|
||||
${BOOST_WITH_PYTHON}
|
||||
${BOOST_TOOLSET}
|
||||
)
|
||||
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(BOOST_ADDRESS_MODEL 64)
|
||||
else()
|
||||
set(BOOST_ADDRESS_MODEL 32)
|
||||
endif()
|
||||
|
||||
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
|
||||
|
||||
ExternalProject_Add(external_boost
|
||||
URL ${BOOST_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${BOOST_MD5}
|
||||
PREFIX ${BUILD_DIR}/boost
|
||||
UPDATE_COMMAND ""
|
||||
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
|
||||
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} variant=${BOOST_BUILD_TYPE} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
|
||||
BUILD_IN_SOURCE 1
|
||||
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_boost
|
||||
Make_Python_Environment
|
||||
)
|
||||
endif()
|
@@ -1,54 +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 *****
|
||||
|
||||
set(CLANG_EXTRA_ARGS
|
||||
-DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
|
||||
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
|
||||
-DLLVM_USE_CRT_RELEASE=MT
|
||||
-DLLVM_USE_CRT_DEBUG=MTd
|
||||
)
|
||||
ExternalProject_Add(external_clang
|
||||
URL ${CLANG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${CLANG_HASH}
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 2 -N -R -d ${BUILD_DIR}/clang/src/external_clang < ${PATCH_DIR}/clang.diff
|
||||
PREFIX ${BUILD_DIR}/clang
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/clang
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/)
|
||||
else()
|
||||
set(CLANG_HARVEST_COMMAND
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/include/ ${HARVEST_TARGET}/llvm/debug/include/
|
||||
)
|
||||
endif()
|
||||
ExternalProject_Add_Step(external_clang after_install
|
||||
COMMAND ${CLANG_HARVEST_COMMAND}
|
||||
DEPENDEES mkdir update patch download configure build install
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_clang
|
||||
ll
|
||||
)
|
@@ -1,28 +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 *****
|
||||
|
||||
set(CLEW_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_clew
|
||||
URL ${CLEW_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${CLEW_HASH}
|
||||
PREFIX ${BUILD_DIR}/clew
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/clew
|
||||
)
|
@@ -1,29 +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 *****
|
||||
|
||||
set(CUEW_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_cuew
|
||||
URL ${CUEW_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${CUEW_HASH}
|
||||
PREFIX ${BUILD_DIR}/cuew
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/cuew
|
||||
)
|
@@ -1,35 +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 *****
|
||||
|
||||
set(FAAD_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_faad
|
||||
URL ${FAAD_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${FAAD_HASH}
|
||||
PREFIX ${BUILD_DIR}/faad
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/faad/src/external_faad < ${PATCH_DIR}/libfaad.diff
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/faad
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_faad PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,136 +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 *****
|
||||
|
||||
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/dirac/include/dirac -I${mingw_LIBDIR}/schroedinger/include/schroedinger-1.0 -I${mingw_LIBDIR}/zlib/include")
|
||||
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/dirac/lib -L${mingw_LIBDIR}/schroedinger/lib -L${mingw_LIBDIR}/orc/lib -L${mingw_LIBDIR}/zlib/lib")
|
||||
set(FFMPEG_EXTRA_FLAGS --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
|
||||
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/schroedinger/lib/pkgconfig:${mingw_LIBDIR}/orc/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR})
|
||||
|
||||
if(WIN32)
|
||||
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
--disable-static
|
||||
--enable-shared
|
||||
--enable-w32threads
|
||||
--disable-pthreads
|
||||
--enable-libopenjpeg
|
||||
)
|
||||
else()
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
--enable-static
|
||||
--disable-shared
|
||||
--enable-libopenjpeg
|
||||
)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
--target-os=darwin
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_ffmpeg
|
||||
URL ${FFMPEG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${FFMPEG_HASH}
|
||||
PREFIX ${BUILD_DIR}/ffmpeg
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
|
||||
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
|
||||
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
|
||||
--disable-lzma
|
||||
--disable-avfilter
|
||||
--disable-vdpau
|
||||
--disable-bzlib
|
||||
--disable-libgsm
|
||||
--disable-libspeex
|
||||
--enable-libvpx
|
||||
--prefix=${LIBDIR}/ffmpeg
|
||||
--enable-libschroedinger
|
||||
--enable-libtheora
|
||||
--enable-libvorbis
|
||||
--enable-zlib
|
||||
--enable-stripping
|
||||
--enable-runtime-cpudetect
|
||||
--disable-vaapi
|
||||
--disable-nonfree
|
||||
--enable-gpl
|
||||
--disable-postproc
|
||||
--disable-x11grab
|
||||
--enable-libmp3lame
|
||||
--disable-librtmp
|
||||
--enable-libx264
|
||||
--enable-libxvid
|
||||
--disable-libopencore-amrnb
|
||||
--disable-libopencore-amrwb
|
||||
--disable-libdc1394
|
||||
--disable-version3
|
||||
--disable-debug
|
||||
--enable-optimizations
|
||||
--disable-sse
|
||||
--disable-ssse3
|
||||
--enable-ffplay
|
||||
--disable-openssl
|
||||
--disable-securetransport
|
||||
--disable-indev=avfoundation
|
||||
--disable-indev=qtkit
|
||||
--disable-sdl
|
||||
--disable-gnutls
|
||||
--disable-vda
|
||||
--disable-videotoolbox
|
||||
--disable-libxcb
|
||||
--disable-xlib
|
||||
--disable-audiotoolbox
|
||||
--disable-cuvid
|
||||
--disable-nvenc
|
||||
--disable-indev=jack
|
||||
--disable-indev=alsa
|
||||
--disable-outdev=alsa
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
|
||||
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
|
||||
INSTALL_DIR ${LIBDIR}/ffmpeg
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_ffmpeg
|
||||
external_zlib
|
||||
external_faad
|
||||
external_openjpeg
|
||||
external_xvidcore
|
||||
external_x264
|
||||
external_schroedinger
|
||||
external_vpx
|
||||
external_theora
|
||||
external_vorbis
|
||||
external_ogg
|
||||
external_lame
|
||||
)
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_ffmpeg
|
||||
external_zlib_mingw
|
||||
)
|
||||
endif()
|
@@ -1,40 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(FFTW_EXTRA_ARGS)
|
||||
|
||||
if(WIN32)
|
||||
set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
|
||||
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_fftw3
|
||||
URL ${FFTW_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${FFTW_HASH}
|
||||
PREFIX ${BUILD_DIR}/fftw3
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
|
||||
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/fftw3
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,32 +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 *****
|
||||
|
||||
ExternalProject_Add(external_flac
|
||||
URL ${FLAC_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${FLAC_HASH}
|
||||
PREFIX ${BUILD_DIR}/flac
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/flac
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,31 +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 *****
|
||||
|
||||
set(FLEXBISON_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_flexbison
|
||||
URL ${FLEXBISON_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${FLEXBISON_HASH}
|
||||
PREFIX ${BUILD_DIR}/flexbison
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
|
||||
CONFIGURE_COMMAND echo .
|
||||
BUILD_COMMAND echo .
|
||||
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/flexbison/src/external_flexbison/ ${LIBDIR}/flexbison/
|
||||
INSTALL_DIR ${LIBDIR}/flexbison
|
||||
)
|
@@ -1,35 +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 *****
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(FREEGLUT_EXTRA_ARGS
|
||||
-DFREEGLUT_BUILD_SHARED_LIBS=Off
|
||||
-DFREEGLUT_BUILD_STATIC_LIBS=On
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_freeglut
|
||||
URL ${FREEGLUT_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${FREEGLUT_HASH}
|
||||
PREFIX ${BUILD_DIR}/freeglut
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/freeglut
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,28 +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 *****
|
||||
|
||||
set(FREETYPE_EXTRA_ARGS -DCMAKE_RELEASE_POSTFIX:STRING=2ST -DCMAKE_DEBUG_POSTFIX:STRING=2ST_d -DWITH_BZip2=OFF -DWITH_HarfBuzz=OFF)
|
||||
|
||||
ExternalProject_Add(external_freetype
|
||||
URL ${FREETYPE_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${FREETYPE_HASH}
|
||||
PREFIX ${BUILD_DIR}/freetype
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/freetype
|
||||
)
|
@@ -1,32 +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 *****
|
||||
|
||||
set(GLEW_EXTRA_ARGS
|
||||
-DBUILD_UTILS=Off
|
||||
-DBUILD_SHARED_LIBS=Off
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_glew
|
||||
URL ${GLEW_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${GLEW_HASH}
|
||||
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
|
||||
PREFIX ${BUILD_DIR}/glew
|
||||
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/glew
|
||||
)
|
@@ -1,28 +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 *****
|
||||
|
||||
set(GLFW_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_glfw
|
||||
URL ${GLFW_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${GLFW_HASH}
|
||||
PREFIX ${BUILD_DIR}/glfw
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/glfw
|
||||
)
|
@@ -1,278 +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 *****
|
||||
|
||||
########################################################################
|
||||
# Copy all generated files to the proper strucure as blender prefers
|
||||
########################################################################
|
||||
|
||||
if(NOT DEFINED HARVEST_TARGET)
|
||||
set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
|
||||
endif()
|
||||
message("HARVEST_TARGET = ${HARVEST_TARGET}")
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
add_custom_target(Harvest_Release_Results
|
||||
# Zlib Rename the lib file and copy the include/bin folders
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic.lib ${HARVEST_TARGET}/zlib/lib/libz_st.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/bin/ ${HARVEST_TARGET}/zlib/bin/ &&
|
||||
# jpeg rename libfile + copy include
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
|
||||
# FreeType, straight up copy
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype &&
|
||||
# pthreads, rename include dir
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib &&
|
||||
# ffmpeg copy include+bin
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib &&
|
||||
# sdl merge bin/lib folder, copy include
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/include/sdl2 ${HARVEST_TARGET}/sdl/include &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/lib ${HARVEST_TARGET}/sdl/lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/bin ${HARVEST_TARGET}/sdl/lib &&
|
||||
# openal
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/ &&
|
||||
# OpenImageIO
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
|
||||
# openEXR
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ilmbase ${HARVEST_TARGET}/openexr &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include &&
|
||||
# png
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
|
||||
# fftw3
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h &&
|
||||
# freeglut-> opengl
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
|
||||
# glew-> opengl
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
|
||||
# sndfile
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
|
||||
# tiff
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
|
||||
# iconv
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h &&
|
||||
# opencolorIO
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenColorIO/ ${HARVEST_TARGET}/opencolorio &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenColorIO/lib/OpenColorIO.dll ${HARVEST_TARGET}/opencolorio/bin/OpenColorIO.dll &&
|
||||
# Osl
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl &&
|
||||
# OpenVDB
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openVDB/ ${HARVEST_TARGET}/openVDB &&
|
||||
# blosc
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/ &&
|
||||
# tbb
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/ &&
|
||||
# opencollada
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/ &&
|
||||
# opensubdiv
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv ${HARVEST_TARGET}/opensubdiv &&
|
||||
# python
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
|
||||
# alembic
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic &&
|
||||
# hdf5
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5 ${HARVEST_TARGET}/hdf5 &&
|
||||
# BlendThumb
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll &&
|
||||
# python
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}.tar.gz &&
|
||||
# numpy
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}.tar.gz &&
|
||||
# hidapi
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
|
||||
# webp, straight up copy
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp
|
||||
DEPENDS
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
add_custom_target(Harvest_Debug_Results
|
||||
# OpenImageIO
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
|
||||
# ilmbase+openexr
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/Half.lib ${HARVEST_TARGET}/openexr/lib/Half_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/Iex-2_2.lib ${HARVEST_TARGET}/openexr/lib/Iex-2_2_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/IexMath-2_2.lib ${HARVEST_TARGET}/openexr/lib/IexMath-2_2_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/IlmThread-2_2.lib ${HARVEST_TARGET}/openexr/lib/IlmThread-2_2_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/Imath-2_2.lib ${HARVEST_TARGET}/openexr/lib/Imath-2_2_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/lib/IlmImf-2_2.lib ${HARVEST_TARGET}/openexr/lib/IlmImf-2_2_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/lib/IlmImfUtil-2_2.lib ${HARVEST_TARGET}/openexr/lib/IlmImfUtil-2_2_d.lib &&
|
||||
# opencollada
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib &&
|
||||
# blosc
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib &&
|
||||
# osl
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib &&
|
||||
# opensubdiv
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib &&
|
||||
# tbb
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib &&
|
||||
# openvdb
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib &&
|
||||
# python
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
|
||||
# alembic
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib &&
|
||||
# hdf5
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
|
||||
# numpy
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz &&
|
||||
# python
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz
|
||||
DEPENDS Package_Python
|
||||
)
|
||||
endif()
|
||||
|
||||
else(WIN32)
|
||||
|
||||
function(harvest from to)
|
||||
set(pattern "")
|
||||
foreach(f ${ARGN})
|
||||
set(pattern ${f})
|
||||
endforeach()
|
||||
|
||||
if(pattern STREQUAL "")
|
||||
get_filename_component(dirpath ${to} DIRECTORY)
|
||||
get_filename_component(filename ${to} NAME)
|
||||
install(
|
||||
FILES ${LIBDIR}/${from}
|
||||
DESTINATION ${HARVEST_TARGET}/${dirpath}
|
||||
RENAME ${filename})
|
||||
else()
|
||||
install(
|
||||
DIRECTORY ${LIBDIR}/${from}/
|
||||
DESTINATION ${HARVEST_TARGET}/${to}
|
||||
USE_SOURCE_PERMISSIONS
|
||||
FILES_MATCHING PATTERN ${pattern}
|
||||
PATTERN "pkgconfig" EXCLUDE
|
||||
PATTERN "cmake" EXCLUDE
|
||||
PATTERN "clang" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE
|
||||
PATTERN "tests" EXCLUDE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
harvest(alembic/include alembic/include "*.h")
|
||||
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
|
||||
harvest(alembic/bin alembic/bin "*")
|
||||
harvest(blosc/lib openvdb/lib "*.a")
|
||||
harvest(boost/include boost/include "*")
|
||||
harvest(boost/lib boost/lib "*.a")
|
||||
harvest(ffmpeg/include ffmpeg/include "*.h")
|
||||
harvest(ffmpeg/lib ffmpeg/lib "*.a")
|
||||
harvest(fftw3/include fftw3/include "*.h")
|
||||
harvest(fftw3/lib fftw3/lib "*.a")
|
||||
harvest(flac/lib sndfile/lib "libFLAC.a")
|
||||
harvest(freetype/include freetype/include "*.h")
|
||||
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
|
||||
harvest(glew/include glew/include "*.h")
|
||||
harvest(glew/lib glew/lib "*.a")
|
||||
harvest(ilmbase openexr "*")
|
||||
harvest(ilmbase/include openexr/include "*.h")
|
||||
harvest(jemalloc/include jemalloc/include "*.h")
|
||||
harvest(jemalloc/lib jemalloc/lib "*.a")
|
||||
harvest(jpg/include jpeg/include "*.h")
|
||||
harvest(jpg/lib jpeg/lib "libjpeg.a")
|
||||
harvest(lame/lib ffmpeg/lib "*.a")
|
||||
harvest(llvm/bin llvm/bin "llvm-config")
|
||||
harvest(llvm/lib llvm/lib "libLLVM*.a")
|
||||
harvest(ogg/lib ffmpeg/lib "*.a")
|
||||
harvest(openal/include openal/include "*.h")
|
||||
if(UNIX AND NOT APPLE)
|
||||
harvest(openal/lib openal/lib "*.a")
|
||||
endif()
|
||||
harvest(opencollada/include/opencollada opencollada/include "*.h")
|
||||
harvest(opencollada/lib/opencollada opencollada/lib "*.a")
|
||||
harvest(opencolorio/include opencolorio/include "*.h")
|
||||
harvest(opencolorio/lib opencolorio/lib "*.a")
|
||||
harvest(openexr/include openexr/include "*.h")
|
||||
harvest(openexr/lib openexr/lib "*.a")
|
||||
harvest(openimageio/bin openimageio/bin "idiff")
|
||||
harvest(openimageio/bin openimageio/bin "maketx")
|
||||
harvest(openimageio/bin openimageio/bin "oiiotool")
|
||||
harvest(openimageio/include openimageio/include "*")
|
||||
harvest(openimageio/lib openimageio/lib "*.a")
|
||||
harvest(openjpeg/include/openjpeg-1.5 openjpeg/include "*.h")
|
||||
harvest(openjpeg/lib openjpeg/lib "*.a")
|
||||
harvest(opensubdiv/include opensubdiv/include "*.h")
|
||||
harvest(opensubdiv/lib opensubdiv/lib "*.a")
|
||||
harvest(openvdb/include/openvdb/openvdb openvdb/include/openvdb "*.h")
|
||||
harvest(openvdb/lib openvdb/lib "*.a")
|
||||
harvest(orc/lib/liborc-0.4.a ffmpeg/lib/liborc.a)
|
||||
harvest(osl/bin osl/bin "oslc")
|
||||
harvest(osl/include osl/include "*.h")
|
||||
harvest(osl/lib osl/lib "*.a")
|
||||
harvest(osl/shaders osl/shaders "*.h")
|
||||
harvest(png/include png/include "*.h")
|
||||
harvest(png/lib png/lib "*.a")
|
||||
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}m")
|
||||
harvest(python/include python/include "*h")
|
||||
harvest(python/lib python/lib "*")
|
||||
harvest(schroedinger/lib/libschroedinger-1.0.a ffmpeg/lib/libschroedinger.a)
|
||||
harvest(sdl/include/SDL2 sdl/include "*.h")
|
||||
harvest(sdl/lib sdl/lib "libSDL2.a")
|
||||
harvest(sndfile/include sndfile/include "*.h")
|
||||
harvest(sndfile/lib sndfile/lib "*.a")
|
||||
harvest(spnav/include spnav/include "*.h")
|
||||
harvest(spnav/lib spnav/lib "*.a")
|
||||
harvest(tbb/include tbb/include "*.h")
|
||||
harvest(tbb/lib/libtbb_static.a tbb/lib/libtbb.a)
|
||||
harvest(theora/lib ffmpeg/lib "*.a")
|
||||
harvest(tiff/include tiff/include "*.h")
|
||||
harvest(tiff/lib tiff/lib "*.a")
|
||||
harvest(vorbis/lib ffmpeg/lib "*.a")
|
||||
harvest(vpx/lib ffmpeg/lib "*.a")
|
||||
harvest(webp/lib ffmpeg/lib "*.a")
|
||||
harvest(x264/lib ffmpeg/lib "*.a")
|
||||
harvest(xml2/lib opencollada/lib "*.a")
|
||||
harvest(xvidcore/lib ffmpeg/lib "*.a")
|
||||
|
||||
endif()
|
@@ -1,42 +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 *****
|
||||
|
||||
set(HDF5_EXTRA_ARGS
|
||||
-DHDF5_ENABLE_THREADSAFE=Off
|
||||
-DHDF5_BUILD_CPP_LIB=Off
|
||||
-DBUILD_TESTING=Off
|
||||
-DHDF5_BUILD_TOOLS=Off
|
||||
-DHDF5_BUILD_EXAMPLES=Off
|
||||
-DHDF5_BUILD_HL_LIB=On
|
||||
-DBUILD_STATIC_CRT_LIBS=On
|
||||
-DBUILD_SHARED_LIBS=On
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(HDF5_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/hdf5/src/external_hdf5 < ${PATCH_DIR}/hdf5.diff)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_hdf5
|
||||
URL ${HDF5_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${HDF5_HASH}
|
||||
PREFIX ${BUILD_DIR}/hdf5
|
||||
PATCH_COMMAND ${HDF5_PATCH}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/hdf5
|
||||
)
|
@@ -1,29 +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 *****
|
||||
|
||||
set(HIDAPI_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_hidapi
|
||||
URL ${HIDAPI_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${HIDAPI_HASH}
|
||||
PREFIX ${BUILD_DIR}/hidapi
|
||||
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_hidapi.txt ${BUILD_DIR}/hidapi/src/external_hidapi/cmakelists.txt && ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/hidapi/src/external_hidapi < ${PATCH_DIR}/hidapi.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hidapi -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${HIDAPI_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/hidapi
|
||||
)
|
@@ -1,34 +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 *****
|
||||
|
||||
set(ICONV_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_iconv
|
||||
URL ${ICONV_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${ICONV_HASH}
|
||||
PREFIX ${BUILD_DIR}/iconv
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/iconv
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,35 +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 *****
|
||||
|
||||
if(WIN32)
|
||||
set(ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
|
||||
endif()
|
||||
|
||||
set(ILMBASE_EXTRA_ARGS
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DCMAKE_CXX_STANDARD_LIBRARIES=${ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_ilmbase
|
||||
URL ${ILMBASE_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${ILMBASE_HASH}
|
||||
PREFIX ${BUILD_DIR}/ilmbase
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ilmbase ${DEFAULT_CMAKE_FLAGS} ${ILMBASE_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openexr
|
||||
)
|
@@ -1,28 +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 *****
|
||||
|
||||
ExternalProject_Add(external_jemalloc
|
||||
URL ${JEMALLOC_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${JEMALLOC_HASH}
|
||||
PREFIX ${BUILD_DIR}/jemalloc
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/jemalloc
|
||||
)
|
@@ -1,65 +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 *****
|
||||
|
||||
if(WIN32)
|
||||
# cmake for windows
|
||||
set(JPEG_EXTRA_ARGS -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
|
||||
|
||||
ExternalProject_Add(external_jpeg
|
||||
URL ${JPEG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${JPEG_HASH}
|
||||
PREFIX ${BUILD_DIR}/jpg
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/jpg
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_jpeg after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpegd${LIBEXT} ${LIBDIR}/jpg/lib/jpeg${LIBEXT}
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(JPEG_LIBRARY jpeg-static${LIBEXT})
|
||||
else()
|
||||
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
|
||||
endif()
|
||||
else(WIN32)
|
||||
# autoconf for unix
|
||||
if(APPLE)
|
||||
set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
|
||||
else()
|
||||
set(JPEG_EXTRA_ARGS --with-jpeg8)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_jpeg
|
||||
URL ${JPEG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${JPEG_HASH}
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
|
||||
BUILD_IN_SOURCE 1
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && make install
|
||||
PREFIX ${BUILD_DIR}/jpg
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/jpg
|
||||
)
|
||||
|
||||
set(JPEG_LIBRARY libjpeg${LIBEXT})
|
||||
endif(WIN32)
|
@@ -1,47 +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 *****
|
||||
|
||||
set(LAME_EXTRA_ARGS)
|
||||
if(MSVC)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
|
||||
set(LAME_EXTRA_ARGS CFLAGS=-msse)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_lame
|
||||
URL ${LAME_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${LAME_HASH}
|
||||
PREFIX ${BUILD_DIR}/lame
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
|
||||
--enable-export=full
|
||||
--with-fileio=sndfile
|
||||
--without-vorbis
|
||||
--with-pic
|
||||
--disable-mp3x
|
||||
--disable-mp3rtp
|
||||
--disable-gtktest
|
||||
--enable-export=full
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/lame
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_lame PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -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 *****
|
||||
|
||||
set(LAPACK_EXTRA_ARGS)
|
||||
|
||||
if(WIN32)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(LAPACK_EXTRA_ARGS -G "MSYS Makefiles" -DCMAKE_Fortran_COMPILER=${DOWNLOAD_DIR}/mingw/mingw64/bin/gfortran.exe)
|
||||
else()
|
||||
set(LAPACK_EXTRA_ARGS -G "MSYS Makefiles" -DCMAKE_Fortran_COMPILER=${DOWNLOAD_DIR}/mingw/mingw32/bin/gfortran.exe)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_lapack
|
||||
URL ${LAPACK_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${LAPACK_HASH}
|
||||
PREFIX ${BUILD_DIR}/lapack
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lapack/src/external_lapack/ && ${CMAKE_COMMAND} ${LAPACK_EXTRA_ARGS} -DBUILD_TESTING=Off -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lapack .
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lapack/src/external_lapack/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lapack/src/external_lapack/ && make install
|
||||
|
||||
INSTALL_DIR ${LIBDIR}/lapack
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_lapack PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,61 +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 *****
|
||||
|
||||
set(LLVM_EXTRA_ARGS
|
||||
-DLLVM_USE_CRT_RELEASE=MT
|
||||
-DLLVM_USE_CRT_DEBUG=MTd
|
||||
-DLLVM_INCLUDE_TESTS=OFF
|
||||
-DLLVM_TARGETS_TO_BUILD=X86
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF
|
||||
-DLLVM_ENABLE_TERMINFO=OFF
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(LLVM_GENERATOR "NMake Makefiles")
|
||||
else()
|
||||
set(LLVM_GENERATOR "Unix Makefiles")
|
||||
endif()
|
||||
|
||||
# short project name due to long filename issues on windows
|
||||
ExternalProject_Add(ll
|
||||
URL ${LLVM_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${LLVM_HASH}
|
||||
CMAKE_GENERATOR ${LLVM_GENERATOR}
|
||||
PREFIX ${BUILD_DIR}/ll
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ll/src/ll < ${PATCH_DIR}/llvm-alloca-fix.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/llvm
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ )
|
||||
else()
|
||||
set(LLVM_HARVEST_COMMAND
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/
|
||||
)
|
||||
endif()
|
||||
ExternalProject_Add_Step(ll after_install
|
||||
COMMAND ${LLVM_HARVEST_COMMAND}
|
||||
DEPENDEES mkdir update patch download configure build install
|
||||
)
|
||||
endif()
|
||||
|
@@ -1,60 +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 *****
|
||||
|
||||
if(MSVC)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(NUMPY_DIR_POSTFIX -pydebug)
|
||||
set(NUMPY_ARCHIVE_POSTFIX d)
|
||||
set(NUMPY_BUILD_OPTION --debug)
|
||||
else()
|
||||
set(NUMPY_DIR_POSTFIX)
|
||||
set(NUMPY_ARCHIVE_POSTFIX)
|
||||
set(NUMPY_BUILD_OPTION)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(NUMPY_POSTFIX)
|
||||
|
||||
if(WIN32)
|
||||
set(NUMPY_INSTALL
|
||||
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
|
||||
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
|
||||
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
|
||||
)
|
||||
set(NUMPY_PATCH ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff )
|
||||
else()
|
||||
set(NUMPY_INSTALL echo .)
|
||||
set(NUMPY_PATCH echo .)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_numpy
|
||||
URL ${NUMPY_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${NUMPY_HASH}
|
||||
PREFIX ${BUILD_DIR}/numpy
|
||||
PATCH_COMMAND ${NUMPY_PATCH}
|
||||
CONFIGURE_COMMAND ""
|
||||
LOG_BUILD 1
|
||||
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
|
||||
INSTALL_COMMAND ${NUMPY_INSTALL}
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_numpy
|
||||
Make_Python_Environment
|
||||
)
|
@@ -1,32 +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 *****
|
||||
|
||||
ExternalProject_Add(external_ogg
|
||||
URL ${OGG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${OGG_HASH}
|
||||
PREFIX ${BUILD_DIR}/ogg
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/ogg
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,42 +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 *****
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(OPENAL_EXTRA_ARGS
|
||||
-DALSOFT_UTILS=Off
|
||||
-DALSOFT_NO_CONFIG_UTIL=On
|
||||
-DALSOFT_EXAMPLES=Off
|
||||
-DALSOFT_TESTS=Off
|
||||
-DALSOFT_CONFIG=Off
|
||||
-DALSOFT_HRTF_DEFS=Off
|
||||
-DALSOFT_INSTALL=On
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
set(OPENAL_EXTRA_ARGS ${OPENAL_EXTRA_ARGS} -DLIBTYPE=STATIC)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_openal
|
||||
URL ${OPENAL_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENAL_HASH}
|
||||
PREFIX ${BUILD_DIR}/openal
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openal
|
||||
)
|
||||
endif()
|
@@ -1,40 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(OPENCOLLADA_EXTRA_ARGS
|
||||
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
|
||||
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_opencollada
|
||||
URL ${OPENCOLLADA_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENCOLLADA_HASH}
|
||||
PREFIX ${BUILD_DIR}/opencollada
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/opencollada
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
add_dependencies(
|
||||
external_opencollada
|
||||
external_xml2
|
||||
)
|
||||
endif()
|
@@ -1,73 +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 *****
|
||||
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=ON
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBOOST_INCLUDEDIR=${LIBDIR}/boost/include/boost_1_60/boost
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DBoost_DEBUG=ON
|
||||
-DBoost_MAJOR_VERSION=1
|
||||
-DBoost_MINOR_VERSION=60
|
||||
-DOCIO_BUILD_APPS=OFF
|
||||
-DOCIO_BUILD_PYGLUE=OFF
|
||||
-DOCIO_BUILD_NUKE=OFF
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
${OPENCOLORIO_EXTRA_ARGS}
|
||||
-DOCIO_USE_BOOST_PTR=ON
|
||||
-DOCIO_BUILD_STATIC=OFF
|
||||
-DOCIO_BUILD_SHARED=ON
|
||||
)
|
||||
else()
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
${OPENCOLORIO_EXTRA_ARGS}
|
||||
-DOCIO_USE_BOOST_PTR=OFF
|
||||
-DOCIO_BUILD_STATIC=ON
|
||||
-DOCIO_BUILD_SHARED=OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_opencolorio
|
||||
URL ${OPENCOLORIO_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENCOLORIO_HASH}
|
||||
PREFIX ${BUILD_DIR}/opencolorio
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/opencolorio.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/opencolorio
|
||||
)
|
||||
|
||||
if(NOT WIN32)
|
||||
add_custom_command(
|
||||
OUTPUT ${LIBDIR}/opencolorio/lib/libtinyxml.a
|
||||
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libtinyxml.a ${LIBDIR}/opencolorio/lib/libtinyxml.a
|
||||
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/libyaml-cpp.a
|
||||
)
|
||||
add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_opencolorio
|
||||
external_boost
|
||||
)
|
@@ -1,45 +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 *****
|
||||
|
||||
if(WIN32)
|
||||
set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
|
||||
endif()
|
||||
|
||||
set(OPENEXR_EXTRA_ARGS
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_openexr
|
||||
URL ${OPENEXR_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENEXR_HASH}
|
||||
PREFIX ${BUILD_DIR}/openexr
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/openexr/src/external_openexr < ${PATCH_DIR}/openexr.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openexr
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_openexr
|
||||
external_zlib
|
||||
external_ilmbase
|
||||
)
|
@@ -1,151 +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 *****
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(OIIO_TOOLS ON)
|
||||
else()
|
||||
set(OIIO_TOOLS OFF)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# This causes linking to static pthread libraries which gives link errors.
|
||||
# Since we manually specify library paths it should static link other libs.
|
||||
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
|
||||
else()
|
||||
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(PNG_LIBNAME libpng16_static${LIBEXT})
|
||||
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
|
||||
set(OPENJPEG_POSTFIX _msvc)
|
||||
else()
|
||||
set(PNG_LIBNAME libpng${LIBEXT})
|
||||
set(OIIO_SIMD_FLAGS)
|
||||
endif()
|
||||
|
||||
if(WITH_WEBP)
|
||||
set(WEBP_ARGS
|
||||
-DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
|
||||
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
|
||||
)
|
||||
set(WEBP_DEP external_webp)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(OPENJPEG_FLAGS
|
||||
-DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
|
||||
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
|
||||
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT}
|
||||
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT}
|
||||
)
|
||||
else()
|
||||
set(OPENJPEG_FLAGS
|
||||
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
|
||||
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
||||
set(OPENIMAGEIO_EXTRA_ARGS
|
||||
-DBUILDSTATIC=ON
|
||||
${OPENIMAGEIO_LINKSTATIC}
|
||||
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
|
||||
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf-2_2${LIBEXT}
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=ON
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-OIIO_BUILD_CPP11=ON
|
||||
-DUSE_OPENGL=OFF
|
||||
-DUSE_TBB=OFF
|
||||
-DUSE_FIELD3D=OFF
|
||||
-DUSE_QT=OFF
|
||||
-DUSE_PYTHON=OFF
|
||||
-DUSE_GIF=OFF
|
||||
-DUSE_OPENCV=OFF
|
||||
-DUSE_OPENSSL=OFF
|
||||
-DUSE_OPENJPEG=ON
|
||||
-DUSE_FFMPEG=OFF
|
||||
-DUSE_PTEX=OFF
|
||||
-DUSE_FREETYPE=OFF
|
||||
-DUSE_LIBRAW=OFF
|
||||
-DUSE_PYTHON=OFF
|
||||
-DUSE_PYTHON3=OFF
|
||||
-DUSE_OCIO=OFF
|
||||
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
|
||||
-DOIIO_BUILD_TESTS=OFF
|
||||
-DBUILD_TESTING=OFF
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
|
||||
-DPNG_LIBRARY=${LIBDIR}/png/lib/${PNG_LIBNAME}
|
||||
-DPNG_PNG_INCLUDE_DIR=${LIBDIR}/png/include
|
||||
-DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
|
||||
-DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
|
||||
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
|
||||
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
|
||||
${OPENJPEG_FLAGS}
|
||||
-DOCIO_PATH=${LIBDIR}/opencolorio/
|
||||
-DOpenEXR_USE_STATIC_LIBS=On
|
||||
-DOPENEXR_HOME=${LIBDIR}/openexr/
|
||||
-DILMBASE_INCLUDE_PATH=${LIBDIR}/ilmbase/
|
||||
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase/
|
||||
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
|
||||
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${LIBEXT}
|
||||
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
|
||||
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
|
||||
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
|
||||
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
|
||||
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
|
||||
-DSTOP_ON_WARNING=OFF
|
||||
${WEBP_FLAGS}
|
||||
${OIIO_SIMD_FLAGS}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_openimageio
|
||||
URL ${OPENIMAGEIO_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENIMAGEIO_HASH}
|
||||
PREFIX ${BUILD_DIR}/openimageio
|
||||
PATCH_COMMAND
|
||||
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
|
||||
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_staticexr.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openimageio
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_openimageio
|
||||
external_png external_zlib
|
||||
external_ilmbase
|
||||
external_openexr
|
||||
external_jpeg
|
||||
external_boost
|
||||
external_tiff
|
||||
external_opencolorio
|
||||
external_openjpeg${OPENJPEG_POSTFIX}
|
||||
${WEBP_DEP}
|
||||
)
|
||||
if(NOT WIN32)
|
||||
add_dependencies(
|
||||
external_openimageio
|
||||
external_opencolorio_extra
|
||||
)
|
||||
endif()
|
@@ -1,64 +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 *****
|
||||
|
||||
# Note the encoder/decoder may use png/tiff/lcms system libraries, but the
|
||||
# library itself does not depend on them, so should give no problems.
|
||||
|
||||
set(OPENJPEG_EXTRA_ARGS -DBUILD_SHARED_LIBS=OFF)
|
||||
|
||||
if(WIN32)
|
||||
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles")
|
||||
else()
|
||||
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_openjpeg
|
||||
URL ${OPENJPEG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${OPENJPEG_HASH}
|
||||
PREFIX ${BUILD_DIR}/openjpeg
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/openjpeg
|
||||
)
|
||||
|
||||
#on windows ffmpeg wants a mingw build, while oiio needs a msvc build
|
||||
if(MSVC)
|
||||
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
|
||||
ExternalProject_Add(external_openjpeg_msvc
|
||||
URL ${OPENJPEG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${OPENJPEG_HASH}
|
||||
PREFIX ${BUILD_DIR}/openjpeg_msvc
|
||||
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
|
||||
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
|
||||
)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_openjpeg_msvc after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(OPENJPEG_LIBRARY libopenjpeg${LIBEXT})
|
||||
if(MSVC)
|
||||
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,78 +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 *****
|
||||
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
-DNO_EXAMPLES=ON
|
||||
-DNO_REGRESSION=ON
|
||||
-DNO_PYTHON=ON
|
||||
-DNO_MAYA=ON
|
||||
-DNO_PTEX=ON
|
||||
-DNO_DOC=ON
|
||||
-DNO_CLEW=OFF
|
||||
-DNO_OPENCL=OFF
|
||||
-DNO_TUTORIALS=ON
|
||||
-DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
|
||||
-DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
|
||||
-DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
|
||||
-DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
#no cuda support for vc15 yet
|
||||
if(msvc15)
|
||||
set(OPENSUBDIV_CUDA ON)
|
||||
else()
|
||||
set(OPENSUBDIV_CUDA ON)
|
||||
endif()
|
||||
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
${OPENSUBDIV_EXTRA_ARGS}
|
||||
-DNO_CUDA=${OPENSUBDIV_CUDA}
|
||||
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
|
||||
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
|
||||
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
|
||||
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
|
||||
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
|
||||
)
|
||||
else()
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
${OPENSUBDIV_EXTRA_ARGS}
|
||||
-DNO_CUDA=ON
|
||||
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
|
||||
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
|
||||
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/static/${LIBPREFIX}clew${LIBEXT}
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_opensubdiv
|
||||
URL ${OPENSUBDIV_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENSUBDIV_Hash}
|
||||
PREFIX ${BUILD_DIR}/opensubdiv
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/opensubdiv/src/external_opensubdiv < ${PATCH_DIR}/opensubdiv.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/opensubdiv
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_opensubdiv
|
||||
external_glew
|
||||
external_glfw
|
||||
external_clew
|
||||
external_cuew
|
||||
)
|
@@ -1,80 +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 *****
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(BLOSC_POST _d)
|
||||
endif()
|
||||
|
||||
set(OPENVDB_EXTRA_ARGS
|
||||
-DILMBASE_HOME=${LIBDIR}/ilmbase/
|
||||
-DILMBASE_CUSTOM=ON
|
||||
-DILMBASE_CUSTOM_LIBRARIES=Half;Imath-2_2;IlmThread-2_2;Iex-2_2
|
||||
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
|
||||
-DILMBASE_HALF_LIBRARIES=${LIBDIR}/ilmbase/lib/Half${LIBEXT}
|
||||
-DILMBASE_IMATH_LIBRARIES=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
|
||||
-DILMBASE_ILMTHREAD_LIBRARIES=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
|
||||
-DILMBASE_IEX_LIBRARIES=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
|
||||
-DOPENEXR_HOME=${LIBDIR}/openexr/
|
||||
-DOPENEXR_USE_STATIC_LIBS=ON
|
||||
-DOPENEXR_CUSTOM=ON
|
||||
-DOPENEXR_CUSTOM_LIBRARY=IlmImf-2_2
|
||||
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
|
||||
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
|
||||
-DTBB_ROOT_DIR=${LIBDIR}/tbb/
|
||||
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
|
||||
-DTBB_LIBRARY=${LIBDIR}/tbb/lib/tbb_static${LIBEXT}
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=ON
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DWITH_BLOSC=ON
|
||||
-DBLOSC_INCLUDE_DIR=${LIBDIR}/blosc/include/
|
||||
-DBLOSC_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
|
||||
)
|
||||
|
||||
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS})
|
||||
|
||||
# CMake script for OpenVDB based on https://raw.githubusercontent.com/diekev/openvdb-cmake/master/CMakeLists.txt
|
||||
# can't be in external_openvdb because of how the includes are setup.
|
||||
|
||||
ExternalProject_Add(openvdb
|
||||
URL ${OPENVDB_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENVDB_HASH}
|
||||
PREFIX ${BUILD_DIR}/openvdb
|
||||
PATCH_COMMAND COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_openvdb.txt ${BUILD_DIR}/openvdb/src/openvdb/CMakeLists.txt &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${PATCH_DIR}/cmake/ ${BUILD_DIR}/openvdb/src/openvdb/cmake/ &&
|
||||
${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb_vc2013.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openvdb
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
openvdb
|
||||
external_tbb
|
||||
external_boost
|
||||
external_ilmbase
|
||||
external_openexr
|
||||
external_zlib
|
||||
external_blosc
|
||||
)
|
@@ -1,211 +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 *****
|
||||
|
||||
if(WIN32)
|
||||
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
|
||||
endif()
|
||||
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
|
||||
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
|
||||
|
||||
if(NOT BUILD_MODE)
|
||||
set(BUILD_MODE "Release")
|
||||
message(STATUS "Build type not specified: defaulting to a release build.")
|
||||
endif()
|
||||
message("BuildMode = ${BUILD_MODE}")
|
||||
|
||||
if(BUILD_MODE STREQUAL "Debug")
|
||||
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
|
||||
else(BUILD_MODE STREQUAL "Debug")
|
||||
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
|
||||
endif()
|
||||
|
||||
option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads)
|
||||
file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR)
|
||||
set(PATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patches)
|
||||
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/build)
|
||||
|
||||
message("LIBDIR = ${LIBDIR}")
|
||||
message("DOWNLOAD_DIR = ${DOWNLOAD_DIR}")
|
||||
message("PATCH_DIR = ${PATCH_DIR}")
|
||||
message("BUILD_DIR = ${BUILD_DIR}")
|
||||
|
||||
if(WIN32)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
|
||||
else()
|
||||
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/patch.exe)
|
||||
endif()
|
||||
set(LIBEXT ".lib")
|
||||
set(LIBPREFIX "")
|
||||
|
||||
# For OIIO and OSL
|
||||
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
|
||||
|
||||
# TODO FIXME highly MSVC specific
|
||||
if(WITH_OPTIMIZED_DEBUG)
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
else()
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
endif()
|
||||
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
|
||||
if(WITH_OPTIMIZED_DEBUG)
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
else()
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
endif()
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
|
||||
set(PLATFORM_FLAGS)
|
||||
set(PLATFORM_CXX_FLAGS)
|
||||
set(PLATFORM_CMAKE_FLAGS)
|
||||
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
|
||||
set(MINGW_SHELL ming64sh.cmd)
|
||||
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
|
||||
set(MINGW_HOST x86_64-w64-mingw32)
|
||||
else()
|
||||
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw32)
|
||||
set(MINGW_SHELL ming32sh.cmd)
|
||||
set(PERL_SHELL ${DOWNLOAD_DIR}/perl32/portableshell.bat)
|
||||
set(MINGW_HOST i686-w64-mingw32)
|
||||
endif()
|
||||
|
||||
set(CONFIGURE_ENV
|
||||
cd ${MINGW_PATH} &&
|
||||
call ${MINGW_SHELL} &&
|
||||
call ${PERL_SHELL} &&
|
||||
set path &&
|
||||
set CFLAGS=-g &&
|
||||
set LDFLAGS=-Wl,--as-needed -static-libgcc
|
||||
)
|
||||
|
||||
set(CONFIGURE_ENV_NO_PERL
|
||||
cd ${MINGW_PATH} &&
|
||||
call ${MINGW_SHELL} &&
|
||||
set path &&
|
||||
set CFLAGS=-g &&
|
||||
set LDFLAGS=-Wl,--as-needed -static-libgcc
|
||||
)
|
||||
|
||||
set(CONFIGURE_COMMAND sh ./configure)
|
||||
set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
|
||||
else()
|
||||
set(PATCH_CMD patch)
|
||||
set(LIBEXT ".a")
|
||||
set(LIBPREFIX "lib")
|
||||
|
||||
if(APPLE)
|
||||
# Let's get the current Xcode dir, to support xcode-select
|
||||
execute_process(
|
||||
COMMAND xcode-select --print-path
|
||||
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
set(OSX_ARCHITECTURES x86_64)
|
||||
set(OSX_DEPLOYMENT_TARGET 10.9)
|
||||
set(OSX_SDK_VERSION 10.12)
|
||||
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk)
|
||||
|
||||
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
|
||||
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
|
||||
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
|
||||
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin13.0.0) # OS X 10.9
|
||||
set(PLATFORM_CMAKE_FLAGS
|
||||
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
|
||||
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
|
||||
)
|
||||
else()
|
||||
set(PLATFORM_CFLAGS "-fPIC")
|
||||
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
|
||||
set(PLATFORM_LDFLAGS)
|
||||
set(PLATFORM_BUILD_TARGET)
|
||||
set(PLATFORM_CMAKE_FLAGS)
|
||||
endif()
|
||||
|
||||
if(WITH_OPTIMIZED_DEBUG)
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG")
|
||||
else()
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g")
|
||||
endif()
|
||||
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
|
||||
|
||||
if(WITH_OPTIMIZED_DEBUG)
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
|
||||
else()
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-g ${PLATFORM_CXXFLAGS}")
|
||||
endif()
|
||||
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CXXFLAGS}")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
|
||||
|
||||
set(CONFIGURE_ENV
|
||||
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
|
||||
export CFLAGS=${PLATFORM_CFLAGS} &&
|
||||
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
|
||||
export LDFLAGS=${PLATFORM_LDFLAGS}
|
||||
)
|
||||
set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
|
||||
set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
|
||||
set(CONFIGURE_COMMAND_NO_TARGET ./configure)
|
||||
endif()
|
||||
|
||||
set(DEFAULT_CMAKE_FLAGS
|
||||
-DCMAKE_BUILD_TYPE=${BUILD_MODE}
|
||||
-DCMAKE_C_FLAGS_DEBUG=${BLENDER_CMAKE_C_FLAGS_DEBUG}
|
||||
-DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CMAKE_C_FLAGS_MINSIZEREL}
|
||||
-DCMAKE_C_FLAGS_RELEASE=${BLENDER_CMAKE_C_FLAGS_RELEASE}
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO}
|
||||
-DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CMAKE_CXX_FLAGS_DEBUG}
|
||||
-DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
|
||||
-DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
|
||||
${PLATFORM_CMAKE_FLAGS}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
#we need both flavors to build the thumbnail dlls
|
||||
if(MSVC12)
|
||||
set(GENERATOR_32 "Visual Studio 12 2013")
|
||||
set(GENERATOR_64 "Visual Studio 12 2013 Win64")
|
||||
elseif(MSVC14)
|
||||
set(GENERATOR_32 "Visual Studio 14 2015")
|
||||
set(GENERATOR_64 "Visual Studio 14 2015 Win64")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if(WIN32)
|
||||
set(ZLIB_LIBRARY zlibstatic${LIBEXT})
|
||||
else()
|
||||
set(ZLIB_LIBRARY libz${LIBEXT})
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
endif()
|
||||
|
||||
set(CMAKE_INSTALL_MESSAGE LAZY)
|
@@ -1,32 +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 *****
|
||||
|
||||
ExternalProject_Add(external_orc
|
||||
URL ${ORC_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${ORC_HASH}
|
||||
PREFIX ${BUILD_DIR}/orc
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/orc/src/external_orc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/orc --disable-shared --enable-static
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/orc/src/external_orc/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/orc/src/external_orc/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/orc
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_orc PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,98 +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 *****
|
||||
|
||||
if(WIN32)
|
||||
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
|
||||
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DFLEX_EXTRA_OPTIONS="--wincompat" -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
|
||||
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}")
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
|
||||
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
|
||||
else()
|
||||
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
|
||||
endif()
|
||||
else()
|
||||
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
|
||||
set(OSL_FLEX_BISON)
|
||||
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}")
|
||||
endif()
|
||||
|
||||
set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/ilmbase/lib/Imath-2_2.lib^^${LIBDIR}/ilmbase/lib/Half.lib^^${LIBDIR}/ilmbase/lib/IlmThread-2_2.lib^^${LIBDIR}/ilmbase/lib/Iex-2_2.lib")
|
||||
set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/LLVMipo${LIBEXT}")
|
||||
|
||||
set(OSL_EXTRA_ARGS
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=ON
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DLLVM_DIRECTORY=${LIBDIR}/llvm
|
||||
-DLLVM_INCLUDES=${LIBDIR}/llvm/include
|
||||
-DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
|
||||
-DLLVM_VERSION=3.4
|
||||
-DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
|
||||
-DOPENEXR_HOME=${LIBDIR}/openexr/
|
||||
-DILMBASE_HOME=${LIBDIR}/ilmbase/
|
||||
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
|
||||
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
|
||||
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
|
||||
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
|
||||
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
|
||||
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
|
||||
-DOSL_BUILD_TESTS=OFF
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
|
||||
-DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
|
||||
-DOPENIMAGEIO_INCLUDES=${LIBDIR}/openimageio/include
|
||||
${OSL_FLEX_BISON}
|
||||
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
|
||||
-DBUILDSTATIC=ON
|
||||
-DLINKSTATIC=ON
|
||||
-DOSL_BUILD_PLUGINS=Off
|
||||
-DSTOP_ON_WARNING=OFF
|
||||
-DOSL_BUILD_CPP11=ON
|
||||
-DUSE_LLVM_BITCODE=OFF
|
||||
${OSL_SIMD_FLAGS}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_osl
|
||||
URL ${OSL_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
LIST_SEPARATOR ^^
|
||||
URL_HASH MD5=${OSL_HASH}
|
||||
PREFIX ${BUILD_DIR}/osl
|
||||
PATCH_COMMAND
|
||||
${PATCH_CMD} -p 3 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff &&
|
||||
${PATCH_CMD} -p 0 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl_simd_oiio.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/osl
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_osl
|
||||
external_boost
|
||||
ll
|
||||
external_clang
|
||||
external_ilmbase
|
||||
external_openexr
|
||||
external_zlib
|
||||
external_flexbison
|
||||
external_openimageio
|
||||
)
|
@@ -1,44 +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 *****
|
||||
|
||||
set(PNG_EXTRA_ARGS
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DPNG_STATIC=ON
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_png
|
||||
URL ${PNG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${PNG_HASH}
|
||||
PREFIX ${BUILD_DIR}/png
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/png
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_png
|
||||
external_zlib
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_png after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
@@ -1,46 +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 *****
|
||||
|
||||
if(WIN32)
|
||||
set(PTHREAD_XCFLAGS /MD)
|
||||
|
||||
if(MSVC14) # vs2015 has timespec
|
||||
set(PTHREAD_CPPFLAGS "/I. /DHAVE_PTW32_CONFIG_H /D_TIMESPEC_DEFINED ")
|
||||
else() # everything before doesn't
|
||||
set(PTHREAD_CPPFLAGS "/I. /DHAVE_PTW32_CONFIG_H ")
|
||||
endif()
|
||||
|
||||
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XCFLAGS=${PTHREAD_XCFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
|
||||
|
||||
ExternalProject_Add(external_pthreads
|
||||
URL ${PTHREADS_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA512=${PTHREADS_SHA512}
|
||||
PREFIX ${BUILD_DIR}/pthreads
|
||||
CONFIGURE_COMMAND echo .
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
|
||||
BUILD_COMMAND ${PTHREADS_BUILD}
|
||||
INSTALL_COMMAND COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2.dll ${LIBDIR}/pthreads/lib/pthreadVC2.dll &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC2${LIBEXT} &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h
|
||||
INSTALL_DIR ${LIBDIR}/pthreads
|
||||
)
|
||||
endif()
|
@@ -1,140 +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 *****
|
||||
|
||||
set(PYTHON_POSTFIX)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(PYTHON_POSTFIX _d)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe)
|
||||
|
||||
macro(cmake_to_dos_path MsysPath ResultingPath)
|
||||
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
|
||||
endmacro()
|
||||
|
||||
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
|
||||
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
|
||||
|
||||
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
|
||||
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
|
||||
|
||||
message("Python externals = ${PYTHON_EXTERNALS_FOLDER}")
|
||||
message("Python externals_dos = ${PYTHON_EXTERNALS_FOLDER_DOS}")
|
||||
message("Python DOWNLOADS_EXTERNALS_FOLDER = ${DOWNLOADS_EXTERNALS_FOLDER}")
|
||||
message("Python DOWNLOADS_EXTERNALS_FOLDER_DOS = ${DOWNLOADS_EXTERNALS_FOLDER_DOS}")
|
||||
|
||||
ExternalProject_Add(external_python
|
||||
URL ${PYTHON_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${PYTHON_HASH}
|
||||
PREFIX ${BUILD_DIR}/python
|
||||
PATCH_COMMAND
|
||||
echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
|
||||
mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
|
||||
${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python.diff &&
|
||||
${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/pc < ${PATCH_DIR}/pyshell.diff
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE} -k ${PYTHON_COMPILER_STRING}
|
||||
INSTALL_COMMAND COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
|
||||
${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h
|
||||
)
|
||||
message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
|
||||
message("POutput = ${PYTHON_OUTPUTDIR}")
|
||||
else()
|
||||
if(APPLE)
|
||||
# we need to manually add homebrew headers to get ssl module building
|
||||
set(PYTHON_CFLAGS "-I/usr/local/opt/openssl/include -I${OSX_SYSROOT}/usr/include ${PLATFORM_CFLAGS}")
|
||||
set(PYTHON_LDFLAGS "-L/usr/local/opt/openssl/lib ${PLATFORM_LDFLAGS}")
|
||||
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && export CFLAGS=${PYTHON_CFLAGS} && export LDFLAGS=${PYTHON_LDFLAGS})
|
||||
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
|
||||
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_apple.diff)
|
||||
else()
|
||||
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
|
||||
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_python
|
||||
URL ${PYTHON_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${PYTHON_HASH}
|
||||
PREFIX ${BUILD_DIR}/python
|
||||
PATCH_COMMAND ${PYTHON_PATCH}
|
||||
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python
|
||||
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/python)
|
||||
|
||||
add_custom_target(Make_Python_Environment ALL DEPENDS external_python)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
add_custom_command(
|
||||
OUTPUT ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
|
||||
OUTPUT ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/lib ${BUILD_DIR}/python/src/external_python/redist/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_bz2${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_bz2${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_lzma${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_sqlite3${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_sqlite3${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ssl${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ssl${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/pyexpat${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/pyexpat${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes_test${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes_test${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_decimal${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_decimal${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_elementtree${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_elementtree${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_msi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_msi${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_multiprocessing${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_multiprocessing${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_overlapped${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_overlapped${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_socket${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_socket${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testbuffer${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testbuffer${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testcapi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testcapi${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testimportmultiple${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testimportmultiple${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testmultiphase${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testmultiphase${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz" "."
|
||||
)
|
||||
|
||||
add_custom_target(Package_Python ALL DEPENDS external_python ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe)
|
||||
|
||||
if(MSVC12)
|
||||
set(PYTHON_DISTUTIL_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/run/lib/distutils < ${PATCH_DIR}/python_runtime_vc2013.diff)
|
||||
else()
|
||||
set(PYTHON_DISTUTIL_PATCH echo "No patch needed")
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/redist ${BUILD_DIR}/python/src/external_python/run
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/run/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${BUILD_DIR}/python/src/external_python/run/include/pyconfig.h
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib #missing postfix on purpose, distutils is not expecting it
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib #other things like numpy still want it though.
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe -m ensurepip --upgrade
|
||||
COMMAND ${PYTHON_DISTUTIL_PATCH}
|
||||
)
|
||||
add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python)
|
||||
endif()
|
@@ -1,41 +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 *****
|
||||
if(WIN32)
|
||||
set(HARVEST_CMD cmd /C FOR /d /r ${BUILD_DIR}/python/src/external_python/run/lib/site-packages %d IN (__pycache__) DO @IF EXIST "%d" rd /s /q "%d" &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests
|
||||
)
|
||||
else()
|
||||
set(HARVEST_CMD echo .)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_python_site_packages
|
||||
DOWNLOAD_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
PREFIX ${BUILD_DIR}/site_packages
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all: && ${HARVEST_CMD}
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_python_site_packages
|
||||
Make_Python_Environment
|
||||
)
|
@@ -1,48 +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 *****
|
||||
|
||||
if(WIN32)
|
||||
set(SCHROEDINGER_EXTRA_FLAGS "CFLAGS=-g -I./ -I${LIBDIR}/orc/include/orc-0.4" "LDFLAGS=-Wl,--as-needed -static-libgcc -L${LIBDIR}/orc/lib" ORC_CFLAGS=-I${LIBDIR}/orc/include/orc-0.4 ORC_LDFLAGS=-L${LIBDIR}/orc/lib ORC_LIBS=${LIBDIR}/orc/lib/liborc-0.4.a ORCC=${LIBDIR}/orc/bin/orcc.exe)
|
||||
else()
|
||||
set(SCHROEDINGER_CFLAGS "${PLATFORM_CFLAGS} -I./ -I${LIBDIR}/orc/include/orc-0.4")
|
||||
set(SCHROEDINGER_LDFLAGS "${PLATFORM_LDFLAGS} -L${LIBDIR}/orc/lib")
|
||||
set(SCHROEDINGER_EXTRA_FLAGS CFLAGS=${SCHROEDINGER_CFLAGS} LDFLAGS=${SCHROEDINGER_LDFLAGS} ORC_CFLAGS=-I${LIBDIR}/orc/include/orc-0.4 ORC_LDFLAGS=-L${LIBDIR}/orc/lib ORCC=${LIBDIR}/orc/bin/orcc) # ORC_LIBS=${LIBDIR}/orc/lib/liborc-0.4.a
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_schroedinger
|
||||
URL ${SCHROEDINGER_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${SCHROEDINGER_HASH}
|
||||
PREFIX ${BUILD_DIR}/schroedinger
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/schroedinger/src/external_schroedinger < ${PATCH_DIR}/schroedinger.diff
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
|
||||
cd ${BUILD_DIR}/schroedinger/src/external_schroedinger/ &&
|
||||
${CONFIGURE_COMMAND} --prefix=${LIBDIR}/schroedinger --disable-shared --enable-static ${SCHROEDINGER_EXTRA_FLAGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/schroedinger/src/external_schroedinger/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/schroedinger/src/external_schroedinger/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/schroedinger
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_schroedinger
|
||||
external_orc
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_schroedinger PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,39 +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 *****
|
||||
|
||||
if(WIN32)
|
||||
set(SDL_EXTRA_ARGS
|
||||
-DSDL_STATIC=Off
|
||||
)
|
||||
else()
|
||||
set(SDL_EXTRA_ARGS
|
||||
-DSDL_STATIC=ON
|
||||
-DSDL_SHARED=OFF
|
||||
-DSDL_VIDEO=OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_sdl
|
||||
URL ${SDL_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${SDL_HASH}
|
||||
PREFIX ${BUILD_DIR}/sdl
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/sdl/src/external_sdl < ${PATCH_DIR}/sdl.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/sdl
|
||||
)
|
@@ -1,219 +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 *****
|
||||
|
||||
####################################################################################################################
|
||||
# Mingw32 Builds
|
||||
####################################################################################################################
|
||||
# This installs mingw32+msys to compile ffmpeg/iconv/libsndfile/lapack/fftw3
|
||||
####################################################################################################################
|
||||
|
||||
message("LIBDIR = ${LIBDIR}")
|
||||
macro(cmake_to_msys_path MsysPath ResultingPath)
|
||||
string(REPLACE ":" "" TmpPath "${MsysPath}")
|
||||
string(SUBSTRING ${TmpPath} 0 1 Drive)
|
||||
string(SUBSTRING ${TmpPath} 1 255 PathPart)
|
||||
string(TOLOWER ${Drive} LowerDrive)
|
||||
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
|
||||
endmacro()
|
||||
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
|
||||
message("mingw_LIBDIR = ${mingw_LIBDIR}")
|
||||
|
||||
message("Checking for mingw32")
|
||||
# download mingw32
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z")
|
||||
message("Downloading mingw32")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-release/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z" "${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z")
|
||||
endif()
|
||||
|
||||
# make mingw root directory
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# extract mingw32
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/mingw32env.cmd") AND (EXISTS "${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z"))
|
||||
message("Extracting mingw32")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for pkg-config")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
|
||||
message("Downloading pkg-config")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
|
||||
endif()
|
||||
|
||||
# extract pkgconfig
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
|
||||
message("Extracting pkg-config")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe"
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
message("Checking for nasm")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip")
|
||||
message("Downloading nasm")
|
||||
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win32/nasm-2.12.01-win32.zip" "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip")
|
||||
endif()
|
||||
|
||||
# extract nasm
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip"))
|
||||
message("Extracting nasm")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.12.01/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe"
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
message("Checking for mingwGet")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
|
||||
message("Downloading mingw-get")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
|
||||
endif()
|
||||
|
||||
# extract mingw_get
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
|
||||
message("Extracting mingw-get")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/
|
||||
)
|
||||
endif()
|
||||
|
||||
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/make.exe"))
|
||||
message("Installing MSYS")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-patch
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for CoreUtils")
|
||||
# download old core_utils for pr.exe (ffmpeg needs it to build)
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
|
||||
message("Downloading CoreUtils 5.97")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
|
||||
endif()
|
||||
|
||||
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"))
|
||||
message("Installing pr from CoreUtils 5.97")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd")
|
||||
message("Installing ming32sh.cmd")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming32sh.cmd ${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for perl")
|
||||
# download perl for libvpx
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
|
||||
message("Downloading perl")
|
||||
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-32bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
|
||||
endif()
|
||||
|
||||
# make perl root directory
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/perl32")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl32
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# extract perl
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/perl32/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip"))
|
||||
message("Extracting perl")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl32
|
||||
)
|
||||
endif()
|
||||
|
||||
# get yasm for vpx
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
|
||||
message("Downloading yasm")
|
||||
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
|
||||
endif()
|
||||
|
||||
message("checking i686-w64-mingw32-strings")
|
||||
# copy strings.exe to i686-w64-mingw32-strings for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe")
|
||||
message("fixing i686-w64-mingw32-strings.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("checking i686-w64-mingw32-ar.exe")
|
||||
# copy ar.exe to i686-w64-mingw32-ar.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe")
|
||||
message("fixing i686-w64-mingw32-ar.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("checking i686-w64-mingw32-strip.exe")
|
||||
# copy strip.exe to i686-w64-mingw32-strip.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe")
|
||||
message("fixing i686-w64-mingw32-strip.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("checking i686-w64-mingw32-ranlib.exe")
|
||||
# copy ranlib.exe to i686-w64-mingw32-ranlib.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe")
|
||||
message("fixing i686-w64-mingw32-ranlib.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
|
||||
)
|
||||
endif()
|
||||
|
@@ -1,219 +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 *****
|
||||
|
||||
####################################################################################################################
|
||||
# Mingw64 Builds
|
||||
####################################################################################################################
|
||||
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/lapack/fftw3
|
||||
####################################################################################################################
|
||||
|
||||
message("LIBDIR = ${LIBDIR}")
|
||||
macro(cmake_to_msys_path MsysPath ResultingPath)
|
||||
string(REPLACE ":" "" TmpPath "${MsysPath}")
|
||||
string(SUBSTRING ${TmpPath} 0 1 Drive)
|
||||
string(SUBSTRING ${TmpPath} 1 255 PathPart)
|
||||
string(TOLOWER ${Drive} LowerDrive)
|
||||
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
|
||||
endmacro()
|
||||
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
|
||||
message("mingw_LIBDIR = ${mingw_LIBDIR}")
|
||||
|
||||
message("Checking for mingw64")
|
||||
# download ming64
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z")
|
||||
message("Downloading mingw64")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.8-release/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z" "${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z")
|
||||
endif()
|
||||
|
||||
# make mingw root directory
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# extract mingw64
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/mingw64env.cmd") AND (EXISTS "${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z"))
|
||||
message("Extracting mingw64")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for pkg-config")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
|
||||
message("Downloading pkg-config")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
|
||||
endif()
|
||||
|
||||
# extract pkgconfig
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
|
||||
message("Extracting pkg-config")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe"
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
message("Checking for nasm")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip")
|
||||
message("Downloading nasm")
|
||||
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/nasm-2.12.01-win64.zip" "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip")
|
||||
endif()
|
||||
|
||||
# extract nasm
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip"))
|
||||
message("Extracting nasm")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.12.01/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe"
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
message("Checking for mingwGet")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
|
||||
message("Downloading mingw-get")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
|
||||
endif()
|
||||
|
||||
# extract mingw_get
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
|
||||
message("Extracting mingw-get")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/
|
||||
)
|
||||
endif()
|
||||
|
||||
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/make.exe"))
|
||||
message("Installing MSYS")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-patch
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for CoreUtils")
|
||||
# download old core_utils for pr.exe (ffmpeg needs it to build)
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
|
||||
message("Downloading CoreUtils 5.97")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
|
||||
endif()
|
||||
|
||||
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"))
|
||||
message("Installing pr from CoreUtils 5.97")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd")
|
||||
message("Installing ming64sh.cmd")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming64sh.cmd ${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for perl")
|
||||
# download perl for libvpx
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
|
||||
message("Downloading perl")
|
||||
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-64bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
|
||||
endif()
|
||||
|
||||
# make perl root directory
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/perl")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# extract perl
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/perl/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip"))
|
||||
message("Extracting perl")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl
|
||||
)
|
||||
endif()
|
||||
|
||||
# get yasm for vpx
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
|
||||
message("Downloading yasm")
|
||||
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
|
||||
endif()
|
||||
|
||||
message("checking x86_64-w64-mingw32-strings.exe")
|
||||
# copy strings.exe to x86_64-w64-mingw32-strings.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe")
|
||||
message("fixing x86_64-w64-mingw32-strings.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("checking x86_64-w64-mingw32-ar.exe")
|
||||
# copy ar.exe to x86_64-w64-mingw32-ar.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe")
|
||||
message("fixing x86_64-w64-mingw32-ar.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("checking x86_64-w64-mingw32-strip.exe")
|
||||
# copy strip.exe to x86_64-w64-mingw32-strip.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe")
|
||||
message("fixing x86_64-w64-mingw32-strip.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("checking x86_64-w64-mingw32-ranlib.exe")
|
||||
# copy ranlib.exe to x86_64-w64-mingw32-ranlib.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe")
|
||||
message("fixing x86_64-w64-mingw32-ranlib.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
|
||||
)
|
||||
endif()
|
||||
|
@@ -1,62 +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 *****
|
||||
|
||||
set(SNDFILE_EXTRA_ARGS)
|
||||
set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR})
|
||||
|
||||
if(WIN32)
|
||||
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
|
||||
#shared for windows because static libs will drag in a libgcc dependency.
|
||||
set(SNDFILE_OPTIONS --disable-static --enable-shared )
|
||||
else()
|
||||
set(SNDFILE_OPTIONS --enable-static --disable-shared )
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(SNDFILE_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/sndfile/src/external_sndfile < ${PATCH_DIR}/sndfile.diff)
|
||||
else()
|
||||
set(SNDFILE_PATCH_CMD)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_sndfile
|
||||
URL ${SNDFILE_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${SNDFILE_HASH}
|
||||
PREFIX ${BUILD_DIR}/sndfile
|
||||
PATCH_COMMAND ${SNDFILE_PATCH_CMD}
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} ${SNDFILE_OPTIONS} --prefix=${mingw_LIBDIR}/sndfile
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/sndfile
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_sndfile
|
||||
external_ogg
|
||||
external_vorbis
|
||||
)
|
||||
if(UNIX)
|
||||
add_dependencies(
|
||||
external_sndfile
|
||||
external_flac
|
||||
)
|
||||
endif()
|
@@ -1,28 +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 *****
|
||||
|
||||
ExternalProject_Add(external_spnav
|
||||
URL ${SPNAV_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${SPNAV_HASH}
|
||||
PREFIX ${BUILD_DIR}/spnav
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/spnav
|
||||
)
|
@@ -1,44 +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 *****
|
||||
|
||||
set(TBB_EXTRA_ARGS
|
||||
-DTBB_BUILD_SHARED=Off
|
||||
-DTBB_BUILD_TBBMALLOC=Off
|
||||
-DTBB_BUILD_TBBMALLOC_PROXY=Off
|
||||
-DTBB_BUILD_STATIC=On
|
||||
)
|
||||
|
||||
if(TBB_VERSION MATCHES 2018)
|
||||
set(TBB_VS_VERSION vs2013)
|
||||
elseif(TBB_VERSION MATCHES 2017)
|
||||
set(TBB_VS_VERSION vs2012)
|
||||
else()
|
||||
set(TBB_VS_VERSION vs2010)
|
||||
endif()
|
||||
|
||||
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
|
||||
ExternalProject_Add(external_tbb
|
||||
URL ${TBB_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${TBB_HASH}
|
||||
PREFIX ${BUILD_DIR}/tbb
|
||||
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/${TBB_VS_VERSION}/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/tbb
|
||||
)
|
@@ -1,44 +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 *****
|
||||
|
||||
ExternalProject_Add(external_theora
|
||||
URL ${THEORA_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${THEORA_HASH}
|
||||
PREFIX ${BUILD_DIR}/theora
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--with-ogg=${LIBDIR}/ogg
|
||||
--with-vorbis=${LIBDIR}/vorbis
|
||||
--disable-examples
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/theora
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_theora
|
||||
external_vorbis
|
||||
external_ogg
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,47 +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 *****
|
||||
|
||||
set(TIFF_EXTRA_ARGS
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
|
||||
-DPNG_STATIC=ON
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-Dlzma=OFF
|
||||
-Djbig=OFF
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_tiff
|
||||
URL ${TIFF_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${TIFF_HASH}
|
||||
PREFIX ${BUILD_DIR}/tiff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tiff ${DEFAULT_CMAKE_FLAGS} ${TIFF_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/tiff
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_tiff
|
||||
external_zlib
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_tiff after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
@@ -1,257 +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 *****
|
||||
|
||||
set(ZLIB_VERSION 1.2.8)
|
||||
set(ZLIB_URI https://netcologne.dl.sourceforge.net/project/libpng/zlib/${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz)
|
||||
set(ZLIB_HASH 44d667c142d7cda120332623eab69f40)
|
||||
|
||||
set(OPENAL_VERSION 1.17.2)
|
||||
set(OPENAL_URI http://kcat.strangesoft.net/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
|
||||
set(OPENAL_HASH 1764e0d8fec499589b47ebc724e0913d)
|
||||
|
||||
set(PNG_VERSION 1.6.21)
|
||||
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.gz)
|
||||
set(PNG_HASH aca36ec8e0a3b406a5912243bc243717)
|
||||
|
||||
set(JPEG_VERSION 1.4.2)
|
||||
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
|
||||
set(JPEG_HASH f9804884c1c41eb7f4febb9353a2cb27)
|
||||
|
||||
set(BOOST_VERSION 1.60.0)
|
||||
set(BOOST_VERSION_NODOTS 1_60_0)
|
||||
set(BOOST_URI http://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_NODOTS}.tar.bz2/download)
|
||||
set(BOOST_MD5 65a840e1a0b13a558ff19eeb2c4f0cbe)
|
||||
|
||||
set(BLOSC_VERSION 1.7.1)
|
||||
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.zip)
|
||||
set(BLOSC_HASH ff5cc729a5a25934ef714217218eed26)
|
||||
|
||||
set(PTHREADS_VERSION 2-9-1)
|
||||
set(PTHREADS_URI ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PTHREADS_VERSION}-release.tar.gz)
|
||||
set(PTHREADS_SHA512 9c06e85310766834370c3dceb83faafd397da18a32411ca7645c8eb6b9495fea54ca2872f4a3e8d83cb5fdc5dea7f3f0464be5bb9af3222a6534574a184bd551)
|
||||
|
||||
set(ILMBASE_VERSION 2.2.0)
|
||||
set(ILMBASE_URI http://download.savannah.nongnu.org/releases/openexr/ilmbase-${ILMBASE_VERSION}.tar.gz)
|
||||
set(ILMBASE_HASH b540db502c5fa42078249f43d18a4652)
|
||||
|
||||
set(OPENEXR_VERSION 2.2.0)
|
||||
set(OPENEXR_URI http://download.savannah.nongnu.org/releases/openexr/openexr-2.2.0.tar.gz)
|
||||
set(OPENEXR_HASH b64e931c82aa3790329c21418373db4e)
|
||||
|
||||
set(FREETYPE_VERSION 263)
|
||||
set(FREETYPE_URI http://download.savannah.gnu.org/releases/freetype/ft${FREETYPE_VERSION}.zip)
|
||||
set(FREETYPE_HASH 0db2a43301572e5c2b4a0864f237aeeb)
|
||||
|
||||
set(GLEW_VERSION 1.13.0)
|
||||
set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz)
|
||||
set(GLEW_HASH 7cbada3166d2aadfc4169c4283701066)
|
||||
|
||||
set(FREEGLUT_VERSION 3.0.0)
|
||||
set(FREEGLUT_URI http://pilotfiber.dl.sourceforge.net/project/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz)
|
||||
set(FREEGLUT_HASH 90c3ca4dd9d51cf32276bc5344ec9754)
|
||||
|
||||
set(HDF5_VERSION 1.8.17)
|
||||
set(HDF5_URI https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz)
|
||||
set(HDF5_HASH 7d572f8f3b798a628b8245af0391a0ca)
|
||||
|
||||
set(ALEMBIC_VERSION 1.7.1)
|
||||
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.zip)
|
||||
set(ALEMBIC_MD5 cf7705055501d5ea0cb8256866496f79)
|
||||
|
||||
## hash is for 3.1.2
|
||||
set(GLFW_GIT_UID 30306e54705c3adae9fe082c816a3be71963485c)
|
||||
set(GLFW_URI https://github.com/glfw/glfw/archive/${GLFW_GIT_UID}.zip)
|
||||
set(GLFW_HASH 20cacb1613da7eeb092f3ac4f6b2b3d0)
|
||||
|
||||
#latest uid in git as of 2016-04-01
|
||||
set(CLEW_GIT_UID 277db43f6cafe8b27c6f1055f69dc67da4aeb299)
|
||||
set(CLEW_URI https://github.com/OpenCLWrangler/clew/archive/${CLEW_GIT_UID}.zip)
|
||||
set(CLEW_HASH 2c699d10ed78362e71f56fae2a4c5f98)
|
||||
|
||||
#latest uid in git as of 2016-04-01
|
||||
set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
|
||||
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
|
||||
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
|
||||
|
||||
set(OPENSUBDIV_VERSION v3_1_1)
|
||||
set(OPENSUBDIV_Hash 25a9a6a94136b0eb85ce69e9c8cb6ab3)
|
||||
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.zip)
|
||||
|
||||
set(SDL_VERSION 2.0.4)
|
||||
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
|
||||
set(SDL_HASH 44fc4a023349933e7f5d7a582f7b886e)
|
||||
|
||||
set(OPENCOLLADA_VERSION v1.6.51)
|
||||
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
|
||||
set(OPENCOLLADA_HASH 23db5087faed4bc4cc1dfe456c0d4701)
|
||||
|
||||
set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/6de971097c7f552300f669ed69ca0b6cf5a70843.zip)
|
||||
set(OPENCOLORIO_HASH c9de0fd98f26ce6f2e08d617ca68b8e4)
|
||||
|
||||
set(LLVM_VERSION 3.4.2)
|
||||
set(LLVM_URI http://releases.llvm.org/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.gz)
|
||||
set(LLVM_HASH a20669f75967440de949ac3b1bad439c)
|
||||
|
||||
set(CLANG_URI http://releases.llvm.org/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.gz)
|
||||
set(CLANG_HASH 87945973b7c73038871c5f849a818588)
|
||||
|
||||
set(OPENIMAGEIO_VERSION 1.7.15)
|
||||
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.zip)
|
||||
set(OPENIMAGEIO_HASH_178 e156e3669af0e1373142ab5e8f13de66)
|
||||
set(OPENIMAGEIO_HASH_179 4121cb0e0433bda6a7ef32c8628a149f)
|
||||
set(OPENIMAGEIO_HASH_1713 42a662775b834161ba88c6abdb299360)
|
||||
set(OPENIMAGEIO_HASH_1715 e2ece0f62c013d64c478f82265988b0b)
|
||||
set(OPENIMAGEIO_HASH ${OPENIMAGEIO_HASH_1715})
|
||||
|
||||
|
||||
set(TIFF_VERSION 4.0.6)
|
||||
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
|
||||
set(TIFF_HASH d1d2e940dea0b5ad435f21f03d96dd72)
|
||||
|
||||
set(FLEXBISON_VERSION 2.5.5)
|
||||
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_bison-2.5.5.zip)
|
||||
set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce)
|
||||
|
||||
set(OSL_VERSION 1.7.5)
|
||||
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.zip)
|
||||
set(OSL_HASH 6924dd5d453159e7b6eb106a08c358cf)
|
||||
|
||||
set(PYTHON_VERSION 3.6.2)
|
||||
set(PYTHON_SHORT_VERSION 3.6)
|
||||
set(PYTHON_SHORT_VERSION_NO_DOTS 36)
|
||||
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
|
||||
set(PYTHON_HASH 2c68846471994897278364fc18730dd9)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Needed to be compatible with GCC 7, other platforms can upgrade later
|
||||
set(TBB_VERSION 2017_U7)
|
||||
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
|
||||
set(TBB_HASH 364f2a4b80e978f38a69cbf7c466b898)
|
||||
else()
|
||||
set(TBB_VERSION 44_20160128)
|
||||
set(TBB_URI https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${TBB_VERSION}oss_src_0.tgz)
|
||||
set(TBB_HASH 9d8a4cdf43496f1b3f7c473a5248e5cc)
|
||||
endif()
|
||||
|
||||
set(OPENVDB_VERSION 3.1.0)
|
||||
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
|
||||
set(OPENVDB_HASH 30a7e9571a03ab7bcf1a39fb62aa436f)
|
||||
|
||||
set(IDNA_VERSION 2.6)
|
||||
set(CHARDET_VERSION 3.0.2)
|
||||
set(URLLIB3_VERSION 1.22)
|
||||
set(CERTIFI_VERSION 2017.7.27.1)
|
||||
set(REQUESTS_VERSION 2.18.4)
|
||||
|
||||
set(NUMPY_VERSION v1.13.1)
|
||||
set(NUMPY_SHORT_VERSION 1.13)
|
||||
set(NUMPY_URI https://pypi.python.org/packages/c0/3a/40967d9f5675fbb097ffec170f59c2ba19fc96373e73ad47c2cae9a30aed/numpy-1.13.1.zip)
|
||||
set(NUMPY_HASH 2c3c0f4edf720c3a7b525dacc825b9ae)
|
||||
|
||||
set(LAME_VERSION 3.99.5)
|
||||
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.99/lame-${LAME_VERSION}.tar.gz)
|
||||
set(LAME_HASH 84835b313d4a8b68f5349816d33e07ce)
|
||||
|
||||
set(OGG_VERSION 1.3.2)
|
||||
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
|
||||
set(OGG_HASH e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692)
|
||||
|
||||
set(VORBIS_VERSION 1.3.5)
|
||||
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
|
||||
set(VORBIS_HASH 6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce)
|
||||
|
||||
set(THEORA_VERSION 1.1.1)
|
||||
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
|
||||
set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc)
|
||||
|
||||
set(FLAC_VERSION 1.3.1)
|
||||
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
|
||||
set(FLAC_HASH 4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c)
|
||||
|
||||
set(VPX_VERSION 1.5.0)
|
||||
set(VPX_URI http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-${VPX_VERSION}.tar.bz2)
|
||||
set(VPX_HASH 306d67908625675f8e188d37a81fbfafdf5068b09d9aa52702b6fbe601c76797)
|
||||
|
||||
set(ORC_VERSION 0.4.25)
|
||||
set(ORC_URI https://gstreamer.freedesktop.org/src/orc/orc-${ORC_VERSION}.tar.xz)
|
||||
set(ORC_HASH c1b1d54a58f26d483f0b3881538984789fe5d5460ab8fab74a1cacbd3d1c53d1)
|
||||
|
||||
set(SCHROEDINGER_VERSION 1.0.11)
|
||||
set(SCHROEDINGER_URI https://download.videolan.org/contrib/schroedinger/schroedinger-${SCHROEDINGER_VERSION}.tar.gz)
|
||||
set(SCHROEDINGER_HASH 1e572a0735b92aca5746c4528f9bebd35aa0ccf8619b22fa2756137a8cc9f912)
|
||||
|
||||
set(X264_URI http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20160401-2245-stable.tar.bz2)
|
||||
set(X264_HASH 1e9a7b835e80313aade53a9b6ff353e099de3856bf5f30a4d8dfc91281f786f5)
|
||||
|
||||
set(XVIDCORE_VERSION 1.3.4)
|
||||
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
|
||||
set(XVIDCORE_HASH 4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f)
|
||||
|
||||
#this has to be in sync with the version in blenders /extern folder
|
||||
set(OPENJPEG_VERSION 1.5.2)
|
||||
set(OPENJPEG_SHORT_VERSION 1.5)
|
||||
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/version.${OPENJPEG_VERSION}.tar.gz)
|
||||
set(OPENJPEG_HASH 3734e95edd0bef6e056815591755efd822228dc3cd866894e00a2c929026b16d)
|
||||
|
||||
set(FAAD_VERSION 2-2.7)
|
||||
set(FAAD_URI http://downloads.sourceforge.net/faac/faad${FAAD_VERSION}.tar.bz2)
|
||||
set(FAAD_HASH 4c332fa23febc0e4648064685a3d4332)
|
||||
|
||||
set(FFMPEG_VERSION 3.2.1)
|
||||
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
|
||||
set(FFMPEG_HASH cede174178e61f882844f5870c35ce72)
|
||||
|
||||
set(FFTW_VERSION 3.3.4)
|
||||
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
|
||||
set(FFTW_HASH 2edab8c06b24feeb3b82bbb3ebf3e7b3)
|
||||
|
||||
set(ICONV_VERSION 1.14)
|
||||
set(ICONV_URI http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz)
|
||||
set(ICONV_HASH e34509b1623cec449dfeb73d7ce9c6c6)
|
||||
|
||||
set(LAPACK_VERSION 3.6.0)
|
||||
set(LAPACK_URI http://www.netlib.org/lapack/lapack-${LAPACK_VERSION}.tgz)
|
||||
set(LAPACK_HASH f2f6c67134e851fe189bb3ca1fbb5101)
|
||||
|
||||
set(SNDFILE_VERSION 1.0.28)
|
||||
set(SNDFILE_URI http://www.mega-nerd.com/libsndfile/files/libsndfile-${SNDFILE_VERSION}.tar.gz)
|
||||
set(SNDFILE_HASH 646b5f98ce89ac60cdb060fcd398247c)
|
||||
|
||||
#set(HIDAPI_VERSION 0.8.0-rc1)
|
||||
#set(HIDAPI_URI https://github.com/signal11/hidapi/archive/hidapi-${HIDAPI_VERSION}.tar.gz)
|
||||
#set(HIDAPI_HASH 069f9dd746edc37b6b6d0e3656f47199)
|
||||
|
||||
set(HIDAPI_UID 89a6c75dc6f45ecabd4ddfbd2bf5ba6ad8ba38b5)
|
||||
set(HIDAPI_URI https://github.com/TheOnlyJoey/hidapi/archive/${HIDAPI_UID}.zip)
|
||||
set(HIDAPI_HASH b6e22f6b514f8bcf594989f20ffc46fb)
|
||||
|
||||
set(WEBP_VERSION 0.5.1)
|
||||
set(WEBP_URI https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz)
|
||||
set(WEBP_HASH 3d7db92ebba5b4f679413d25c6040881)
|
||||
|
||||
set(SPNAV_VERSION 0.2.3)
|
||||
set(SPNAV_URI http://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%20${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
|
||||
set(SPNAV_HASH 44d840540d53326d4a119c0f1aa7bf0a)
|
||||
|
||||
set(JEMALLOC_VERSION 5.0.1)
|
||||
set(JEMALLOC_URI https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_VERSION}/jemalloc-${JEMALLOC_VERSION}.tar.bz2)
|
||||
set(JEMALLOC_HASH 507f7b6b882d868730d644510491d18f)
|
||||
|
||||
set(XML2_VERSION 2.9.4)
|
||||
set(XML2_URI ftp://xmlsoft.org/libxml2/libxml2-${XML2_VERSION}.tar.gz)
|
||||
set(XML2_HASH ae249165c173b1ff386ee8ad676815f5)
|
@@ -1,41 +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 *****
|
||||
|
||||
ExternalProject_Add(external_vorbis
|
||||
URL ${VORBIS_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${VORBIS_HASH}
|
||||
PREFIX ${BUILD_DIR}/vorbis
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--with-ogg=${LIBDIR}/ogg
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/vorbis
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_vorbis
|
||||
external_ogg
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,60 +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 *****
|
||||
|
||||
if(WIN32)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc)
|
||||
else()
|
||||
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc)
|
||||
endif()
|
||||
else()
|
||||
if(APPLE)
|
||||
set(VPX_EXTRA_FLAGS --target=x86_64-darwin13-gcc)
|
||||
else()
|
||||
set(VPX_EXTRA_FLAGS --target=generic-gnu)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_vpx
|
||||
URL ${VPX_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${VPX_HASH}
|
||||
PREFIX ${BUILD_DIR}/vpx
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
|
||||
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
|
||||
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--disable-install-bins
|
||||
--disable-install-srcs
|
||||
--disable-sse4_1
|
||||
--disable-sse3
|
||||
--disable-ssse3
|
||||
--disable-avx
|
||||
--disable-avx2
|
||||
--disable-unit-tests
|
||||
--disable-examples
|
||||
${VPX_EXTRA_FLAGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/vpx
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_vpx PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,50 +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 *****
|
||||
|
||||
# Note the utility apps may use png/tiff/gif system libraries, but the
|
||||
# library itself does not depend on them, so should give no problems.
|
||||
|
||||
set(WEBP_EXTRA_ARGS
|
||||
-DWEBP_HAVE_SSE2=ON
|
||||
-DWEBP_HAVE_SSE41=OFF
|
||||
-DWEBP_HAVE_AVX2=OFF
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(WEBP_BUILD_DIR ${BUILD_MODE}/)
|
||||
else()
|
||||
set(WEBP_BUILD_DIR)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_webp
|
||||
URL ${WEBP_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${WEBP_HASH}
|
||||
PREFIX ${BUILD_DIR}/webp
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
|
||||
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp-build/${WEBP_BUILD_DIR}${LIBPREFIX}webp${LIBEXT} ${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT} &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/decode.h ${LIBDIR}/webp/include/webp/decode.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/encode.h ${LIBDIR}/webp/include/webp/encode.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/demux.h ${LIBDIR}/webp/include/webp/demux.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/extras.h ${LIBDIR}/webp/include/webp/extras.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/format_constants.h ${LIBDIR}/webp/include/webp/format_constants.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/mux.h ${LIBDIR}/webp/include/webp/mux.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/mux_types.h ${LIBDIR}/webp/include/webp/mux_types.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/types.h ${LIBDIR}/webp/include/webp/types.h
|
||||
INSTALL_DIR ${LIBDIR}/webp
|
||||
)
|
@@ -1,40 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
if(WIN32)
|
||||
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_x264
|
||||
URL ${X264_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${X264_HASH}
|
||||
PREFIX ${BUILD_DIR}/x264
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
|
||||
--enable-static
|
||||
--enable-pic
|
||||
--disable-lavf
|
||||
${X264_EXTRA_ARGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/x264
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,36 +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 *****
|
||||
|
||||
ExternalProject_Add(external_xml2
|
||||
URL ${XML2_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${XML2_HASH}
|
||||
PREFIX ${BUILD_DIR}/xml2
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && ${CONFIGURE_COMMAND}
|
||||
--prefix=${LIBDIR}/xml2
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--with-python=no
|
||||
--with-lzma=no
|
||||
--with-zlib=no
|
||||
--with-iconv=no
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/xml2
|
||||
)
|
@@ -1,44 +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 *****
|
||||
|
||||
if(WIN32)
|
||||
set(XVIDCORE_EXTRA_ARGS --host=${MINGW_HOST})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_xvidcore
|
||||
URL ${XVIDCORE_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${XVIDCORE_HASH}
|
||||
PREFIX ${BUILD_DIR}/xvidcore
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/xvidcore ${XVIDCORE_EXTRA_ARGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} &&
|
||||
${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/* && # clean because re-installing fails otherwise
|
||||
cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make install
|
||||
INSTALL_DIR ${LIBDIR}/xvidcore
|
||||
)
|
||||
|
||||
ExternalProject_Add_Step(external_xvidcore after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/xvidcore/lib/xvidcore.a ${LIBDIR}/xvidcore/lib/libxvidcore.a || true
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/xvidcore.dll.a
|
||||
DEPENDEES install
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_xvidcore PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,33 +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 *****
|
||||
|
||||
ExternalProject_Add(external_zlib
|
||||
URL ${ZLIB_URI}
|
||||
URL_HASH MD5=${ZLIB_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/zlib
|
||||
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib ${DEFAULT_CMAKE_FLAGS}
|
||||
INSTALL_DIR ${LIBDIR}/zlib
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_zlib after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
@@ -1,40 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
ExternalProject_Add(external_zlib_mingw
|
||||
URL ${ZLIB_URI}
|
||||
URL_HASH MD5=${ZLIB_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/zlib_mingw
|
||||
CONFIGURE_COMMAND echo .
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/ && make -f win32/makefile.gcc -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND echo .
|
||||
INSTALL_DIR ${LIBDIR}/zlib_mingw
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_zlib_mingw after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/libz.a ${LIBDIR}/zlib/lib/z.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,35 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3e09c57..26565ae 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -116,7 +116,7 @@ IF (NOT ${ALEMBIC_LIB_USES_TR1} AND NOT ${ALEMBIC_LIB_USES_BOOST})
|
||||
INCLUDE(CheckCXXCompilerFlag)
|
||||
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
|
||||
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
|
||||
- IF (COMPILER_SUPPORTS_CXX1X)
|
||||
+ IF (COMPILER_SUPPORTS_CXX11)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
ELSEIF (COMPILER_SUPPORTS_CXX0X)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
--- a/lib/Alembic/AbcCoreOgawa/StreamManager.cpp
|
||||
+++ b/lib/Alembic/AbcCoreOgawa/StreamManager.cpp
|
||||
@@ -47,7 +47,18 @@
|
||||
#define COMPARE_EXCHANGE( V, COMP, EXCH ) V.compare_exchange_weak( COMP, EXCH, std::memory_order_seq_cst, std::memory_order_seq_cst )
|
||||
// Windows
|
||||
#elif defined( _MSC_VER )
|
||||
-#define COMPARE_EXCHANGE( V, COMP, EXCH ) InterlockedCompareExhange64( &V, EXCH, COMP ) == COMP
|
||||
+#define COMPARE_EXCHANGE( V, COMP, EXCH ) InterlockedCompareExchange64( &V, EXCH, COMP ) == COMP
|
||||
+int ffsll(long long value)
|
||||
+{
|
||||
+ if (!value)
|
||||
+ return 0;
|
||||
+
|
||||
+ for (int bit = 0; bit < 63; bit++)
|
||||
+ {
|
||||
+ if (value & (1 << bit))
|
||||
+ return bit + 1;
|
||||
+ }
|
||||
+}
|
||||
// gcc 4.8 and above not using C++11
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8
|
||||
#define COMPARE_EXCHANGE( V, COMP, EXCH ) __atomic_compare_exchange_n( &V, &COMP, EXCH, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST )
|
@@ -1,33 +0,0 @@
|
||||
diff -Naur src/blosc/CMakeLists.txt external_blosc/blosc/CMakeLists.txt
|
||||
--- src/blosc/CMakeLists.txt 2016-02-03 10:26:28 -0700
|
||||
+++ external_blosc/blosc/CMakeLists.txt 2017-03-03 09:03:31 -0700
|
||||
@@ -61,6 +61,8 @@
|
||||
set(SOURCES ${SOURCES} win32/pthread.c)
|
||||
else(NOT Threads_FOUND)
|
||||
set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
+ set(LIBS ${LIBS} ${PTHREAD_LIBS})
|
||||
+ include_directories( ${PTHREAD_INCLUDE_DIR} )
|
||||
endif(NOT Threads_FOUND)
|
||||
else(WIN32)
|
||||
find_package(Threads REQUIRED)
|
||||
diff -Naur src/blosc/blosc.c external_blosc/blosc/blosc.c
|
||||
--- src/blosc/blosc.c 2016-02-03 10:26:28 -0700
|
||||
+++ external_blosc/blosc/blosc.c 2017-03-03 09:01:50 -0700
|
||||
@@ -49,12 +49,12 @@
|
||||
#include <inttypes.h>
|
||||
#endif /* _WIN32 */
|
||||
|
||||
-#if defined(_WIN32) && !defined(__GNUC__)
|
||||
- #include "win32/pthread.h"
|
||||
- #include "win32/pthread.c"
|
||||
-#else
|
||||
+//#if defined(_WIN32) && !defined(__GNUC__)
|
||||
+// #include "win32/pthread.h"
|
||||
+ //#include "win32/pthread.c"
|
||||
+//#else
|
||||
#include <pthread.h>
|
||||
-#endif
|
||||
+//#endif
|
||||
|
||||
/* If C11 is supported, use it's built-in aligned allocation. */
|
||||
#if __STDC_VERSION__ >= 201112L
|
@@ -1,127 +0,0 @@
|
||||
--- cfe/trunk/lib/Serialization/ASTWriter.cpp
|
||||
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp
|
||||
@@ -56,14 +56,14 @@
|
||||
using namespace clang::serialization;
|
||||
|
||||
template <typename T, typename Allocator>
|
||||
-static StringRef bytes(const std::vector<T, Allocator> &v) {
|
||||
+static StringRef data(const std::vector<T, Allocator> &v) {
|
||||
if (v.empty()) return StringRef();
|
||||
return StringRef(reinterpret_cast<const char*>(&v[0]),
|
||||
sizeof(T) * v.size());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
-static StringRef bytes(const SmallVectorImpl<T> &v) {
|
||||
+static StringRef data(const SmallVectorImpl<T> &v) {
|
||||
return StringRef(reinterpret_cast<const char*>(v.data()),
|
||||
sizeof(T) * v.size());
|
||||
}
|
||||
@@ -1385,7 +1385,7 @@
|
||||
Record.push_back(INPUT_FILE_OFFSETS);
|
||||
Record.push_back(InputFileOffsets.size());
|
||||
Record.push_back(UserFilesNum);
|
||||
- Stream.EmitRecordWithBlob(OffsetsAbbrevCode, Record, bytes(InputFileOffsets));
|
||||
+ Stream.EmitRecordWithBlob(OffsetsAbbrevCode, Record, data(InputFileOffsets));
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -1771,7 +1771,7 @@
|
||||
Record.push_back(SOURCE_LOCATION_OFFSETS);
|
||||
Record.push_back(SLocEntryOffsets.size());
|
||||
Record.push_back(SourceMgr.getNextLocalOffset() - 1); // skip dummy
|
||||
- Stream.EmitRecordWithBlob(SLocOffsetsAbbrev, Record, bytes(SLocEntryOffsets));
|
||||
+ Stream.EmitRecordWithBlob(SLocOffsetsAbbrev, Record, data(SLocEntryOffsets));
|
||||
|
||||
// Write the source location entry preloads array, telling the AST
|
||||
// reader which source locations entries it should load eagerly.
|
||||
@@ -2087,7 +2087,7 @@
|
||||
Record.push_back(MacroOffsets.size());
|
||||
Record.push_back(FirstMacroID - NUM_PREDEF_MACRO_IDS);
|
||||
Stream.EmitRecordWithBlob(MacroOffsetAbbrev, Record,
|
||||
- bytes(MacroOffsets));
|
||||
+ data(MacroOffsets));
|
||||
}
|
||||
|
||||
void ASTWriter::WritePreprocessorDetail(PreprocessingRecord &PPRec) {
|
||||
@@ -2185,7 +2185,7 @@
|
||||
Record.push_back(PPD_ENTITIES_OFFSETS);
|
||||
Record.push_back(FirstPreprocessorEntityID - NUM_PREDEF_PP_ENTITY_IDS);
|
||||
Stream.EmitRecordWithBlob(PPEOffsetAbbrev, Record,
|
||||
- bytes(PreprocessedEntityOffsets));
|
||||
+ data(PreprocessedEntityOffsets));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2548,7 +2548,7 @@
|
||||
Record.push_back(CXX_BASE_SPECIFIER_OFFSETS);
|
||||
Record.push_back(CXXBaseSpecifiersOffsets.size());
|
||||
Stream.EmitRecordWithBlob(BaseSpecifierOffsetAbbrev, Record,
|
||||
- bytes(CXXBaseSpecifiersOffsets));
|
||||
+ data(CXXBaseSpecifiersOffsets));
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -2623,7 +2623,7 @@
|
||||
Decls.push_back(std::make_pair((*D)->getKind(), GetDeclRef(*D)));
|
||||
|
||||
++NumLexicalDeclContexts;
|
||||
- Stream.EmitRecordWithBlob(DeclContextLexicalAbbrev, Record, bytes(Decls));
|
||||
+ Stream.EmitRecordWithBlob(DeclContextLexicalAbbrev, Record, data(Decls));
|
||||
return Offset;
|
||||
}
|
||||
|
||||
@@ -2642,7 +2642,7 @@
|
||||
Record.push_back(TYPE_OFFSET);
|
||||
Record.push_back(TypeOffsets.size());
|
||||
Record.push_back(FirstTypeID - NUM_PREDEF_TYPE_IDS);
|
||||
- Stream.EmitRecordWithBlob(TypeOffsetAbbrev, Record, bytes(TypeOffsets));
|
||||
+ Stream.EmitRecordWithBlob(TypeOffsetAbbrev, Record, data(TypeOffsets));
|
||||
|
||||
// Write the declaration offsets array
|
||||
Abbrev = new BitCodeAbbrev();
|
||||
@@ -2655,7 +2655,7 @@
|
||||
Record.push_back(DECL_OFFSET);
|
||||
Record.push_back(DeclOffsets.size());
|
||||
Record.push_back(FirstDeclID - NUM_PREDEF_DECL_IDS);
|
||||
- Stream.EmitRecordWithBlob(DeclOffsetAbbrev, Record, bytes(DeclOffsets));
|
||||
+ Stream.EmitRecordWithBlob(DeclOffsetAbbrev, Record, data(DeclOffsets));
|
||||
}
|
||||
|
||||
void ASTWriter::WriteFileDeclIDsMap() {
|
||||
@@ -2680,7 +2680,7 @@
|
||||
unsigned AbbrevCode = Stream.EmitAbbrev(Abbrev);
|
||||
Record.push_back(FILE_SORTED_DECLS);
|
||||
Record.push_back(FileSortedIDs.size());
|
||||
- Stream.EmitRecordWithBlob(AbbrevCode, Record, bytes(FileSortedIDs));
|
||||
+ Stream.EmitRecordWithBlob(AbbrevCode, Record, data(FileSortedIDs));
|
||||
}
|
||||
|
||||
void ASTWriter::WriteComments() {
|
||||
@@ -2893,7 +2893,7 @@
|
||||
Record.push_back(SelectorOffsets.size());
|
||||
Record.push_back(FirstSelectorID - NUM_PREDEF_SELECTOR_IDS);
|
||||
Stream.EmitRecordWithBlob(SelectorOffsetAbbrev, Record,
|
||||
- bytes(SelectorOffsets));
|
||||
+ data(SelectorOffsets));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3253,7 +3253,7 @@
|
||||
Record.push_back(IdentifierOffsets.size());
|
||||
Record.push_back(FirstIdentID - NUM_PREDEF_IDENT_IDS);
|
||||
Stream.EmitRecordWithBlob(IdentifierOffsetAbbrev, Record,
|
||||
- bytes(IdentifierOffsets));
|
||||
+ data(IdentifierOffsets));
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -4046,7 +4046,7 @@
|
||||
Record.clear();
|
||||
Record.push_back(TU_UPDATE_LEXICAL);
|
||||
Stream.EmitRecordWithBlob(TuUpdateLexicalAbbrev, Record,
|
||||
- bytes(NewGlobalDecls));
|
||||
+ data(NewGlobalDecls));
|
||||
|
||||
// And a visible updates block for the translation unit.
|
||||
Abv = new llvm::BitCodeAbbrev();
|
@@ -1,72 +0,0 @@
|
||||
# - Find BLOSC library
|
||||
# Find the native BLOSC includes and library
|
||||
# This module defines
|
||||
# BLOSC_INCLUDE_DIRS, where to find blosc.h, Set when
|
||||
# BLOSC is found.
|
||||
# BLOSC_LIBRARIES, libraries to link against to use BLOSC.
|
||||
# BLOSC_ROOT_DIR, The base directory to search for BLOSC.
|
||||
# This can also be an environment variable.
|
||||
# BLOSC_FOUND, If false, do not try to use BLOSC.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# BLOSC_LIBRARY, where to find the BLOSC 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 BLOSC_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT BLOSC_ROOT_DIR AND NOT $ENV{BLOSC_ROOT_DIR} STREQUAL "")
|
||||
SET(BLOSC_ROOT_DIR $ENV{BLOSC_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_blosc_SEARCH_DIRS
|
||||
${BLOSC_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/lib/blosc
|
||||
)
|
||||
|
||||
FIND_PATH(BLOSC_INCLUDE_DIR
|
||||
NAMES
|
||||
blosc.h
|
||||
HINTS
|
||||
${_blosc_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(BLOSC_LIBRARY
|
||||
NAMES
|
||||
blosc
|
||||
HINTS
|
||||
${_blosc_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set BLOSC_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BLOSC DEFAULT_MSG
|
||||
BLOSC_LIBRARY BLOSC_INCLUDE_DIR)
|
||||
|
||||
IF(BLOSC_FOUND)
|
||||
SET(BLOSC_LIBRARIES ${BLOSC_LIBRARY})
|
||||
SET(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(BLOSC_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
BLOSC_INCLUDE_DIR
|
||||
BLOSC_LIBRARY
|
||||
)
|
@@ -1,72 +0,0 @@
|
||||
# - Find CPPUNIT library
|
||||
# Find the native CPPUNIT includes and library
|
||||
# This module defines
|
||||
# CPPUNIT_INCLUDE_DIRS, where to find cppunit.h, Set when
|
||||
# CPPUNIT is found.
|
||||
# CPPUNIT_LIBRARIES, libraries to link against to use CPPUNIT.
|
||||
# CPPUNIT_ROOT_DIR, The base directory to search for CPPUNIT.
|
||||
# This can also be an environment variable.
|
||||
# CPPUNIT_FOUND, If false, do not try to use CPPUNIT.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# CPPUNIT_LIBRARY, where to find the CPPUNIT 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 CPPUNIT_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT CPPUNIT_ROOT_DIR AND NOT $ENV{CPPUNIT_ROOT_DIR} STREQUAL "")
|
||||
SET(CPPUNIT_ROOT_DIR $ENV{CPPUNIT_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_cppunit_SEARCH_DIRS
|
||||
${CPPUNIT_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/lib/cppunit
|
||||
)
|
||||
|
||||
FIND_PATH(CPPUNIT_INCLUDE_DIR
|
||||
NAMES
|
||||
cppunit/Test.h
|
||||
HINTS
|
||||
${_cppunit_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(CPPUNIT_LIBRARY
|
||||
NAMES
|
||||
cppunit
|
||||
HINTS
|
||||
${_cppunit_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set CPPUNIT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG
|
||||
CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIR)
|
||||
|
||||
IF(CPPUNIT_FOUND)
|
||||
SET(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY})
|
||||
SET(CPPUNIT_INCLUDE_DIRS ${CPPUNIT_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(CPPUNIT_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CPPUNIT_INCLUDE_DIR
|
||||
CPPUNIT_LIBRARY
|
||||
)
|
@@ -1,264 +0,0 @@
|
||||
# Module to find IlmBase
|
||||
#
|
||||
# This module will first look into the directories defined by the variables:
|
||||
# - ILMBASE_HOME, ILMBASE_VERSION, ILMBASE_LIB_AREA
|
||||
#
|
||||
# It also supports non-standard names for the library components.
|
||||
#
|
||||
# To use a custom IlmBase:
|
||||
# - Set the variable ILMBASE_CUSTOM to True
|
||||
# - Set the variable ILMBASE_CUSTOM_LIBRARIES to a list of the libraries to
|
||||
# use, e.g. "SpiImath SpiHalf SpiIlmThread SpiIex"
|
||||
# - Optionally set the variable ILMBASE_CUSTOM_INCLUDE_DIR to any
|
||||
# particularly weird place that the OpenEXR/*.h files may be found
|
||||
# - Optionally set the variable ILMBASE_CUSTOM_LIB_DIR to any
|
||||
# particularly weird place that the libraries files may be found
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# ILMBASE_INCLUDE_DIR - where to find half.h, IlmBaseConfig.h, etc.
|
||||
# ILMBASE_LIBRARIES - list of libraries to link against when using IlmBase.
|
||||
# ILMBASE_FOUND - True if IlmBase was found.
|
||||
|
||||
# Other standarnd issue macros
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(FindPackageMessage)
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
|
||||
if( ILMBASE_USE_STATIC_LIBS )
|
||||
set( _ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
if(WIN32)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
else()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Macro to assemble a helper state variable
|
||||
macro(SET_STATE_VAR varname)
|
||||
set(tmp_ilmbaselibs ${ILMBASE_CUSTOM_LIBRARIES})
|
||||
separate_arguments(tmp_ilmbaselibs)
|
||||
set(tmp_lst
|
||||
${ILMBASE_CUSTOM} | ${tmp_ilmbaselibs} |
|
||||
${ILMBASE_HOME} | ${ILMBASE_VERSION} | ${ILMBASE_LIB_AREA}
|
||||
)
|
||||
set(${varname} "${tmp_lst}")
|
||||
unset(tmp_ilmbaselibs)
|
||||
unset(tmp_lst)
|
||||
endmacro()
|
||||
|
||||
# To enforce that find_* functions do not use inadvertently existing versions
|
||||
if(ILMBASE_CUSTOM)
|
||||
set(ILMBASE_FIND_OPTIONS "NO_DEFAULT_PATH")
|
||||
endif()
|
||||
|
||||
# Macro to search for an include directory
|
||||
macro(PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
|
||||
string(TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
|
||||
find_path(${tmp_varname} ${includefile}
|
||||
HINTS ${${libpath_var}}
|
||||
PATH_SUFFIXES include
|
||||
${ILMBASE_FIND_OPTIONS}
|
||||
)
|
||||
if(${tmp_varname})
|
||||
mark_as_advanced(${tmp_varname})
|
||||
endif()
|
||||
unset(tmp_varname)
|
||||
endmacro()
|
||||
|
||||
|
||||
# Macro to search for the given library and adds the cached
|
||||
# variable names to the specified list
|
||||
macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
|
||||
string(TOUPPER ${prefix}_${libname} tmp_prefix)
|
||||
# Handle new library names for OpenEXR 2.1 build via cmake
|
||||
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
|
||||
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
|
||||
|
||||
find_library(${tmp_prefix}_LIBRARY_RELEASE
|
||||
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
|
||||
HINTS ${${libpath_var}}
|
||||
PATH_SUFFIXES lib
|
||||
${ILMBASE_FIND_OPTIONS}
|
||||
)
|
||||
find_library(${tmp_prefix}_LIBRARY_DEBUG
|
||||
NAMES ${libname}d ${libname}_d ${libname}debug ${libname}_debug
|
||||
HINTS ${${libpath_var}}
|
||||
PATH_SUFFIXES lib
|
||||
${ILMBASE_FIND_OPTIONS}
|
||||
)
|
||||
# Properly define ${tmp_prefix}_LIBRARY (cached) and ${tmp_prefix}_LIBRARIES
|
||||
select_library_configurations(${tmp_prefix})
|
||||
list(APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
|
||||
|
||||
# Add to the list of variables which should be reset
|
||||
list(APPEND ${cachelist_var}
|
||||
${tmp_prefix}_LIBRARY
|
||||
${tmp_prefix}_LIBRARY_RELEASE
|
||||
${tmp_prefix}_LIBRARY_DEBUG)
|
||||
mark_as_advanced(
|
||||
${tmp_prefix}_LIBRARY
|
||||
${tmp_prefix}_LIBRARY_RELEASE
|
||||
${tmp_prefix}_LIBRARY_DEBUG)
|
||||
unset(tmp_prefix)
|
||||
endmacro()
|
||||
|
||||
|
||||
# Encode the current state of the external variables into a string
|
||||
SET_STATE_VAR(ILMBASE_CURRENT_STATE)
|
||||
|
||||
# If the state has changed, clear the cached variables
|
||||
if(ILMBASE_CACHED_STATE AND
|
||||
NOT ILMBASE_CACHED_STATE STREQUAL ILMBASE_CURRENT_STATE)
|
||||
|
||||
foreach(libvar ${ILMBASE_CACHED_VARS})
|
||||
unset(${libvar} CACHE)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
# Generic search paths
|
||||
set(IlmBase_generic_include_paths
|
||||
${ILMBASE_CUSTOM_INCLUDE_DIR}
|
||||
/usr/include
|
||||
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/local/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
)
|
||||
set(IlmBase_generic_library_paths
|
||||
${ILMBASE_CUSTOM_LIB_DIR}
|
||||
/usr/lib
|
||||
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/local/lib
|
||||
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
# Search paths for the IlmBase files
|
||||
if(ILMBASE_HOME)
|
||||
if(ILMBASE_VERSION)
|
||||
set(IlmBase_include_paths
|
||||
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/include
|
||||
${ILMBASE_HOME}/include/ilmbase-${ILMBASE_VERSION}
|
||||
)
|
||||
set(IlmBase_library_paths
|
||||
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/lib
|
||||
${ILMBASE_HOME}/lib/ilmbase-${ILMBASE_VERSION}
|
||||
)
|
||||
endif()
|
||||
list(APPEND IlmBase_include_paths ${ILMBASE_HOME}/include)
|
||||
set(IlmBase_library_paths
|
||||
${ILMBASE_HOME}/lib
|
||||
${ILMBASE_HOME}/lib64
|
||||
${ILMBASE_LIB_AREA}
|
||||
${IlmBase_library_paths})
|
||||
endif()
|
||||
list(APPEND IlmBase_include_paths ${IlmBase_generic_include_paths})
|
||||
list(APPEND IlmBase_library_paths ${IlmBase_generic_library_paths})
|
||||
|
||||
# Locate the header files
|
||||
PREFIX_FIND_INCLUDE_DIR(IlmBase
|
||||
OpenEXR/IlmBaseConfig.h IlmBase_include_paths)
|
||||
|
||||
if(ILMBASE_INCLUDE_DIR)
|
||||
# Get the version from config file, if not already set.
|
||||
if(NOT ILMBASE_VERSION)
|
||||
FILE(STRINGS "${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h" ILMBASE_BUILD_SPECIFICATION
|
||||
REGEX "^[ \t]*#define[ \t]+ILMBASE_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
|
||||
|
||||
if(ILMBASE_BUILD_SPECIFICATION)
|
||||
if(NOT IlmBase_FIND_QUIETLY)
|
||||
message(STATUS "${ILMBASE_BUILD_SPECIFICATION}")
|
||||
endif()
|
||||
string(REGEX REPLACE ".*#define[ \t]+ILMBASE_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
|
||||
"\\1" XYZ ${ILMBASE_BUILD_SPECIFICATION})
|
||||
set("ILMBASE_VERSION" ${XYZ} CACHE STRING "Version of ILMBase lib")
|
||||
else()
|
||||
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
|
||||
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
|
||||
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if(ILMBASE_CUSTOM)
|
||||
if(NOT ILMBASE_CUSTOM_LIBRARIES)
|
||||
message(FATAL_ERROR "Custom IlmBase libraries requested but ILMBASE_CUSTOM_LIBRARIES is not set.")
|
||||
endif()
|
||||
set(IlmBase_Libraries ${ILMBASE_CUSTOM_LIBRARIES})
|
||||
separate_arguments(IlmBase_Libraries)
|
||||
else()
|
||||
#elseif(${ILMBASE_VERSION} VERSION_LESS "2.1")
|
||||
set(IlmBase_Libraries Half Iex Imath IlmThread)
|
||||
#else()
|
||||
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
|
||||
# set(IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
|
||||
endif()
|
||||
|
||||
|
||||
# Locate the IlmBase libraries
|
||||
set(IlmBase_libvars "")
|
||||
set(IlmBase_cachevars "")
|
||||
foreach(ilmbase_lib ${IlmBase_Libraries})
|
||||
PREFIX_FIND_LIB(IlmBase ${ilmbase_lib}
|
||||
IlmBase_library_paths IlmBase_libvars IlmBase_cachevars)
|
||||
endforeach()
|
||||
# Create the list of variables that might need to be cleared
|
||||
set(ILMBASE_CACHED_VARS
|
||||
ILMBASE_INCLUDE_DIR ${IlmBase_cachevars}
|
||||
CACHE INTERNAL "Variables set by FindIlmBase.cmake" FORCE)
|
||||
|
||||
# Store the current state so that variables might be cleared if required
|
||||
set(ILMBASE_CACHED_STATE ${ILMBASE_CURRENT_STATE}
|
||||
CACHE INTERNAL "State last seen by FindIlmBase.cmake" FORCE)
|
||||
|
||||
# Link with pthreads if required
|
||||
if(NOT WIN32 AND EXISTS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h)
|
||||
file(STRINGS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h
|
||||
ILMBASE_HAVE_PTHREAD
|
||||
REGEX "^[ \\t]*#define[ \\t]+HAVE_PTHREAD[ \\t]1[ \\t]*\$"
|
||||
)
|
||||
if(ILMBASE_HAVE_PTHREAD)
|
||||
find_package(Threads)
|
||||
if(CMAKE_USE_PTHREADS_INIT)
|
||||
set(ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Use the standard function to handle ILMBASE_FOUND
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IlmBase DEFAULT_MSG
|
||||
ILMBASE_INCLUDE_DIR ${IlmBase_libvars})
|
||||
|
||||
if(ILMBASE_FOUND)
|
||||
set(ILMBASE_LIBRARIES "")
|
||||
foreach(tmplib ${IlmBase_libvars})
|
||||
list(APPEND ILMBASE_LIBRARIES ${${tmplib}})
|
||||
endforeach()
|
||||
list(APPEND ILMBASE_LIBRARIES ${ILMBASE_PTHREADS})
|
||||
if(NOT IlmBase_FIND_QUIETLY)
|
||||
FIND_PACKAGE_MESSAGE(ILMBASE
|
||||
"Found IlmBase: ${ILMBASE_LIBRARIES}"
|
||||
"[${ILMBASE_INCLUDE_DIR}][${ILMBASE_LIBRARIES}][${ILMBASE_CURRENT_STATE}]"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Restore the original find library ordering
|
||||
if( ILMBASE_USE_STATIC_LIBS )
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
endif()
|
||||
|
||||
# Unset the helper variables to avoid pollution
|
||||
unset(ILMBASE_CURRENT_STATE)
|
||||
unset(IlmBase_include_paths)
|
||||
unset(IlmBase_library_paths)
|
||||
unset(IlmBase_generic_include_paths)
|
||||
unset(IlmBase_generic_library_paths)
|
||||
unset(IlmBase_libvars)
|
||||
unset(IlmBase_cachevars)
|
||||
unset(ILMBASE_PTHREADS)
|
@@ -1,72 +0,0 @@
|
||||
# - Find LOGC4PLUS library
|
||||
# Find the native LOGC4PLUS includes and library
|
||||
# This module defines
|
||||
# LOGC4PLUS_INCLUDE_DIRS, where to find logc4plus.h, Set when
|
||||
# LOGC4PLUS is found.
|
||||
# LOGC4PLUS_LIBRARIES, libraries to link against to use LOGC4PLUS.
|
||||
# LOGC4PLUS_ROOT_DIR, The base directory to search for LOGC4PLUS.
|
||||
# This can also be an environment variable.
|
||||
# LOGC4PLUS_FOUND, If false, do not try to use LOGC4PLUS.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# LOGC4PLUS_LIBRARY, where to find the LOGC4PLUS 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 LOGC4PLUS_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT LOGC4PLUS_ROOT_DIR AND NOT $ENV{LOGC4PLUS_ROOT_DIR} STREQUAL "")
|
||||
SET(LOGC4PLUS_ROOT_DIR $ENV{LOGC4PLUS_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_logc4plus_SEARCH_DIRS
|
||||
${LOGC4PLUS_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/lib/logc4plus
|
||||
)
|
||||
|
||||
FIND_PATH(LOGC4PLUS_INCLUDE_DIR
|
||||
NAMES
|
||||
logc4plus.h
|
||||
HINTS
|
||||
${_logc4plus_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LOGC4PLUS_LIBRARY
|
||||
NAMES
|
||||
logc4plus
|
||||
HINTS
|
||||
${_logc4plus_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set LOGC4PLUS_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LOGC4PLUS DEFAULT_MSG
|
||||
LOGC4PLUS_LIBRARY LOGC4PLUS_INCLUDE_DIR)
|
||||
|
||||
IF(LOGC4PLUS_FOUND)
|
||||
SET(LOGC4PLUS_LIBRARIES ${LOGC4PLUS_LIBRARY})
|
||||
SET(LOGC4PLUS_INCLUDE_DIRS ${LOGC4PLUS_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(LOGC4PLUS_LOGC4PLUS_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LOGC4PLUS_INCLUDE_DIR
|
||||
LOGC4PLUS_LIBRARY
|
||||
)
|
@@ -1,246 +0,0 @@
|
||||
# Module to find OpenEXR.
|
||||
#
|
||||
# This module will first look into the directories defined by the variables:
|
||||
# - OPENEXR_HOME, OPENEXR_VERSION, OPENEXR_LIB_AREA
|
||||
#
|
||||
# It also supports non-standard names for the library components.
|
||||
#
|
||||
# To use a custom OpenEXR
|
||||
# - Set the variable OPENEXR_CUSTOM to True
|
||||
# - Set the variable OPENEXR_CUSTOM_LIBRARY to the name of the library to
|
||||
# use, e.g. "SpiIlmImf"
|
||||
# - Optionally set the variable OPENEXR_CUSTOM_INCLUDE_DIR to any
|
||||
# particularly weird place that the OpenEXR/*.h files may be found
|
||||
# - Optionally set the variable OPENEXR_CUSTOM_LIB_DIR to any
|
||||
# particularly weird place that the libraries files may be found
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# OPENEXR_INCLUDE_DIR - where to find ImfRgbaFile.h, OpenEXRConfig, etc.
|
||||
# OPENEXR_LIBRARIES - list of libraries to link against when using OpenEXR.
|
||||
# This list does NOT include the IlmBase libraries.
|
||||
# These are defined by the FindIlmBase module.
|
||||
# OPENEXR_FOUND - True if OpenEXR was found.
|
||||
|
||||
# Other standarnd issue macros
|
||||
include(SelectLibraryConfigurations)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(FindPackageMessage)
|
||||
|
||||
if(OPENEXR_USE_STATIC_LIBS)
|
||||
set(_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
if(WIN32)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
else()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Macro to assemble a helper state variable
|
||||
macro(SET_STATE_VAR varname)
|
||||
set(tmp_lst
|
||||
${OPENEXR_CUSTOM} | ${OPENEXR_CUSTOM_LIBRARY} |
|
||||
${OPENEXR_HOME} | ${OPENEXR_VERSION} | ${OPENEXR_LIB_AREA}
|
||||
)
|
||||
set(${varname} "${tmp_lst}")
|
||||
unset(tmp_lst)
|
||||
endmacro()
|
||||
|
||||
# To enforce that find_* functions do not use inadvertently existing versions
|
||||
if(OPENEXR_CUSTOM)
|
||||
set(OPENEXR_FIND_OPTIONS "NO_DEFAULT_PATH")
|
||||
endif()
|
||||
|
||||
# Macro to search for an include directory
|
||||
macro(PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
|
||||
string(TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
|
||||
find_path(${tmp_varname} ${includefile}
|
||||
HINTS ${${libpath_var}}
|
||||
PATH_SUFFIXES include
|
||||
${OPENEXR_FIND_OPTIONS}
|
||||
)
|
||||
if(${tmp_varname})
|
||||
mark_as_advanced(${tmp_varname})
|
||||
endif()
|
||||
unset(tmp_varname)
|
||||
endmacro()
|
||||
|
||||
|
||||
# Macro to search for the given library and adds the cached
|
||||
# variable names to the specified list
|
||||
macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
|
||||
string(TOUPPER ${prefix}_${libname} tmp_prefix)
|
||||
# Handle new library names for OpenEXR 2.1 build via cmake
|
||||
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
|
||||
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
|
||||
find_library(${tmp_prefix}_LIBRARY_RELEASE
|
||||
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
|
||||
HINTS ${${libpath_var}}
|
||||
PATH_SUFFIXES lib
|
||||
${OPENEXR_FIND_OPTIONS}
|
||||
)
|
||||
find_library(${tmp_prefix}_LIBRARY_DEBUG
|
||||
NAMES ${libname}d ${libname}_d ${libname}debug ${libname}_debug
|
||||
HINTS ${${libpath_var}}
|
||||
PATH_SUFFIXES lib
|
||||
${OPENEXR_FIND_OPTIONS}
|
||||
)
|
||||
# Properly define ${tmp_prefix}_LIBRARY (cached) and ${tmp_prefix}_LIBRARIES
|
||||
select_library_configurations(${tmp_prefix})
|
||||
list(APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
|
||||
|
||||
# Add to the list of variables which should be reset
|
||||
list(APPEND ${cachelist_var}
|
||||
${tmp_prefix}_LIBRARY
|
||||
${tmp_prefix}_LIBRARY_RELEASE
|
||||
${tmp_prefix}_LIBRARY_DEBUG)
|
||||
mark_as_advanced(
|
||||
${tmp_prefix}_LIBRARY
|
||||
${tmp_prefix}_LIBRARY_RELEASE
|
||||
${tmp_prefix}_LIBRARY_DEBUG)
|
||||
unset(tmp_prefix)
|
||||
endmacro()
|
||||
|
||||
|
||||
# Encode the current state of the external variables into a string
|
||||
SET_STATE_VAR(OPENEXR_CURRENT_STATE)
|
||||
|
||||
# If the state has changed, clear the cached variables
|
||||
if(OPENEXR_CACHED_STATE AND
|
||||
NOT OPENEXR_CACHED_STATE STREQUAL OPENEXR_CURRENT_STATE)
|
||||
foreach(libvar ${OPENEXR_CACHED_VARS})
|
||||
unset(${libvar} CACHE)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Generic search paths
|
||||
set(OpenEXR_generic_include_paths
|
||||
${OPENEXR_CUSTOM_INCLUDE_DIR}
|
||||
/usr/include
|
||||
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/local/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
)
|
||||
set(OpenEXR_generic_library_paths
|
||||
${OPENEXR_CUSTOM_LIB_DIR}
|
||||
/usr/lib
|
||||
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/local/lib
|
||||
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
# Search paths for the OpenEXR files
|
||||
if(OPENEXR_HOME)
|
||||
set(OpenEXR_library_paths
|
||||
${OPENEXR_HOME}/lib
|
||||
${OPENEXR_HOME}/lib64)
|
||||
if(OPENEXR_VERSION)
|
||||
set(OpenEXR_include_paths
|
||||
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/include
|
||||
${OPENEXR_HOME}/include/openexr-${OPENEXR_VERSION})
|
||||
list(APPEND OpenEXR_library_paths
|
||||
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/lib
|
||||
${OPENEXR_HOME}/lib/openexr-${OPENEXR_VERSION})
|
||||
endif()
|
||||
list(APPEND OpenEXR_include_paths ${OPENEXR_HOME}/include)
|
||||
if(OPENEXR_LIB_AREA)
|
||||
list(INSERT OpenEXR_library_paths 2 ${OPENEXR_LIB_AREA})
|
||||
endif()
|
||||
endif()
|
||||
if(ILMBASE_HOME AND OPENEXR_VERSION)
|
||||
list(APPEND OpenEXR_include_paths
|
||||
${ILMBASE_HOME}/include/openexr-${OPENEXR_VERSION})
|
||||
endif()
|
||||
list(APPEND OpenEXR_include_paths ${OpenEXR_generic_include_paths})
|
||||
list(APPEND OpenEXR_library_paths ${OpenEXR_generic_library_paths})
|
||||
|
||||
# Locate the header files
|
||||
PREFIX_FIND_INCLUDE_DIR(OpenEXR
|
||||
OpenEXR/ImfArray.h OpenEXR_include_paths)
|
||||
|
||||
if(OPENEXR_INCLUDE_DIR)
|
||||
# Get the version from config file, if not already set.
|
||||
if(NOT OPENEXR_VERSION)
|
||||
FILE(STRINGS "${OPENEXR_INCLUDE_DIR}/OpenEXR/OpenEXRConfig.h" OPENEXR_BUILD_SPECIFICATION
|
||||
REGEX "^[ \t]*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
|
||||
|
||||
if(OPENEXR_BUILD_SPECIFICATION)
|
||||
if(NOT OpenEXR_FIND_QUIETLY)
|
||||
message(STATUS "${OPENEXR_BUILD_SPECIFICATION}")
|
||||
endif()
|
||||
string(REGEX REPLACE ".*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
|
||||
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
|
||||
set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
|
||||
else()
|
||||
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
|
||||
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
|
||||
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OPENEXR_CUSTOM)
|
||||
if(NOT OPENEXR_CUSTOM_LIBRARY)
|
||||
message(FATAL_ERROR "Custom OpenEXR library requested but OPENEXR_CUSTOM_LIBRARY is not set.")
|
||||
endif()
|
||||
set(OpenEXR_Library ${OPENEXR_CUSTOM_LIBRARY})
|
||||
else()
|
||||
#elseif(${OPENEXR_VERSION} VERSION_LESS "2.1")
|
||||
set(OpenEXR_Library IlmImf)
|
||||
#else()
|
||||
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
|
||||
# set(OpenEXR_Library IlmImf-${_openexr_libs_ver})
|
||||
endif()
|
||||
|
||||
# Locate the OpenEXR library
|
||||
set(OpenEXR_libvars "")
|
||||
set(OpenEXR_cachevars "")
|
||||
PREFIX_FIND_LIB(OpenEXR ${OpenEXR_Library}
|
||||
OpenEXR_library_paths OpenEXR_libvars OpenEXR_cachevars)
|
||||
|
||||
# Create the list of variables that might need to be cleared
|
||||
set(OPENEXR_CACHED_VARS
|
||||
OPENEXR_INCLUDE_DIR ${OpenEXR_cachevars}
|
||||
CACHE INTERNAL "Variables set by FindOpenEXR.cmake" FORCE)
|
||||
|
||||
# Store the current state so that variables might be cleared if required
|
||||
set(OPENEXR_CACHED_STATE ${OPENEXR_CURRENT_STATE}
|
||||
CACHE INTERNAL "State last seen by FindOpenEXR.cmake" FORCE)
|
||||
|
||||
# Always link explicitly with zlib
|
||||
set(OPENEXR_ZLIB ${ZLIB_LIBRARIES})
|
||||
|
||||
# Use the standard function to handle OPENEXR_FOUND
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
|
||||
OPENEXR_INCLUDE_DIR ${OpenEXR_libvars})
|
||||
|
||||
if(OPENEXR_FOUND)
|
||||
set(OPENEXR_LIBRARIES "")
|
||||
foreach(tmplib ${OpenEXR_libvars})
|
||||
list(APPEND OPENEXR_LIBRARIES ${${tmplib}})
|
||||
endforeach()
|
||||
list(APPEND OPENEXR_LIBRARIES ${ZLIB_LIBRARIES})
|
||||
if(NOT OpenEXR_FIND_QUIETLY)
|
||||
FIND_PACKAGE_MESSAGE(OPENEXR
|
||||
"Found OpenEXR: ${OPENEXR_LIBRARIES}"
|
||||
"[${OPENEXR_INCLUDE_DIR}][${OPENEXR_LIBRARIES}][${OPENEXR_CURRENT_STATE}]"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Restore the original find library ordering
|
||||
if( OPENEXR_USE_STATIC_LIBS )
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
endif()
|
||||
|
||||
# Unset the helper variables to avoid pollution
|
||||
unset(OPENEXR_CURRENT_STATE)
|
||||
unset(OpenEXR_include_paths)
|
||||
unset(OpenEXR_library_paths)
|
||||
unset(OpenEXR_generic_include_paths)
|
||||
unset(OpenEXR_generic_library_paths)
|
||||
unset(OpenEXR_libvars)
|
||||
unset(OpenEXR_cachevars)
|
@@ -1,72 +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/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,82 +0,0 @@
|
||||
# select_library_configurations( basename )
|
||||
#
|
||||
# This macro takes a library base name as an argument, and will choose good
|
||||
# values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and
|
||||
# basename_LIBRARY_RELEASE depending on what has been found and set. If only
|
||||
# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG,
|
||||
# and basename_LIBRARY_RELEASE will be set to the release value. If only
|
||||
# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY,
|
||||
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.
|
||||
#
|
||||
# If the generator supports configuration types, then basename_LIBRARY and
|
||||
# basename_LIBRARIES will be set with debug and optimized flags specifying the
|
||||
# library to be used for the given configuration. If no build type has been set
|
||||
# or the generator in use does not support configuration types, then
|
||||
# basename_LIBRARY and basename_LIBRARIES will take only the release values.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2009 Kitware, Inc.
|
||||
# Copyright 2009 Will Dicharry <wdicharry@stellarscience.com>
|
||||
# Copyright 2005-2009 Kitware, Inc.
|
||||
#
|
||||
# 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.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This macro was adapted from the FindQt4 CMake module and is maintained by Will
|
||||
# Dicharry <wdicharry@stellarscience.com>.
|
||||
|
||||
# Utility macro to check if one variable exists while another doesn't, and set
|
||||
# one that doesn't exist to the one that exists.
|
||||
macro( _set_library_name basename GOOD BAD )
|
||||
if( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} )
|
||||
set( ${basename}_LIBRARY_${BAD} ${${basename}_LIBRARY_${GOOD}} )
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_${GOOD}} )
|
||||
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_${GOOD}} )
|
||||
endif( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} )
|
||||
endmacro( _set_library_name )
|
||||
|
||||
macro( select_library_configurations basename )
|
||||
# if only the release version was found, set the debug to be the release
|
||||
# version.
|
||||
_set_library_name( ${basename} RELEASE DEBUG )
|
||||
# if only the debug version was found, set the release value to be the
|
||||
# debug value.
|
||||
_set_library_name( ${basename} DEBUG RELEASE )
|
||||
if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
|
||||
# if the generator supports configuration types or CMAKE_BUILD_TYPE
|
||||
# is set, then set optimized and debug options.
|
||||
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
||||
set( ${basename}_LIBRARY
|
||||
optimized ${${basename}_LIBRARY_RELEASE}
|
||||
debug ${${basename}_LIBRARY_DEBUG} )
|
||||
set( ${basename}_LIBRARIES
|
||||
optimized ${${basename}_LIBRARY_RELEASE}
|
||||
debug ${${basename}_LIBRARY_DEBUG} )
|
||||
else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
||||
# If there are no configuration types or build type, just use
|
||||
# the release version
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
|
||||
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} )
|
||||
endif( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
||||
endif( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
|
||||
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
|
||||
"The ${basename} library" )
|
||||
|
||||
if( ${basename}_LIBRARY )
|
||||
set( ${basename}_FOUND TRUE )
|
||||
endif( ${basename}_LIBRARY )
|
||||
|
||||
mark_as_advanced( ${basename}_LIBRARY
|
||||
${basename}_LIBRARY_RELEASE
|
||||
${basename}_LIBRARY_DEBUG
|
||||
)
|
||||
endmacro( select_library_configurations )
|
||||
|
@@ -1,2 +0,0 @@
|
||||
cmake_minimum_required (VERSION 2.4)
|
||||
add_subdirectory(build/cmake)
|
@@ -1,20 +0,0 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(hidapi)
|
||||
|
||||
set(SRC_FILES
|
||||
windows/hid.c
|
||||
)
|
||||
|
||||
set(HEADER_FILES
|
||||
hidapi/hidapi.h
|
||||
)
|
||||
include_directories(hidapi)
|
||||
add_definitions(-DHID_API_STATIC)
|
||||
add_library(hidapi STATIC ${SRC_FILES} ${HEADER_FILES})
|
||||
|
||||
install(TARGETS hidapi DESTINATION lib)
|
||||
|
||||
INSTALL(FILES hidapi/hidapi.h
|
||||
DESTINATION "include"
|
||||
)
|
||||
|
@@ -1,398 +0,0 @@
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
project(OpenVDB)
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
set(CMAKE_BUILD_TYPE_INIT "Release")
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# Options
|
||||
|
||||
option(WITH_BLOSC "Enable Blosc support for compression" OFF)
|
||||
option(WITH_LOGC4PLUS "Enable logging" OFF)
|
||||
option(WITH_OPENVDB_2_ABI "Enable building the library to be compability with the OpenVDB 2 ABI" OFF)
|
||||
option(WITH_PRINTER "Enable building the OpenVDB print executable" OFF)
|
||||
option(WITH_PYTHON "Enable building the OpenVDB python API" OFF)
|
||||
option(WITH_RENDERER "Enable building the OpenVDB render executable" OFF)
|
||||
option(WITH_UNITTEST "Enable building the unit tests" OFF)
|
||||
option(WITH_VIEWER "Enable building the OpenVDB viewer executable" OFF)
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# Find packages
|
||||
#set(BOOST_LIBRARIES boost_iostreams boost_system boost_thread)
|
||||
|
||||
find_package(IlmBase)
|
||||
find_package(OpenEXR)
|
||||
find_package(TBB)
|
||||
find_package(Boost)
|
||||
|
||||
if(WITH_BLOSC)
|
||||
find_package(Blosc)
|
||||
|
||||
if(NOT BLOSC_FOUND)
|
||||
set(WITH_BLOSC OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# todo
|
||||
if(WITH_VIEWER)
|
||||
set(GLFW_INCLUDE_DIRS ${GLFW_INCLUDE_PATH})
|
||||
set(GLFW_LIBRARY_DIRS ${GLFW_LIBRARY_PATH})
|
||||
endif()
|
||||
|
||||
if(WITH_LOGC4PLUS)
|
||||
find_package(LogC4Plus)
|
||||
|
||||
if(NOT LOGC4PLUS_FOUND)
|
||||
set(WITH_LOGC4PLUS OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# todo
|
||||
if(WITH_PYTHON)
|
||||
set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
|
||||
set(PYTHON_LIBRARY_DIRS ${PYTHON_LIBRARY_PATH})
|
||||
endif()
|
||||
|
||||
if(WITH_UNITTEST)
|
||||
find_package(CppUnit)
|
||||
|
||||
if(NOT CPPUNIT_FOUND)
|
||||
set(WITH_UNITTEST OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
message (STATUS "BOOST_ROOT ${BOOST_ROOT}")
|
||||
message (STATUS "Boost found ${Boost_FOUND} ")
|
||||
message (STATUS "Boost version ${Boost_VERSION}")
|
||||
message (STATUS "Boost include dirs ${Boost_INCLUDE_DIRS}")
|
||||
message (STATUS "Boost library dirs ${Boost_LIBRARY_DIRS}")
|
||||
message (STATUS "Boost libraries ${Boost_LIBRARIES}")
|
||||
|
||||
message (STATUS "ILMBase found ${ILMBASE_FOUND} ")
|
||||
message (STATUS "ILMBase include dir ${ILMBASE_INCLUDE_DIR}")
|
||||
message (STATUS "ILMBase libraries ${ILMBASE_LIBRARIES}")
|
||||
|
||||
message (STATUS "TBB found ${TBB_FOUND} ")
|
||||
message (STATUS "TBB include dir ${TBB_INCLUDE_DIR}")
|
||||
message (STATUS "TBB libraries ${TBB_LIBRARIES}")
|
||||
|
||||
if(MSVC)
|
||||
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj" )
|
||||
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj" )
|
||||
endif()
|
||||
|
||||
set(OPENVDB_LIBRARIES ${BLOSC_LIBRARIES} ${BOOST_LIBRARIES} ${OPENEXR_LIBRARIES} ${ILMBASE_LIBRARIES} ${TBB_LIBRARIES} ${ZLIB_LIBRARY} )
|
||||
|
||||
include_directories(. ${CMAKE_CURRENT_SOURCE_DIR}/../ ${Boost_INCLUDE_DIRS} ${ILMBASE_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR} ${TBB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
|
||||
link_directories(${Boost_LIBRARY_DIRS} ${OPENEXR_LIBRARY_DIRS} ${TBB_INCLUDE_DIRS})
|
||||
add_definitions(-DNOMINMAX -D__TBB_NO_IMPLICIT_LINKAGE -DOPENVDB_STATICLIB -DOPENVDB_OPENEXR_STATICLIB)
|
||||
|
||||
if(WITH_BLOSC)
|
||||
add_definitions(-DOPENVDB_USE_BLOSC)
|
||||
include_directories(${BLOSC_INCLUDE_DIRS})
|
||||
link_directories(${BLOSC_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
if(WITH_LOGC4PLUS)
|
||||
add_definitions(-DOPENVDB_USE_LOG4CPLUS)
|
||||
include_directories(${LOG4CPLUS_INCLUDE_DIRS})
|
||||
link_directories(${LOG4CPLUS_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB_2_ABI)
|
||||
add_definitions(-DOPENVDB_2_ABI_COMPATIBLE)
|
||||
endif()
|
||||
|
||||
# todo
|
||||
if(WITH_OPENVDB_USE_GLFW_3)
|
||||
add_definitions(-DOPENVDB_USE_GLFW_3)
|
||||
endif()
|
||||
|
||||
if(WITH_UNITTEST)
|
||||
include_directories(${CPPUNIT_INCLUDE_DIRS})
|
||||
link_directories(${CPPUNIT_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
set(SRC_FILES
|
||||
openvdb/openvdb.cc
|
||||
openvdb/io/Compression.cc
|
||||
openvdb/io/File.cc
|
||||
openvdb/io/Queue.cc
|
||||
openvdb/io/Stream.cc
|
||||
openvdb/io/TempFile.cc
|
||||
openvdb/io/GridDescriptor.cc
|
||||
openvdb/io/Archive.cc
|
||||
openvdb/metadata/MetaMap.cc
|
||||
openvdb/metadata/Metadata.cc
|
||||
openvdb/math/Maps.cc
|
||||
openvdb/math/Transform.cc
|
||||
openvdb/math/QuantizedUnitVec.cc
|
||||
openvdb/math/Proximity.cc
|
||||
openvdb/Grid.cc
|
||||
openvdb/util/Formats.cc
|
||||
openvdb/util/Util.cc
|
||||
)
|
||||
|
||||
set(HEADER_FILES
|
||||
openvdb/openvdb.h
|
||||
openvdb/version.h
|
||||
openvdb/PlatformConfig.h
|
||||
openvdb/Metadata.h
|
||||
openvdb/Exceptions.h
|
||||
openvdb/Grid.h
|
||||
openvdb/Types.h
|
||||
openvdb/Platform.h
|
||||
openvdb/tree/ValueAccessor.h
|
||||
openvdb/tree/NodeUnion.h
|
||||
openvdb/tree/Tree.h
|
||||
openvdb/tree/Iterator.h
|
||||
openvdb/tree/LeafNodeBool.h
|
||||
openvdb/tree/TreeIterator.h
|
||||
openvdb/tree/LeafNode.h
|
||||
openvdb/tree/NodeManager.h
|
||||
openvdb/tree/LeafManager.h
|
||||
openvdb/tree/InternalNode.h
|
||||
openvdb/tree/RootNode.h
|
||||
openvdb/tools/PointScatter.h
|
||||
openvdb/tools/VolumeAdvect.h
|
||||
openvdb/tools/LevelSetTracker.h
|
||||
openvdb/tools/Composite.h
|
||||
openvdb/tools/Morphology.h
|
||||
openvdb/tools/ValueTransformer.h
|
||||
openvdb/tools/ChangeBackground.h
|
||||
openvdb/tools/GridTransformer.h
|
||||
openvdb/tools/Prune.h
|
||||
openvdb/tools/LevelSetUtil.h
|
||||
openvdb/tools/VolumeToSpheres.h
|
||||
openvdb/tools/LevelSetAdvect.h
|
||||
openvdb/tools/Statistics.h
|
||||
openvdb/tools/LevelSetMeasure.h
|
||||
openvdb/tools/VectorTransformer.h
|
||||
openvdb/tools/RayIntersector.h
|
||||
openvdb/tools/PointPartitioner.h
|
||||
openvdb/tools/Interpolation.h
|
||||
openvdb/tools/VelocityFields.h
|
||||
openvdb/tools/PointIndexGrid.h
|
||||
openvdb/tools/LevelSetRebuild.h
|
||||
openvdb/tools/Clip.h
|
||||
openvdb/tools/SignedFloodFill.h
|
||||
openvdb/tools/MeshToVolume.h
|
||||
openvdb/tools/Dense.h
|
||||
openvdb/tools/Filter.h
|
||||
openvdb/tools/RayTracer.h
|
||||
openvdb/tools/Diagnostics.h
|
||||
openvdb/tools/VolumeToMesh.h
|
||||
openvdb/tools/PoissonSolver.h
|
||||
openvdb/tools/LevelSetFracture.h
|
||||
openvdb/tools/GridOperators.h
|
||||
openvdb/tools/DenseSparseTools.h
|
||||
openvdb/tools/ParticlesToLevelSet.h
|
||||
openvdb/tools/LevelSetSphere.h
|
||||
openvdb/tools/LevelSetMorph.h
|
||||
openvdb/tools/LevelSetFilter.h
|
||||
openvdb/tools/PointAdvect.h
|
||||
openvdb/io/Queue.h
|
||||
openvdb/io/TempFile.h
|
||||
openvdb/io/Stream.h
|
||||
openvdb/io/GridDescriptor.h
|
||||
openvdb/io/Archive.h
|
||||
openvdb/io/io.h
|
||||
openvdb/io/Compression.h
|
||||
openvdb/io/File.h
|
||||
openvdb/metadata/StringMetadata.h
|
||||
openvdb/metadata/MetaMap.h
|
||||
openvdb/metadata/Metadata.h
|
||||
openvdb/math/DDA.h
|
||||
openvdb/math/Vec2.h
|
||||
openvdb/math/FiniteDifference.h
|
||||
openvdb/math/Stencils.h
|
||||
openvdb/math/BBox.h
|
||||
openvdb/math/Mat3.h
|
||||
openvdb/math/Mat.h
|
||||
openvdb/math/Proximity.h
|
||||
openvdb/math/Ray.h
|
||||
openvdb/math/ConjGradient.h
|
||||
openvdb/math/Quat.h
|
||||
openvdb/math/Vec3.h
|
||||
openvdb/math/Vec4.h
|
||||
openvdb/math/QuantizedUnitVec.h
|
||||
openvdb/math/Coord.h
|
||||
openvdb/math/Operators.h
|
||||
openvdb/math/Stats.h
|
||||
openvdb/math/Math.h
|
||||
openvdb/math/Tuple.h
|
||||
openvdb/math/LegacyFrustum.h
|
||||
openvdb/math/Mat4.h
|
||||
openvdb/math/Maps.h
|
||||
openvdb/math/Transform.h
|
||||
openvdb/util/PagedArray.h
|
||||
openvdb/util/CpuTimer.h
|
||||
openvdb/util/Formats.h
|
||||
openvdb/util/NullInterrupter.h
|
||||
openvdb/util/Util.h
|
||||
openvdb/util/Name.h
|
||||
openvdb/util/MapsUtil.h
|
||||
openvdb/util/NodeMasks.h
|
||||
openvdb/util/logging.h
|
||||
)
|
||||
|
||||
add_library(openvdb STATIC ${SRC_FILES} ${HEADER_FILES})
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
target_link_libraries(openvdb ${OPENVDB_LIBRARIES})
|
||||
|
||||
set(OPENVDB_VERSION_MAJOR 3)
|
||||
set(OPENVDB_VERSION_MINOR 1)
|
||||
set(OPENVDB_VERSION_PATCH 0)
|
||||
set(OPENVDB_VERSION_STRING ${OPENVDB_VERSION_MAJOR}.${OPENVDB_VERSION_MINOR}.${OPENVDB_VERSION_PATCH})
|
||||
|
||||
set_target_properties(openvdb PROPERTIES VERSION ${OPENVDB_VERSION_STRING} SOVERSION ${OPENVDB_VERSION_MAJOR})
|
||||
|
||||
install(TARGETS openvdb DESTINATION lib)
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include COMPONENT Development FILES_MATCHING PATTERN "*.h"
|
||||
PATTERN ".git" EXCLUDE PATTERN "build" EXCLUDE PATTERN "cmake" EXCLUDE)
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
if(WITH_PRINTER)
|
||||
set(PRINT_SRC
|
||||
openvdb/cmd/openvdb_print/main.cc
|
||||
)
|
||||
|
||||
add_executable(vdb_print ${PRINT_SRC})
|
||||
target_link_libraries(vdb_print openvdb)
|
||||
install(TARGETS vdb_print RUNTIME DESTINATION bin)
|
||||
endif()
|
||||
|
||||
if(WITH_RENDER)
|
||||
set(RENDER_SRC
|
||||
openvdb/cmd/openvdb_render/main.cc
|
||||
)
|
||||
|
||||
add_executable(vdb_render ${RENDER_SRC})
|
||||
target_link_libraries(vdb_render openvdb)
|
||||
install(TARGETS vdb_render RUNTIME DESTINATION bin)
|
||||
endif()
|
||||
|
||||
# todo
|
||||
if(WITH_VIEWER)
|
||||
set(VIEWER_SRC
|
||||
openvdb/viewer/Camera.cc
|
||||
openvdb/viewer/ClipBox.cc
|
||||
openvdb/viewer/Font.cc
|
||||
openvdb/viewer/RenderModules.cc
|
||||
openvdb/viewer/Viewer.cc
|
||||
|
||||
openvdb/viewer/Camera.h
|
||||
openvdb/viewer/ClipBox.h
|
||||
openvdb/viewer/Font.h
|
||||
openvdb/viewer/RenderModules.h
|
||||
openvdb/viewer/Viewer.h
|
||||
openvdb/cmd/openvdb_viewer/main.cc
|
||||
)
|
||||
|
||||
include_directories(${GLFW_INCLUDE_DIRS})
|
||||
link_directories(${GLFW_LIBRARY_DIRS})
|
||||
|
||||
add_executable(vdb_viewer ${VIEWER_SRC})
|
||||
target_link_libraries(vdb_viewer openvdb)
|
||||
install(TARGETS vdb_viewer RUNTIME DESTINATION bin)
|
||||
endif()
|
||||
|
||||
# todo
|
||||
if(WITH_PYTHON)
|
||||
# add_library(pyopenvdb SHARED )
|
||||
endif()
|
||||
|
||||
set(UNITTEST_SRC
|
||||
openvdb/unittest/main.cc
|
||||
openvdb/unittest/TestBBox.cc
|
||||
openvdb/unittest/TestConjGradient.cc
|
||||
openvdb/unittest/TestCoord.cc
|
||||
openvdb/unittest/TestCpt.cc
|
||||
openvdb/unittest/TestCurl.cc
|
||||
openvdb/unittest/TestDense.cc
|
||||
openvdb/unittest/TestDenseSparseTools.cc
|
||||
openvdb/unittest/TestDiagnostics.cc
|
||||
openvdb/unittest/TestDivergence.cc
|
||||
openvdb/unittest/TestDoubleMetadata.cc
|
||||
openvdb/unittest/TestExceptions.cc
|
||||
openvdb/unittest/TestFile.cc
|
||||
openvdb/unittest/TestFloatMetadata.cc
|
||||
openvdb/unittest/TestGradient.cc
|
||||
openvdb/unittest/TestGrid.cc
|
||||
openvdb/unittest/TestGridBbox.cc
|
||||
openvdb/unittest/TestGridDescriptor.cc
|
||||
openvdb/unittest/TestGridIO.cc
|
||||
openvdb/unittest/TestGridTransformer.cc
|
||||
openvdb/unittest/TestInit.cc
|
||||
openvdb/unittest/TestInt32Metadata.cc
|
||||
openvdb/unittest/TestInt64Metadata.cc
|
||||
openvdb/unittest/TestInternalOrigin.cc
|
||||
openvdb/unittest/TestLaplacian.cc
|
||||
openvdb/unittest/TestLeaf.cc
|
||||
openvdb/unittest/TestLeafBool.cc
|
||||
openvdb/unittest/TestLeafIO.cc
|
||||
openvdb/unittest/TestLeafOrigin.cc
|
||||
openvdb/unittest/TestLevelSetRayIntersector.cc
|
||||
openvdb/unittest/TestLevelSetUtil.cc
|
||||
openvdb/unittest/TestLinearInterp.cc
|
||||
openvdb/unittest/TestMaps.cc
|
||||
openvdb/unittest/TestMat4Metadata.cc
|
||||
openvdb/unittest/TestMath.cc
|
||||
openvdb/unittest/TestMeanCurvature.cc
|
||||
openvdb/unittest/TestMeshToVolume.cc
|
||||
openvdb/unittest/TestMetadata.cc
|
||||
openvdb/unittest/TestMetadataIO.cc
|
||||
openvdb/unittest/TestMetaMap.cc
|
||||
openvdb/unittest/TestName.cc
|
||||
openvdb/unittest/TestNodeIterator.cc
|
||||
openvdb/unittest/TestNodeMask.cc
|
||||
openvdb/unittest/TestParticlesToLevelSet.cc
|
||||
openvdb/unittest/TestPointIndexGrid.cc
|
||||
openvdb/unittest/TestPointPartitioner.cc
|
||||
openvdb/unittest/TestPoissonSolver.cc
|
||||
openvdb/unittest/TestPrePostAPI.cc
|
||||
openvdb/unittest/TestQuadraticInterp.cc
|
||||
openvdb/unittest/TestQuantizedUnitVec.cc
|
||||
openvdb/unittest/TestQuat.cc
|
||||
openvdb/unittest/TestRay.cc
|
||||
openvdb/unittest/TestStats.cc
|
||||
openvdb/unittest/TestStream.cc
|
||||
openvdb/unittest/TestStringMetadata.cc
|
||||
openvdb/unittest/TestTools.cc
|
||||
openvdb/unittest/TestTransform.cc
|
||||
openvdb/unittest/TestTree.cc
|
||||
openvdb/unittest/TestTreeCombine.cc
|
||||
openvdb/unittest/TestTreeGetSetValues.cc
|
||||
openvdb/unittest/TestTreeIterators.cc
|
||||
openvdb/unittest/TestTreeVisitor.cc
|
||||
openvdb/unittest/TestUtil.cc
|
||||
openvdb/unittest/TestValueAccessor.cc
|
||||
openvdb/unittest/TestVec2Metadata.cc
|
||||
openvdb/unittest/TestVec3Metadata.cc
|
||||
openvdb/unittest/TestVolumeRayIntersector.cc
|
||||
openvdb/unittest/TestVolumeToMesh.cc
|
||||
)
|
||||
|
||||
# todo
|
||||
if(WITH_UNITTEST)
|
||||
add_executable(test ${UNITTEST_SRC} ${HEADER_FILES})
|
||||
target_link_libraries(test openvdb ${CPPUNIT_LIBRARIES})
|
||||
endif()
|
@@ -1,196 +0,0 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
project(tbb CXX)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
message(STATUS "Setting build type to 'Release' as none was specified.")
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
|
||||
"MinSizeRel" "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
include_directories(include src src/rml/include )
|
||||
|
||||
option(TBB_BUILD_SHARED "Build TBB shared library" ON)
|
||||
option(TBB_BUILD_STATIC "Build TBB static library" ON)
|
||||
option(TBB_BUILD_TBBMALLOC "Build TBB malloc library" ON)
|
||||
option(TBB_BUILD_TBBMALLOC_PROXY "Build TBB malloc proxy library" ON)
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_MACOSX_RPATH ON)
|
||||
endif()
|
||||
|
||||
file(GLOB tbb_src "${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/old/*.cpp")
|
||||
list(APPEND tbb_src ${CMAKE_CURRENT_SOURCE_DIR}/src/rml/client/rml_tbb.cpp)
|
||||
file(GLOB to_remove "${CMAKE_CURRENT_SOURCE_DIR}/src/old/test*.cpp")
|
||||
list(REMOVE_ITEM tbb_src ${to_remove})
|
||||
|
||||
set(tbbmalloc_static_src
|
||||
src/tbbmalloc/backend.cpp
|
||||
src/tbbmalloc/large_objects.cpp
|
||||
src/tbbmalloc/backref.cpp
|
||||
src/tbbmalloc/tbbmalloc.cpp
|
||||
src/tbbmalloc/frontend.cpp
|
||||
src/tbb/itt_notify.cpp)
|
||||
|
||||
set(tbbmalloc_src ${tbbmalloc_static_src})
|
||||
|
||||
set(tbbmalloc_proxy_src
|
||||
src/tbbmalloc/proxy.cpp
|
||||
src/tbbmalloc/tbb_function_replacement.cpp)
|
||||
|
||||
if (NOT APPLE)
|
||||
add_definitions(-DDO_ITT_NOTIFY)
|
||||
else()
|
||||
# Disable annoying "has no symbols" warnings
|
||||
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>")
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -DUSE_PTHREAD")
|
||||
if(NOT CMAKE_CXX_FLAGS MATCHES "-mno-rtm")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mrtm")
|
||||
endif()
|
||||
if (APPLE)
|
||||
set(ARCH_PREFIX "mac")
|
||||
else()
|
||||
set(ARCH_PREFIX "lin")
|
||||
endif()
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(ARCH_PREFIX "${ARCH_PREFIX}64")
|
||||
else()
|
||||
set(ARCH_PREFIX "${ARCH_PREFIX}32")
|
||||
endif()
|
||||
set(ENABLE_RTTI "-frtti -fexceptions ")
|
||||
set(DISABLE_RTTI "-fno-rtti -fno-exceptions ")
|
||||
elseif(WIN32)
|
||||
cmake_minimum_required (VERSION 3.1)
|
||||
enable_language(ASM_MASM)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS- /Zc:wchar_t /Zc:forScope /DUSE_WINTHREAD")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0600 /volatile:iso")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4800 /wd4146 /wd4244 /wd4018")
|
||||
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND tbb_src src/tbb/intel64-masm/atomic_support.asm
|
||||
src/tbb/intel64-masm/itsx.asm src/tbb/intel64-masm/intel64_misc.asm)
|
||||
list(APPEND tbbmalloc_src src/tbb/intel64-masm/atomic_support.asm)
|
||||
set(CMAKE_ASM_MASM_FLAGS "/DEM64T=1")
|
||||
set(ARCH_PREFIX "win64")
|
||||
else()
|
||||
list(APPEND tbb_src src/tbb/ia32-masm/atomic_support.asm
|
||||
src/tbb/ia32-masm/itsx.asm src/tbb/ia32-masm/lock_byte.asm)
|
||||
list(APPEND tbbmalloc_src src/tbb/ia32-masm/atomic_support.asm)
|
||||
set(ARCH_PREFIX "win32")
|
||||
endif()
|
||||
set(ENABLE_RTTI "/EHsc /GR ")
|
||||
set(DISABLE_RTTI "/EHs- /GR- ")
|
||||
endif()
|
||||
|
||||
# Linker export definitions
|
||||
if (WIN32)
|
||||
add_custom_command(OUTPUT tbb.def
|
||||
COMMAND ${CMAKE_CXX_COMPILER} /TC /EP ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include > tbb.def
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def
|
||||
COMMENT "Preprocessing tbb.def"
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT tbbmalloc.def
|
||||
COMMAND ${CMAKE_CXX_COMPILER} /TC /EP ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include > tbbmalloc.def
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
|
||||
COMMENT "Preprocessing tbbmalloc.def"
|
||||
)
|
||||
else()
|
||||
add_custom_command(OUTPUT tbb.def
|
||||
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbb.def
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def
|
||||
COMMENT "Preprocessing tbb.def"
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT tbbmalloc.def
|
||||
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbbmalloc.def
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
|
||||
COMMENT "Preprocessing tbbmalloc.def"
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_target(tbb_def_files DEPENDS tbb.def tbbmalloc.def)
|
||||
|
||||
# TBB library
|
||||
if (TBB_BUILD_STATIC)
|
||||
add_library(tbb_static STATIC ${tbb_src})
|
||||
set_property(TARGET tbb_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_BUILD=1")
|
||||
set_property(TARGET tbb_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_SOURCE_DIRECTLY_INCLUDED=1")
|
||||
set_property(TARGET tbb_static APPEND_STRING PROPERTY COMPILE_FLAGS ${ENABLE_RTTI})
|
||||
install(TARGETS tbb_static ARCHIVE DESTINATION lib)
|
||||
endif()
|
||||
|
||||
if (TBB_BUILD_SHARED)
|
||||
add_library(tbb SHARED ${tbb_src})
|
||||
set_property(TARGET tbb APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_BUILD=1")
|
||||
set_property(TARGET tbb APPEND_STRING PROPERTY COMPILE_FLAGS ${ENABLE_RTTI})
|
||||
add_dependencies(tbb tbb_def_files)
|
||||
if (APPLE)
|
||||
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
|
||||
elseif(UNIX)
|
||||
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
|
||||
elseif(WIN32)
|
||||
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
|
||||
endif()
|
||||
install(TARGETS tbb DESTINATION lib)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
# Quench a warning on GCC
|
||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/governor.cpp COMPILE_FLAGS "-Wno-missing-field-initializers ")
|
||||
elseif(MSVC)
|
||||
# Quench a warning on MSVC
|
||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/scheduler.cpp COMPILE_FLAGS "/wd4458 ")
|
||||
endif()
|
||||
|
||||
if(TBB_BUILD_TBBMALLOC)
|
||||
# TBB malloc library
|
||||
if (TBB_BUILD_STATIC)
|
||||
add_library(tbbmalloc_static STATIC ${tbbmalloc_static_src})
|
||||
set_property(TARGET tbbmalloc_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
|
||||
set_property(TARGET tbbmalloc_static APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
|
||||
install(TARGETS tbbmalloc_static ARCHIVE DESTINATION lib)
|
||||
endif()
|
||||
|
||||
if (TBB_BUILD_SHARED)
|
||||
add_library(tbbmalloc SHARED ${tbbmalloc_src})
|
||||
set_property(TARGET tbbmalloc APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
|
||||
set_property(TARGET tbbmalloc APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
|
||||
add_dependencies(tbbmalloc tbb_def_files)
|
||||
if (APPLE)
|
||||
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "-Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def")
|
||||
elseif(UNIX)
|
||||
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def")
|
||||
elseif(WIN32)
|
||||
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def")
|
||||
endif()
|
||||
install(TARGETS tbbmalloc DESTINATION lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TBB_BUILD_TBBMALLOC_PROXY)
|
||||
# TBB malloc proxy library
|
||||
if (TBB_BUILD_STATIC)
|
||||
add_library(tbbmalloc_proxy_static STATIC ${tbbmalloc_proxy_src})
|
||||
set_property(TARGET tbbmalloc_proxy_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
|
||||
set_property(TARGET tbbmalloc_proxy_static APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
|
||||
link_libraries(tbbmalloc_proxy_static tbbmalloc)
|
||||
install(TARGETS tbbmalloc_proxy_static ARCHIVE DESTINATION lib)
|
||||
endif()
|
||||
|
||||
if (TBB_BUILD_SHARED)
|
||||
add_library(tbbmalloc_proxy SHARED ${tbbmalloc_proxy_src})
|
||||
set_property(TARGET tbbmalloc_proxy APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
|
||||
set_property(TARGET tbbmalloc_proxy APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
|
||||
link_libraries(tbbmalloc_proxy tbbmalloc)
|
||||
install(TARGETS tbbmalloc_proxy DESTINATION lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(DIRECTORY include/tbb DESTINATION include)
|
@@ -1,26 +0,0 @@
|
||||
--- CmakeLists.txt.orig 2015-12-31 03:46:41 -0700
|
||||
+++ CMakeLists.txt 2016-04-01 13:28:33 -0600
|
||||
@@ -22,3 +22,10 @@
|
||||
|
||||
add_executable(testcuew cuewTest/cuewTest.c include/cuew.h)
|
||||
target_link_libraries(testcuew cuew ${CMAKE_DL_LIBS})
|
||||
+
|
||||
+install(TARGETS cuew
|
||||
+ LIBRARY DESTINATION lib COMPONENT libraries
|
||||
+ ARCHIVE DESTINATION lib/static COMPONENT libraries)
|
||||
+
|
||||
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/cuew.h
|
||||
+ DESTINATION include/)
|
||||
\ No newline at end of file
|
||||
--- src/cuew.c 2016-04-01 13:41:43 -0600
|
||||
+++ src/cuew.c 2016-04-01 13:41:11 -0600
|
||||
@@ -15,7 +15,9 @@
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
+#if _MSC_VER < 1900
|
||||
# define snprintf _snprintf
|
||||
+#endif
|
||||
# define popen _popen
|
||||
# define pclose _pclose
|
||||
# define _CRT_SECURE_NO_WARNINGS
|
@@ -1,11 +0,0 @@
|
||||
--- _msvccompiler.py.orig 2017-01-17 00:57:48 -0700
|
||||
+++ _msvccompiler.py 2017-05-20 09:47:26 -0600
|
||||
@@ -237,7 +237,7 @@
|
||||
ldflags.extend(('/nodefaultlib:libucrt.lib', 'ucrt.lib'))
|
||||
|
||||
ldflags_debug = [
|
||||
- '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL'
|
||||
+ '/nologo', '/INCREMENTAL:NO', '/LTCG'
|
||||
]
|
||||
|
||||
self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1']
|
@@ -1,32 +0,0 @@
|
||||
--- libavutil/common.h 2016-02-14 19:29:42 -0700
|
||||
+++ libavutil/common.h 2016-03-30 09:50:29 -0600
|
||||
@@ -99,6 +99,11 @@
|
||||
#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
|
||||
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
+//msvc helper
|
||||
+#ifdef _MSC_VER
|
||||
+#define inline __inline
|
||||
+#endif
|
||||
+
|
||||
/* misc math functions */
|
||||
|
||||
#ifdef HAVE_AV_CONFIG_H
|
||||
--- configure 2016-11-26 03:12:05.000000000 +0100
|
||||
+++ configure 2017-04-05 03:24:35.000000000 +0200
|
||||
@@ -1899,7 +1899,6 @@
|
||||
access
|
||||
aligned_malloc
|
||||
arc4random
|
||||
- clock_gettime
|
||||
closesocket
|
||||
CommandLineToArgvW
|
||||
CoTaskMemFree
|
||||
@@ -5494,7 +5493,6 @@
|
||||
|
||||
check_func access
|
||||
check_func_headers stdlib.h arc4random
|
||||
-check_func_headers time.h clock_gettime || { check_func_headers time.h clock_gettime -lrt && add_extralibs -lrt && LIBRT="-lrt"; }
|
||||
check_func fcntl
|
||||
check_func fork
|
||||
check_func gethrtime
|
@@ -1,25 +0,0 @@
|
||||
--- config.h.in 2014-03-04 11:44:58 -0700
|
||||
+++ config.h.in 2016-03-30 11:42:49 -0600
|
||||
@@ -142,9 +142,6 @@
|
||||
/* Define to 1 if you have the `gethrtime' function. */
|
||||
#undef HAVE_GETHRTIME
|
||||
|
||||
-/* Define to 1 if you have the `gettimeofday' function. */
|
||||
-#undef HAVE_GETTIMEOFDAY
|
||||
-
|
||||
/* Define to 1 if hrtime_t is defined in <sys/time.h> */
|
||||
#undef HAVE_HRTIME_T
|
||||
|
||||
--- kernel/assert.c 2014-03-04 11:41:03 -0700
|
||||
+++ kernel/assert.c 2016-04-01 09:41:05 -0600
|
||||
@@ -24,8 +24,10 @@
|
||||
|
||||
void X(assertion_failed)(const char *s, int line, const char *file)
|
||||
{
|
||||
+#if 0
|
||||
fflush(stdout);
|
||||
fprintf(stderr, "fftw: %s:%d: assertion failed: %s\n", file, line, s);
|
||||
+#endif
|
||||
#ifdef HAVE_ABORT
|
||||
abort();
|
||||
#else
|
@@ -1,11 +0,0 @@
|
||||
--- UserMacros.cmake
|
||||
+++ UserMacros.cmake
|
||||
@@ -16,6 +16,8 @@
|
||||
if (BUILD_USER_DEFINED_LIBS)
|
||||
MACRO_USER_DEFINED_LIBS ()
|
||||
endif (BUILD_USER_DEFINED_LIBS)
|
||||
+
|
||||
+include(Config/cmake/usermacros/windows_mt.cmake)
|
||||
#-----------------------------------------------------------------------------
|
||||
#------------------- E X A M P L E E N D -----------------------------------
|
||||
#-----------------------------------------------------------------------------
|
@@ -1,15 +0,0 @@
|
||||
--- hidapi/hidapi.h 2011-10-25 20:58:16 -0600
|
||||
+++ hidapi/hidapi.h 2016-11-01 12:05:58 -0600
|
||||
@@ -30,7 +30,11 @@
|
||||
#include <wchar.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
- #define HID_API_EXPORT __declspec(dllexport)
|
||||
+ #ifdef HID_API_STATIC
|
||||
+ #define HID_API_EXPORT
|
||||
+ #else
|
||||
+ #define HID_API_EXPORT __declspec(dllexport)
|
||||
+ #endif
|
||||
#define HID_API_CALL
|
||||
#else
|
||||
#define HID_API_EXPORT /**< API export macro */
|
@@ -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,10 +0,0 @@
|
||||
--- frontend/main.c 2008-09-22 11:55:09 -0600
|
||||
+++ frontend/main.c 2016-04-06 15:20:36 -0600
|
||||
@@ -31,7 +31,6 @@
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
-#define off_t __int64
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
@@ -1,111 +0,0 @@
|
||||
Index: lib/Target/X86/X86ISelLowering.cpp
|
||||
===================================================================
|
||||
--- lib/Target/X86/X86ISelLowering.cpp 2014-04-11 23:04:44.000000000 +0200
|
||||
+++ lib/Target/X86/X86ISelLowering.cpp (working copy)
|
||||
@@ -15493,12 +15493,36 @@
|
||||
// non-trivial part is impdef of ESP.
|
||||
|
||||
if (Subtarget->isTargetWin64()) {
|
||||
+ const char *StackProbeSymbol =
|
||||
+ Subtarget->isTargetCygMing() ? "___chkstk" : "__chkstk";
|
||||
+
|
||||
+ MachineInstrBuilder MIB;
|
||||
+
|
||||
+ if (getTargetMachine().getCodeModel() == CodeModel::Large) {
|
||||
+ // For large code model we need to do indirect call to __chkstk.
|
||||
+
|
||||
+ // R11 will be used to contain the address of __chkstk.
|
||||
+ // R11 is a volotiale register and assumed to be destoyed by the callee,
|
||||
+ // so there is no need to save and restore it.
|
||||
+ BuildMI(*BB, MI, DL, TII->get(X86::MOV64ri), X86::R11)
|
||||
+ .addExternalSymbol(StackProbeSymbol);
|
||||
+ // Create a call to __chkstk function which address contained in R11.
|
||||
+ MIB = BuildMI(*BB, MI, DL, TII->get(X86::CALL64r))
|
||||
+ .addReg(X86::R11, RegState::Kill);
|
||||
+
|
||||
+ } else {
|
||||
+
|
||||
+ // For non-large code model we can do direct call to __chkstk.
|
||||
+
|
||||
+ MIB = BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA))
|
||||
+ .addExternalSymbol(StackProbeSymbol);
|
||||
+ }
|
||||
+
|
||||
if (Subtarget->isTargetCygMing()) {
|
||||
// ___chkstk(Mingw64):
|
||||
// Clobbers R10, R11, RAX and EFLAGS.
|
||||
// Updates RSP.
|
||||
- BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA))
|
||||
- .addExternalSymbol("___chkstk")
|
||||
+ MIB
|
||||
.addReg(X86::RAX, RegState::Implicit)
|
||||
.addReg(X86::RSP, RegState::Implicit)
|
||||
.addReg(X86::RAX, RegState::Define | RegState::Implicit)
|
||||
@@ -15507,8 +15531,7 @@
|
||||
} else {
|
||||
// __chkstk(MSVCRT): does not update stack pointer.
|
||||
// Clobbers R10, R11 and EFLAGS.
|
||||
- BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA))
|
||||
- .addExternalSymbol("__chkstk")
|
||||
+ MIB
|
||||
.addReg(X86::RAX, RegState::Implicit)
|
||||
.addReg(X86::EFLAGS, RegState::Define | RegState::Implicit);
|
||||
// RAX has the offset to be subtracted from RSP.
|
||||
Index: lib/Target/X86/X86FrameLowering.cpp
|
||||
===================================================================
|
||||
--- lib/Target/X86/X86FrameLowering.cpp 2013-10-24 01:37:01.000000000 +0200
|
||||
+++ lib/Target/X86/X86FrameLowering.cpp (working copy)
|
||||
@@ -635,25 +635,49 @@
|
||||
.addReg(X86::EAX, RegState::Kill)
|
||||
.setMIFlag(MachineInstr::FrameSetup);
|
||||
}
|
||||
+
|
||||
+ MachineInstrBuilder MIB;
|
||||
|
||||
if (Is64Bit) {
|
||||
+
|
||||
// Handle the 64-bit Windows ABI case where we need to call __chkstk.
|
||||
// Function prologue is responsible for adjusting the stack pointer.
|
||||
BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64ri), X86::RAX)
|
||||
.addImm(NumBytes)
|
||||
.setMIFlag(MachineInstr::FrameSetup);
|
||||
+
|
||||
+ if (TM.getCodeModel() == CodeModel::Large) {
|
||||
+ // For large code model we need to do indirect call to __chkstk.
|
||||
+
|
||||
+
|
||||
+ // R11 will be used to contain the address of __chkstk.
|
||||
+ // R11 is a volotiale register and assumed to be destoyed by the callee,
|
||||
+ // so there is no need to save and restore it.
|
||||
+ BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64ri), X86::R11)
|
||||
+ .addExternalSymbol(StackProbeSymbol);
|
||||
+ // Create a call to __chkstk function which address contained in R11.
|
||||
+ MIB = BuildMI(MBB, MBBI, DL, TII.get(X86::CALL64r))
|
||||
+ .addReg(X86::R11, RegState::Kill);
|
||||
+ } else {
|
||||
+
|
||||
+ // For non-large code model we can do direct call to __chkstk.
|
||||
+
|
||||
+ MIB = BuildMI(MBB, MBBI, DL, TII.get(X86::W64ALLOCA))
|
||||
+ .addExternalSymbol(StackProbeSymbol);
|
||||
+ }
|
||||
} else {
|
||||
// Allocate NumBytes-4 bytes on stack in case of isEAXAlive.
|
||||
// We'll also use 4 already allocated bytes for EAX.
|
||||
BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32ri), X86::EAX)
|
||||
.addImm(isEAXAlive ? NumBytes - 4 : NumBytes)
|
||||
.setMIFlag(MachineInstr::FrameSetup);
|
||||
+
|
||||
+ MIB = BuildMI(MBB, MBBI, DL, TII.get(X86::CALLpcrel32))
|
||||
+ .addExternalSymbol(StackProbeSymbol);
|
||||
}
|
||||
|
||||
- BuildMI(MBB, MBBI, DL,
|
||||
- TII.get(Is64Bit ? X86::W64ALLOCA : X86::CALLpcrel32))
|
||||
- .addExternalSymbol(StackProbeSymbol)
|
||||
- .addReg(StackPtr, RegState::Define | RegState::Implicit)
|
||||
+
|
||||
+ MIB.addReg(StackPtr, RegState::Define | RegState::Implicit)
|
||||
.addReg(X86::EFLAGS, RegState::Define | RegState::Implicit)
|
||||
.setMIFlag(MachineInstr::FrameSetup);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user