Skip to content

Add support for Visual Studio builds with Meson #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ endif

# Some dependencies are required only in maintainer mode and/or
# if documentation shall be built.
mm_common_get = find_program('mm-common-get', required: maintainer_mode)
mm_common_get = find_program('mm-common-get', required: false)

if maintainer_mode and not mm_common_get.found()
error('Maintainer mode requires the \'mm-common-get\' command.\n' +
'Use \'-Dmaintainer-mode=false\' or install the \'mm-common\' package, version 1.0.0 or higher')
endif

perl = find_program('perl', required: build_documentation)
doxygen = find_program('doxygen', required: build_documentation)
dot = find_program('dot', required: build_documentation) # Used by Doxygen
Expand Down Expand Up @@ -145,7 +151,7 @@ add_project_arguments(warning_flags, language: 'cpp')
# MSVC: Ignore warnings that aren't really harmful, but make those
# that should not be overlooked stand out.
if is_msvc
foreach wd : ['/FImsvc_recommended_pragmas.h', '/wd4267', '/wd4530']
foreach wd : ['/FImsvc_recommended_pragmas.h', '/wd4267', '/wd4530', '/utf-8']
disabled_warning = cpp_compiler.get_supported_arguments(wd)
add_project_arguments(disabled_warning, language: 'cpp')
endforeach
Expand Down
8 changes: 8 additions & 0 deletions sigc++/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,19 @@ install_headers(adaptors_h_files, subdir: sigcxx_pcname / 'sigc++' / 'adaptors')
install_headers(functors_h_files, subdir: sigcxx_pcname / 'sigc++' / 'functors')
install_headers(tuple_utils_h_files, subdir: sigcxx_pcname / 'sigc++' / 'tuple-utils')

extra_sigc_cppflags = []

# Make sure we are exporting the symbols from the DLL
if is_msvc
extra_sigc_cppflags += ['-DSIGC_BUILD', '-D_WINDLL']
endif

extra_include_dirs = ['..']
sigcxx_library = library(sigcxx_pcname,
source_cc_files,
version: sigcxx_libversion,
include_directories: extra_include_dirs,
cpp_args: extra_sigc_cppflags,
dependencies: sigcxx_build_dep,
install: true,
)
Expand Down