Skip to content

Commit 43acb9c

Browse files
taliseinkjellahl
authored andcommitted
meson: Clear CMAKE C FLAGS for subproject
1 parent 1c972d3 commit 43acb9c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

meson.build

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,22 @@ if not xml2_dep.found()
150150
thread_dep = dependency('threads', required: false)
151151
zlib_dep = dependency('zlib', required: false)
152152
winsock_dep = cpp_compiler.find_library('ws2_32', required: false)
153+
cmake_build_type = get_option('buildtype')
154+
if get_option('buildtype') == 'debugoptimized'
155+
cmake_build_type = 'RelWithDebInfo'
156+
elif get_option('buildtype') == 'minsize'
157+
cmake_build_type = 'MinSizeRel'
158+
elif get_option('buildtype') == 'plain'
159+
cmake_build_type = ''
160+
endif
153161
opt_var.add_cmake_defines({'BUILD_SHARED_LIBS': build_shared,
162+
'CMAKE_BUILD_TYPE': cmake_build_type,
163+
'CMAKE_MSVC_RUNTIME_LIBRARY': '',
164+
'CMAKE_C_FLAGS_INIT': '',
165+
'CMAKE_C_FLAGS_DEBUG': '',
166+
'CMAKE_C_FLAGS_RELEASE': '',
167+
'CMAKE_C_FLAGS_RELWITHDEBINFO': '',
168+
'CMAKE_C_FLAGS_MINSIZEREL': '',
154169
'LIBXML2_WITH_HTTP': host_machine.system() != 'windows' or winsock_dep.found(),
155170
'LIBXML2_WITH_ICONV': iconv_dep.found(),
156171
'LIBXML2_WITH_ICU': icu_i18n_dep.found() and icu_uc_dep.found(),

0 commit comments

Comments
 (0)