@@ -150,7 +150,22 @@ if not xml2_dep.found()
150
150
thread_dep = dependency (' threads' , required : false )
151
151
zlib_dep = dependency (' zlib' , required : false )
152
152
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
153
161
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' : '' ,
154
169
' LIBXML2_WITH_HTTP' : host_machine .system() != ' windows' or winsock_dep.found(),
155
170
' LIBXML2_WITH_ICONV' : iconv_dep.found(),
156
171
' LIBXML2_WITH_ICU' : icu_i18n_dep.found() and icu_uc_dep.found(),
0 commit comments