Skip to content

Commit

Permalink
Debugging python-win
Browse files Browse the repository at this point in the history
  • Loading branch information
PerryWerneck committed Oct 31, 2024
1 parent 0916282 commit f52ab6e
Showing 1 changed file with 48 additions and 31 deletions.
79 changes: 48 additions & 31 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ project(
)

project_description = 'Library and application to read data from SMBIOS/DMI'
library_name = meson.project_name()

#
# Versioning
Expand All @@ -27,11 +26,6 @@ cxx = meson.get_compiler('cpp')
cc = meson.get_compiler('c')
enable_debug = get_option('debug') or get_option('buildtype').contains('debug')

if cxx.get_id() == 'msvc'
# Avoiding error 'LNK1149: output filename matches input filename'
library_name = 'lib' + meson.project_name()
endif

compiler_flags_common = [
'-fvisibility=hidden',
'-DHAVE_CONFIG_H=1',
Expand Down Expand Up @@ -170,23 +164,55 @@ endif
#
# Targets
#
dynamic = shared_library(
meson.project_name(),
config_src + lib_src,
install: true,
gnu_symbol_visibility: 'hidden',
dependencies: lib_deps,
soversion: pkg_major_version,
include_directories: includes_dir
)
if cxx.get_id() == 'msvc'

static = static_library(
library_name,
config_src + lib_src,
install: true,
dependencies: lib_deps,
include_directories: includes_dir
)
dynamic = shared_library(
meson.project_name(),
config_src + lib_src,
install: true,
gnu_symbol_visibility: 'hidden',
dependencies: lib_deps,
soversion: pkg_major_version,
include_directories: includes_dir
)

static = static_library(
meson.project_name(),
config_src + lib_src,
install: true,
dependencies: lib_deps,
include_directories: includes_dir
)

executable(
'dmiget',
config_src + [ 'src/dmiget/dmiget.cc' ],
install: true,
link_with : dynamic,
install_dir: get_option('sbindir'),
include_directories: includes_dir
)

else

static = static_library(
'lib'+ meson.project_name(),
config_src + lib_src,
install: true,
dependencies: lib_deps,
include_directories: includes_dir
)

executable(
'dmiget',
config_src + [ 'src/dmiget/dmiget.cc' ],
install: true,
link_with : static,
install_dir: get_option('sbindir'),
include_directories: includes_dir
)

endif

#
# Check for python
Expand All @@ -213,15 +239,6 @@ if py.found()
)
endif

executable(
'dmiget',
config_src + [ 'src/dmiget/dmiget.cc' ],
install: true,
link_with : dynamic,
install_dir: get_option('sbindir'),
include_directories: includes_dir
)

install_headers(
'src/include/smbios/defs.h',
'src/include/smbios/memsize.h',
Expand Down

0 comments on commit f52ab6e

Please sign in to comment.