mirror of
https://github.com/postgres/postgres.git
synced 2025-09-09 13:09:39 +03:00
meson: Add windows resource files
The generated resource files aren't exactly the same ones as the old buildsystems generate. Previously "InternalName" and "OriginalFileName" were mostly wrong / not set (despite being required), but that was hard to fix in at least the make build. Additionally, the meson build falls back to a "auto-generated" description when not set, and doesn't set it in a few cases - unlikely that anybody looks at these descriptions in detail. Author: Andres Freund <andres@anarazel.de> Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
This commit is contained in:
@@ -7,6 +7,12 @@ ecpg_compat_inc = [include_directories('.'), ecpg_inc, libpq_inc]
|
||||
ecpg_compat_c_args = ['-DSO_MAJOR_VERSION=3']
|
||||
export_file = custom_target('libecpg_compat.exports', kwargs: gen_export_kwargs)
|
||||
|
||||
if host_system == 'windows'
|
||||
ecpg_compat_so_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
|
||||
'--NAME', 'libecpg_compat',
|
||||
'--FILEDESC', 'ECPG compat - compatibility library for ECPG',])
|
||||
endif
|
||||
|
||||
# see src/interfaces/libpq/meson.build
|
||||
ecpg_compat_st = static_library('libecpg_compat',
|
||||
ecpg_compat_sources,
|
||||
|
@@ -16,6 +16,12 @@ ecpglib_inc = [include_directories('.'), ecpg_inc]
|
||||
ecpglib_c_args = ['-DSO_MAJOR_VERSION=6']
|
||||
export_file = custom_target('libecpg.exports', kwargs: gen_export_kwargs)
|
||||
|
||||
if host_system == 'windows'
|
||||
ecpglib_so_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
|
||||
'--NAME', 'libecpg',
|
||||
'--FILEDESC', 'ECPG - embedded SQL in C',])
|
||||
endif
|
||||
|
||||
# see src/interfaces/libpq/meson.build
|
||||
ecpglib_st = static_library('libecpg',
|
||||
ecpglib_sources,
|
||||
|
@@ -12,6 +12,12 @@ export_file = custom_target('libpgtypes.exports', kwargs: gen_export_kwargs)
|
||||
ecpg_pgtypes_inc = [include_directories('.'), ecpg_inc]
|
||||
ecpg_pgtypes_c_args = ['-DSO_MAJOR_VERSION=3']
|
||||
|
||||
if host_system == 'windows'
|
||||
ecpg_pgtypes_so_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
|
||||
'--NAME', 'pgtypes',
|
||||
'--FILEDESC', 'pgtypes - library for data type mapping',])
|
||||
endif
|
||||
|
||||
# see src/interfaces/libpq/meson.build
|
||||
ecpg_pgtypes_st = static_library('libpgtypes',
|
||||
ecpg_pgtypes_sources,
|
||||
|
@@ -93,6 +93,12 @@ ecpg_kwlist = custom_target('ecpg_kwlist_d.h',
|
||||
generated_sources += ecpg_kwlist
|
||||
ecpg_sources += ecpg_kwlist
|
||||
|
||||
if host_system == 'windows'
|
||||
ecpg_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
|
||||
'--NAME', 'ecpg',
|
||||
'--FILEDESC', 'ecpg - embedded SQL precompiler for C',])
|
||||
endif
|
||||
|
||||
ecpg_exe = executable('ecpg',
|
||||
ecpg_sources,
|
||||
include_directories: ['.', ecpg_inc, postgres_inc, libpq_inc],
|
||||
|
@@ -7,6 +7,11 @@ pg_regress_ecpg_sources = pg_regress_c + files(
|
||||
'pg_regress_ecpg.c',
|
||||
)
|
||||
|
||||
if host_system == 'windows'
|
||||
pg_regress_ecpg_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
|
||||
'--NAME', 'pg_regress_ecpg',])
|
||||
endif
|
||||
|
||||
pg_regress_ecpg = executable('pg_regress_ecpg',
|
||||
pg_regress_ecpg_sources,
|
||||
c_args: pg_regress_cflags,
|
||||
|
@@ -16,9 +16,13 @@ libpq_sources = files(
|
||||
'libpq-events.c',
|
||||
'pqexpbuffer.c',
|
||||
)
|
||||
libpq_so_sources = [] # for shared lib, in addition to the above
|
||||
|
||||
if host_system == 'windows'
|
||||
libpq_sources += files('pthread-win32.c', 'win32.c')
|
||||
libpq_so_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
|
||||
'--NAME', 'libpq',
|
||||
'--FILEDESC', 'PostgreSQL Access Library',])
|
||||
endif
|
||||
|
||||
if ssl.found()
|
||||
@@ -59,7 +63,7 @@ libpq_st = static_library('libpq',
|
||||
)
|
||||
|
||||
libpq_so = shared_library('libpq',
|
||||
libpq_sources,
|
||||
libpq_sources + libpq_so_sources,
|
||||
include_directories: [libpq_inc, postgres_inc],
|
||||
c_args: libpq_c_args,
|
||||
version: '5.' + pg_version_major.to_string(),
|
||||
|
@@ -1,13 +1,34 @@
|
||||
libpq_uri_regress_sources = files(
|
||||
'libpq_uri_regress.c',
|
||||
)
|
||||
|
||||
if host_system == 'windows'
|
||||
libpq_uri_regress_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
|
||||
'--NAME', 'libpq_uri_regress',
|
||||
'--FILEDESC', 'libpq test program',])
|
||||
endif
|
||||
|
||||
executable('libpq_uri_regress',
|
||||
files('libpq_uri_regress.c'),
|
||||
libpq_uri_regress_sources,
|
||||
dependencies: [frontend_code, libpq],
|
||||
kwargs: default_bin_args + {
|
||||
'install': false,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
libpq_testclient_sources = files(
|
||||
'libpq_testclient.c',
|
||||
)
|
||||
|
||||
if host_system == 'windows'
|
||||
libpq_testclient_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
|
||||
'--NAME', 'libpq_testclient',
|
||||
'--FILEDESC', 'libpq test program',])
|
||||
endif
|
||||
|
||||
executable('libpq_testclient',
|
||||
files('libpq_testclient.c'),
|
||||
libpq_testclient_sources,
|
||||
dependencies: [frontend_code, libpq],
|
||||
kwargs: default_bin_args + {
|
||||
'install': false,
|
||||
|
Reference in New Issue
Block a user