Skip to content

Commit fe7fe15

Browse files
authored
build(meson): fix new build option names (#2208)
This is a follow-up to commit 4ff7a1c, which introduced new simplified build options and deprecated the old ones. I forgot to also change the various get_option() calls, effectively rendering the new option names useless, as they would not get honoured.
1 parent fbd6ce7 commit fe7fe15

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

meson.build

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,28 @@ endif
3939
deps = [dependency('threads')]
4040
args = []
4141

42-
openssl_dep = dependency('openssl', version: '>=3.0.0', required: get_option('cpp-httplib_openssl'))
42+
openssl_dep = dependency('openssl', version: '>=3.0.0', required: get_option('openssl'))
4343
if openssl_dep.found()
4444
deps += openssl_dep
4545
args += '-DCPPHTTPLIB_OPENSSL_SUPPORT'
4646
if host_machine.system() == 'darwin'
47-
macosx_keychain_dep = dependency('appleframeworks', modules: ['CoreFoundation', 'Security'], required: get_option('cpp-httplib_macosx_keychain'))
47+
macosx_keychain_dep = dependency('appleframeworks', modules: ['CoreFoundation', 'Security'], required: get_option('macosx_keychain'))
4848
if macosx_keychain_dep.found()
4949
deps += macosx_keychain_dep
5050
args += '-DCPPHTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN'
5151
endif
5252
endif
5353
endif
5454

55-
zlib_dep = dependency('zlib', required: get_option('cpp-httplib_zlib'))
55+
zlib_dep = dependency('zlib', required: get_option('zlib'))
5656
if zlib_dep.found()
5757
deps += zlib_dep
5858
args += '-DCPPHTTPLIB_ZLIB_SUPPORT'
5959
endif
6060

61-
brotli_deps = [dependency('libbrotlicommon', required: get_option('cpp-httplib_brotli'))]
62-
brotli_deps += dependency('libbrotlidec', required: get_option('cpp-httplib_brotli'))
63-
brotli_deps += dependency('libbrotlienc', required: get_option('cpp-httplib_brotli'))
61+
brotli_deps = [dependency('libbrotlicommon', required: get_option('brotli'))]
62+
brotli_deps += dependency('libbrotlidec', required: get_option('brotli'))
63+
brotli_deps += dependency('libbrotlienc', required: get_option('brotli'))
6464

6565
brotli_found_all = true
6666
foreach brotli_dep : brotli_deps
@@ -74,7 +74,7 @@ if brotli_found_all
7474
args += '-DCPPHTTPLIB_BROTLI_SUPPORT'
7575
endif
7676

77-
async_ns_opt = get_option('cpp-httplib_non_blocking_getaddrinfo')
77+
async_ns_opt = get_option('non_blocking_getaddrinfo')
7878

7979
if host_machine.system() == 'windows'
8080
async_ns_dep = cxx.find_library('ws2_32', required: async_ns_opt)
@@ -91,7 +91,7 @@ endif
9191

9292
cpp_httplib_dep = dependency('', required: false)
9393

94-
if get_option('cpp-httplib_compile')
94+
if get_option('compile')
9595
python3 = find_program('python3')
9696

9797
httplib_ch = custom_target(
@@ -135,6 +135,6 @@ endif
135135

136136
meson.override_dependency('cpp-httplib', cpp_httplib_dep)
137137

138-
if get_option('cpp-httplib_test')
138+
if get_option('test')
139139
subdir('test')
140140
endif

0 commit comments

Comments
 (0)