Welcome to mirror list, hosted at ThFree Co, Russian Federation.

alembic.cmake « cmake « build_environment « build_files - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cf2cefa2e7aee495172d4294fda152ad4f80c793 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# ***** 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
)