diff --git a/meson.build b/meson.build index 7aa30f3..11a1487 100644 --- a/meson.build +++ b/meson.build @@ -4,8 +4,13 @@ without_adapter = get_option('without_adapter') without_provider = get_option('without_provider') without_tests = get_option('without_tests') or without_adapter or without_provider +libwebsockets_dep = dependency('libwebsockets', version: '>=4.0.13', required: false) +if not libwebsockets_dep.found() + cmake = import('cmake') + libwebsockets = cmake.subproject('libwebsockets') + libwebsockets_dep = libwebsockets.dependency('websockets_shared') +endif -libwebsockets_dep = dependency('libwebsockets', version: '>=4.0.1') jansson_dep = dependency('jansson', version: '>=2.11', fallback: ['jansson', 'jansson_dep']) pkg_config = import('pkgconfig') diff --git a/subprojects/libwebsockets.wrap b/subprojects/libwebsockets.wrap new file mode 100644 index 0000000..da72f53 --- /dev/null +++ b/subprojects/libwebsockets.wrap @@ -0,0 +1,6 @@ +[wrap-file] +directory = libwebsockets-4.0.13 + +source_url = https://github.com/warmcat/libwebsockets/archive/v4.0.13.zip +source_filename = v4.0.13.zip +source_hash = 0914ea3fdec496daf6b6a5c00f7ba1b52eb8cc3d55b66685df92920b232fd7a5