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')
subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
this_library = library(
'nixexprc',

View File

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

View File

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

View File

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

View File

@ -27,6 +27,7 @@ subdir('build-utils-meson/subprojects')
subdir('build-utils-meson/threads')
subdir('build-utils-meson/export-all-symbols')
subdir('build-utils-meson/windows-version')
rapidcheck = dependency('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/windows-version')
this_library = library(
'nixmainc',

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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