Skip to content

Commit 64dffa7

Browse files
move all Conan files from the VCMI repo
1 parent dc54d50 commit 64dffa7

File tree

20 files changed

+529
-0
lines changed

20 files changed

+529
-0
lines changed

conan_profiles/android-32

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
include(base/android)
2+
3+
[settings]
4+
arch=armv7
5+
os.api_level=19
6+
7+
[conf]
8+
# remove after switching to API level >= 24
9+
{% set file_funcs_macros = ['fseeko=fseek', 'ftello=ftell'] %}
10+
flac/*:tools.build:defines={{ file_funcs_macros }}
11+
luajit/*:tools.build:defines={{ file_funcs_macros }}
12+
opusfile/*:tools.build:defines={{ file_funcs_macros }}

conan_profiles/android-32-ndk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include(android-32)
2+
include(base/android-ndk)

conan_profiles/android-64

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include(base/android)
2+
3+
[settings]
4+
arch=armv8
5+
os.api_level=21

conan_profiles/android-64-ndk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include(android-64)
2+
include(base/android-ndk)

conan_profiles/base/android

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{% import 'vars.jinja' as vars %}
2+
3+
include(common)
4+
5+
[settings]
6+
compiler=clang
7+
compiler.cppstd={{ vars.cppstd }}
8+
compiler.libcxx=c++_shared
9+
compiler.version=14
10+
os=Android
11+
12+
[replace_requires]
13+
zlib/*: zlib/[*]@system
14+
15+
[conf]
16+
# https://github.com/conan-io/conan-center-index/issues/25342
17+
# https://github.com/conan-io/conan/issues/16468#issuecomment-2175877245
18+
tools.meson.mesontoolchain:extra_machine_files={{ [os.path.join(profile_dir, "meson_workaround.txt")] }}
19+
20+
[options]
21+
# TODO https://github.com/conan-io/conan-center-index/issues/26020
22+
# freetype/*:shared=True
23+
sdl/*:shared=False
24+
sdl_image/*:shared=False
25+
sdl_mixer/*:shared=False
26+
sdl_ttf/*:shared=False
27+
28+
qt/*:opengl=es2
29+
qt/*:qtandroidextras=True
30+
qt/*:with_freetype=True

conan_profiles/base/android-ndk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tool_requires]
2+
android-ndk/r25c

conan_profiles/base/apple

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% import 'vars.jinja' as vars %}
2+
3+
include(common)
4+
5+
[settings]
6+
compiler=apple-clang
7+
compiler.cppstd={{ vars.cppstd }}
8+
compiler.libcxx=libc++
9+
compiler.version=16
10+
11+
[replace_requires]
12+
bzip2/*: bzip2/[*]@system
13+
libiconv/*: libiconv/[*]@system
14+
sqlite3/*: sqlite3/[*]@system
15+
zlib/*: zlib/[*]@system
16+
17+
[conf]
18+
tools.apple:enable_bitcode=False
19+
20+
[options]
21+
qt/*:openssl=False
22+
sdl_image/*:imageio=True

conan_profiles/base/common

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
[settings]
2+
build_type=Release
3+
4+
[platform_tool_requires]
5+
cmake/3.31.6
6+
ninja/1.12.1
7+
8+
[replace_requires]
9+
# TODO: remove after https://github.com/conan-io/conan-center-index/pull/27125 is merged
10+
# Qt 5 depends on 0.4.8, but it doesn't build for iOS
11+
md4c/0.4.8: md4c/0.5.2
12+
13+
[conf]
14+
tools.cmake.cmaketoolchain:generator=Ninja
15+
16+
[options]
17+
# shared (dynamic) libs
18+
boost/*:shared=True
19+
bzip2/*:shared=True
20+
libiconv/*:shared=True
21+
libpng/*:shared=True
22+
minizip/*:shared=True
23+
ogg/*:shared=True
24+
opus/*:shared=True
25+
qt/*:shared=True
26+
sdl/*:shared=True
27+
sdl_image/*:shared=True
28+
sdl_mixer/*:shared=True
29+
sdl_ttf/*:shared=True
30+
xz_utils/*:shared=True
31+
zlib/*:shared=True
32+
33+
# Boost
34+
# we need only the following parts:
35+
# date_time filesystem iostreams locale program_options system
36+
# some other parts are also enabled because they're dependents
37+
# see e.g. conan-center-index/recipes/boost/all/dependencies
38+
boost/*:without_context=True
39+
boost/*:without_contract=True
40+
boost/*:without_coroutine=True
41+
boost/*:without_fiber=True
42+
boost/*:without_graph=True
43+
boost/*:without_graph_parallel=True
44+
boost/*:without_json=True
45+
boost/*:without_log=True
46+
boost/*:without_math=True
47+
boost/*:without_mpi=True
48+
boost/*:without_nowide=True
49+
boost/*:without_process=True
50+
boost/*:without_python=True
51+
boost/*:without_serialization=True
52+
boost/*:without_stacktrace=True
53+
boost/*:without_test=True
54+
boost/*:without_timer=True
55+
boost/*:without_type_erasure=True
56+
boost/*:without_wave=True
57+
boost/*:without_url=True
58+
59+
# FFmpeg
60+
ffmpeg/*:avcodec=True
61+
ffmpeg/*:avdevice=False
62+
ffmpeg/*:avfilter=False
63+
ffmpeg/*:avformat=True
64+
ffmpeg/*:postproc=False
65+
# for resampling of audio in 'planar' formats
66+
ffmpeg/*:swresample=True
67+
# for video scaling
68+
ffmpeg/*:swscale=True
69+
70+
ffmpeg/*:disable_all_bitstream_filters=True
71+
ffmpeg/*:disable_all_decoders=True
72+
ffmpeg/*:disable_all_demuxers=True
73+
ffmpeg/*:disable_all_encoders=True
74+
ffmpeg/*:disable_all_filters=True
75+
ffmpeg/*:disable_all_hardware_accelerators=True
76+
ffmpeg/*:disable_all_muxers=True
77+
ffmpeg/*:disable_all_parsers=True
78+
ffmpeg/*:disable_all_protocols=True
79+
80+
ffmpeg/*:with_asm=False
81+
ffmpeg/*:with_freetype=False
82+
ffmpeg/*:with_libaom=False
83+
ffmpeg/*:with_libdav1d=False
84+
ffmpeg/*:with_libfdk_aac=False
85+
ffmpeg/*:with_libiconv=False
86+
ffmpeg/*:with_libmp3lame=False
87+
ffmpeg/*:with_libsvtav1=False
88+
ffmpeg/*:with_libvpx=False
89+
ffmpeg/*:with_libwebp=False
90+
ffmpeg/*:with_libx264=False
91+
ffmpeg/*:with_libx265=False
92+
ffmpeg/*:with_lzma=True
93+
ffmpeg/*:with_openh264=False
94+
ffmpeg/*:with_openjpeg=False
95+
ffmpeg/*:with_programs=False
96+
ffmpeg/*:with_sdl=False
97+
ffmpeg/*:with_ssl=False
98+
ffmpeg/*:with_vorbis=False
99+
100+
# We want following options supported:
101+
# H3:SoD - .bik and .smk
102+
# H3:HD - ogg container / theora video / vorbis sound (not supported by VCMI at the moment, but might be supported in future)
103+
# and for mods - webm container / vp8 or vp9 video / opus sound
104+
# TODO: add av1 support for mods (requires enabling libdav1d)
105+
{% set ffDecoders = [
106+
'bink',
107+
'binkaudio_dct',
108+
'binkaudio_rdft',
109+
'opus',
110+
'smackaud',
111+
'smacker',
112+
'theora',
113+
'vorbis',
114+
'vp8',
115+
'vp9',
116+
] %}
117+
{% set ffDemuxers = [
118+
'bink',
119+
'binka',
120+
'ogg',
121+
'smacker',
122+
'webm_dash_manifest',
123+
] %}
124+
{% set ffParsers = [
125+
'opus',
126+
'vorbis',
127+
'vp8',
128+
'vp9',
129+
'webp',
130+
] %}
131+
{% set ffProtocols = [
132+
'file',
133+
] %}
134+
ffmpeg/*:enable_decoders={{ ffDecoders|join(',') }}
135+
ffmpeg/*:enable_demuxers={{ ffDemuxers|join(',') }}
136+
ffmpeg/*:enable_parsers={{ ffParsers|join(',') }}
137+
ffmpeg/*:enable_protocols={{ ffProtocols|join(',') }}
138+
139+
# optionally, for testing - enable ffplay/ffprobe binaries:
140+
# ffmpeg/*:avfilter=True
141+
# ffmpeg/*:enable_filters=aresample,scale
142+
# ffmpeg/*:with_programs=True
143+
# ffmpeg/*:with_sdl=True
144+
145+
# oneTBB
146+
onetbb/*:tbbbind=False
147+
onetbb/*:tbbmalloc=False
148+
onetbb/*:tbbproxy=False
149+
150+
# Qt
151+
# xpm format is required for Drag'n'Drop support
152+
# we need only win/macdeployqt
153+
# TODO: disabling these doesn't disable generation of CMake targets
154+
# TODO: in Qt 6.3 it's a part of qtbase
155+
# '-no-feature-assistant',
156+
# '-no-feature-designer',
157+
# '-no-feature-distancefieldgenerator',
158+
# '-no-feature-kmap2qmap',
159+
# '-no-feature-linguist',
160+
# '-no-feature-makeqpf',
161+
# '-no-feature-pixeltool',
162+
# '-no-feature-qdbus',
163+
# '-no-feature-qev',
164+
# '-no-feature-qtattributionsscanner',
165+
# '-no-feature-qtdiag',
166+
# '-no-feature-qtpaths',
167+
# '-no-feature-qtplugininfo',
168+
{% set qtConfig = [
169+
'-no-gif',
170+
'-no-ico',
171+
172+
'-no-feature-imageformat_bmp',
173+
'-no-feature-imageformat_jpeg',
174+
'-no-feature-imageformat_ppm',
175+
'-no-feature-imageformat_xbm',
176+
] %}
177+
qt/*:config={{ qtConfig|join(' ') }}
178+
qt/*:essential_modules=False
179+
qt/*:openssl=True
180+
qt/*:qttools=True
181+
qt/*:with_freetype=False
182+
qt/*:with_libjpeg=False
183+
qt/*:with_mysql=False
184+
qt/*:with_odbc=False
185+
qt/*:with_openal=False
186+
qt/*:with_pq=False
187+
188+
# SDL
189+
sdl/*:iconv=True
190+
sdl/*:sdl2main=True
191+
sdl/*:vulkan=False
192+
193+
# SDL_image
194+
# bmp, png are the only ones that needs to be supported
195+
# dds support may be useful for HD edition, but not supported by sdl_image at the moment
196+
sdl_image/*:gif=False
197+
sdl_image/*:lbm=False
198+
sdl_image/*:pcx=False
199+
sdl_image/*:pnm=False
200+
sdl_image/*:qoi=False
201+
sdl_image/*:svg=False
202+
sdl_image/*:tga=False
203+
sdl_image/*:with_libjpeg=False
204+
sdl_image/*:with_libtiff=False
205+
sdl_image/*:with_libwebp=False
206+
sdl_image/*:xcf=False
207+
sdl_image/*:xpm=False
208+
sdl_image/*:xv=False
209+
210+
# SDL_mixer
211+
# mp3, ogg and wav are the only ones that needs to be supported, flac is a bonus
212+
sdl_mixer/*:mad=False
213+
sdl_mixer/*:mikmod=False
214+
sdl_mixer/*:modplug=False
215+
sdl_mixer/*:nativemidi=False
216+
sdl_mixer/*:tinymidi=False
217+
218+
# transitive deps, stuff that's not needed
219+
# doesn't link to bzip2 & zlib from "system" recipes
220+
pcre2/*:build_pcre2grep=False
221+
sqlite3/*:build_executable=False
222+
opusfile/*:http=False
223+
zstd/*:build_programs=False

conan_profiles/base/ios

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
include(apple)
2+
3+
[settings]
4+
os=iOS
5+
os.sdk=iphoneos
6+
7+
[options]
8+
qt/*:shared=False
9+
sdl/*:shared=False
10+
sdl_image/*:shared=False
11+
sdl_mixer/*:shared=False
12+
sdl_ttf/*:shared=False
13+
14+
qt/*:opengl=es2
15+
sdl/*:sdl2main=False

conan_profiles/base/macos

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include(apple)
2+
3+
[settings]
4+
os=Macos

0 commit comments

Comments
 (0)