Set Windows API version in Meson

This commit is contained in:
Brian McKenna 2024-11-05 23:36:02 +11:00
parent b4c05a18b4
commit 9dca7aeece
16 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,6 @@
if host_machine.system() == 'windows'
# https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170
# #define _WIN32_WINNT_WIN8 0x0602
# We currently don't use any API which requires higher than this.
add_project_arguments([ '-D_WIN32_WINNT=0x0602' ], language: 'cpp')
endif

View file

@ -75,6 +75,7 @@ headers = [config_h] + files(
headers += files('nix_api_expr_internal.h') headers += files('nix_api_expr_internal.h')
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
this_library = library( this_library = library(
'nixexprc', 'nixexprc',

View file

@ -56,6 +56,7 @@ headers = files(
) )
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
this_library = library( this_library = library(
'nix-expr-test-support', 'nix-expr-test-support',

View file

@ -28,6 +28,7 @@ subdir('build-utils-meson/subprojects')
subdir('build-utils-meson/threads') subdir('build-utils-meson/threads')
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
rapidcheck = dependency('rapidcheck') rapidcheck = dependency('rapidcheck')
deps_private += rapidcheck deps_private += rapidcheck

View file

@ -27,6 +27,7 @@ subdir('build-utils-meson/subprojects')
subdir('build-utils-meson/threads') subdir('build-utils-meson/threads')
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
rapidcheck = dependency('rapidcheck') rapidcheck = dependency('rapidcheck')
deps_private += rapidcheck deps_private += rapidcheck

View file

@ -27,6 +27,7 @@ subdir('build-utils-meson/subprojects')
subdir('build-utils-meson/threads') subdir('build-utils-meson/threads')
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
rapidcheck = dependency('rapidcheck') rapidcheck = dependency('rapidcheck')
deps_private += rapidcheck deps_private += rapidcheck

View file

@ -68,6 +68,7 @@ headers = [config_h] + files(
) )
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
this_library = library( this_library = library(
'nixmainc', 'nixmainc',

View file

@ -67,6 +67,7 @@ headers = [config_h] + files(
headers += files('nix_api_store_internal.h') headers += files('nix_api_store_internal.h')
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
this_library = library( this_library = library(
'nixstorec', 'nixstorec',

View file

@ -58,6 +58,7 @@ headers = files(
) )
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
this_library = library( this_library = library(
'nix-store-test-support', 'nix-store-test-support',

View file

@ -28,6 +28,7 @@ subdir('build-utils-meson/subprojects')
subdir('build-utils-meson/threads') subdir('build-utils-meson/threads')
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
sqlite = dependency('sqlite3', 'sqlite', version : '>=3.6.19') sqlite = dependency('sqlite3', 'sqlite', version : '>=3.6.19')
deps_private += sqlite deps_private += sqlite

View file

@ -410,6 +410,7 @@ foreach name, value : cpp_str_defines
endforeach endforeach
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
this_library = library( this_library = library(
'nixstore', 'nixstore',

View file

@ -63,6 +63,7 @@ headers = [config_h] + files(
headers += files('nix_api_util_internal.h') headers += files('nix_api_util_internal.h')
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
this_library = library( this_library = library(
'nixutilc', 'nixutilc',

View file

@ -53,6 +53,7 @@ headers = files(
) )
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
this_library = library( this_library = library(
'nix-util-test-support', 'nix-util-test-support',

View file

@ -28,6 +28,7 @@ subdir('build-utils-meson/subprojects')
subdir('build-utils-meson/threads') subdir('build-utils-meson/threads')
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
rapidcheck = dependency('rapidcheck') rapidcheck = dependency('rapidcheck')
deps_private += rapidcheck deps_private += rapidcheck

View file

@ -265,6 +265,7 @@ else
endif endif
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
this_library = library( this_library = library(
'nixutil', 'nixutil',

View file

@ -35,6 +35,7 @@ subdir('build-utils-meson/subprojects')
subdir('build-utils-meson/threads') subdir('build-utils-meson/threads')
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
configdata = configuration_data() configdata = configuration_data()