mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
misc: added libconfig as a subproject
This commit is contained in:
parent
f2e0885474
commit
165ec75f61
3 changed files with 23 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -72,3 +72,6 @@ doxygen/
|
|||
*.orig
|
||||
/tests/log
|
||||
/tests/testcases/__pycache__/
|
||||
|
||||
# Subproject files
|
||||
subprojects/libconfig
|
||||
|
|
|
@ -34,7 +34,22 @@ endforeach
|
|||
foreach i : required_xcb_packages
|
||||
base_deps += [dependency(i, version: '>=1.12.0', required: true)]
|
||||
endforeach
|
||||
base_deps += [dependency('libconfig', version: '>=1.7', required: true)]
|
||||
|
||||
libconfig_dep = dependency('libconfig', version: '>=1.7', required: false)
|
||||
|
||||
if not libconfig_dep.found()
|
||||
warning('Trying to clone and build libconfig as a subproject.')
|
||||
|
||||
cmake = import('cmake')
|
||||
sub_libconfig_opts = cmake.subproject_options()
|
||||
sub_libconfig_opts.add_cmake_defines({
|
||||
'BUILD_SHARED_LIBS': false,
|
||||
})
|
||||
sub_libconfig = cmake.subproject('libconfig', options: sub_libconfig_opts)
|
||||
base_deps += [sub_libconfig.dependency('config')]
|
||||
else
|
||||
base_deps += [libconfig_dep]
|
||||
endif
|
||||
|
||||
if not cc.has_header('uthash.h')
|
||||
error('Dependency uthash not found')
|
||||
|
|
4
subprojects/libconfig.wrap
Normal file
4
subprojects/libconfig.wrap
Normal file
|
@ -0,0 +1,4 @@
|
|||
[wrap-git]
|
||||
url = https://github.com/hyperrealm/libconfig
|
||||
revision = f9404f60a435aa06321f4ccd8357364dcb216d46
|
||||
depth = 1
|
Loading…
Reference in a new issue