@@ -6,19 +6,22 @@ qt6_deps = dependency('qt6',
66 include_type : ' preserve' )
77
88# check system: pkg-config --cflags --libs gl
9- ogl_deps = dependency (' opengl' , required : true )
9+ ogl_deps = dependency (' opengl' , required : true )
10+
11+ # pkg-config --cflags --libs gl.
12+ if host_machine .system() == ' darwin'
13+ sqlite_dep = dependency (' sqlite3' , required : true )
14+ else
15+ # no static or it will link to static system
16+ sqlite_dep = dependency (' sqlite3' , static : false , required : true )
17+ endif
1018
11- # pkg-config --cflags --libs gl
12- sqlite_dep = dependency (' sqlite3' , required : true )
1319
1420# pkg-config --modversion expat
15- expat_dep = dependency (' expat' , required : true )
21+ expat_dep = dependency (' expat' , required : true )
1622
1723# pkg-config --cflags --libs zlib
18- zlib_dep = dependency (' zlib' , static : false , required : true ) # Use shared libz.so instead of libz.a
19-
20- # sqlite
21- sqlite_dep = dependency (' sqlite3' , required : true )
24+ zlib_dep = dependency (' zlib' , static : false , required : true ) # Use shared libz.so instead of libz.a
2225
2326# clhep: pkg-config
2427clhep_deps = dependency (' clhep' ,
@@ -56,36 +59,36 @@ cmake = import('cmake')
5659
5760cmake_opts = cmake.subproject_options()
5861cmake_opts.add_cmake_defines({
59- ' BUILD_SHARED_LIBS' : false , # or false if you want static assimp
60- ' BUILD_STATIC_LIBS' : true ,
61- ' ZLIB_USE_STATIC_LIBS' : false , # prefer shared zlib
62- ' CMAKE_POSITION_INDEPENDENT_CODE' : true ,
63- ' CMAKE_C_STANDARD' : 17 , # avoid C23 warnings in bundled zlib if you ever enable it
64- ' CMAKE_POLICY_VERSION_MINIMUM' : ' 4.0' ,
65- })
62+ ' BUILD_SHARED_LIBS' : false , # or false if you want static assimp
63+ ' BUILD_STATIC_LIBS' : true ,
64+ ' ZLIB_USE_STATIC_LIBS' : false , # prefer shared zlib
65+ ' CMAKE_POSITION_INDEPENDENT_CODE' : true ,
66+ ' CMAKE_C_STANDARD' : 17 , # avoid C23 warnings in bundled zlib if you ever enable it
67+ ' CMAKE_POLICY_VERSION_MINIMUM' : ' 4.0' ,
68+ })
6669
6770if host_machine .system() == ' darwin'
6871 # there's a macro collision in Assimp’s bundled zlib on macOS.
6972 # Using system zlib is fine on macos
7073 cmake_opts.add_cmake_defines({
71- ' ASSIMP_BUILD_ZLIB' : false ,
72- })
74+ ' ASSIMP_BUILD_ZLIB' : false ,
75+ })
7376else
7477 # Ubuntu: zlib is not compiled with fPic on the system. Let Assimp compile it.
7578 cmake_opts.add_cmake_defines({
76- ' ASSIMP_BUILD_ZLIB' : true ,
77- })
79+ ' ASSIMP_BUILD_ZLIB' : true ,
80+ })
7881endif
7982
8083
8184cmake_opts.append_compile_args(' cpp' , ' -Wno-shadow' )
8285
8386# TODO: remove temp workaround for _LIBCPP_ENABLE_ASSERTIONS deprecation
8487cmake_opts.append_compile_args(' cpp' ,
85- ' -fPIC' ,
86- ' -Wno-shadow' ,
87- ' -U_LIBCPP_ENABLE_ASSERTIONS' ,
88- ' -D_LIBCPP_HARDENING_MODE_DEBUG=true' ,
88+ ' -fPIC' ,
89+ ' -Wno-shadow' ,
90+ ' -U_LIBCPP_ENABLE_ASSERTIONS' ,
91+ ' -D_LIBCPP_HARDENING_MODE_DEBUG=true' ,
8992)
9093
9194assimp_proj = cmake.subproject (' assimp' , options : cmake_opts)
0 commit comments