diff --git a/libs/meson.build b/libs/meson.build index 3184ec230..13d8a4dde 100644 --- a/libs/meson.build +++ b/libs/meson.build @@ -1,66 +1,77 @@ +libfvwm3_sources = files( + 'BidiJoin.c', + 'Bindings.c', + 'ClientMsg.c', + 'ColorUtils.c', + 'Colorset.c', + 'CombineChars.c', + 'Cursor.c', + 'Event.c', + 'FBidi.c', + 'FEvent.c', + 'FGettext.c', + 'FImage.c', + 'FRender.c', + 'FRenderInit.c', + 'FScreen.c', + 'FShape.c', + 'FTips.c', + 'Fft.c', + 'Ficonv.c', + 'Flocale.c', + 'FlocaleCharset.c', + 'Grab.c', + 'Graphics.c', + 'Module.c', + 'Parse.c', + 'Picture.c', + 'PictureBase.c', + 'PictureGraphics.c', + 'PictureImageLoader.c', + 'PictureUtils.c', + 'Rectangles.c', + 'Strings.c', + 'System.c', + 'Target.c', + 'WinMagic.c', + 'XError.c', + 'XResource.c', + 'cJSON.c', + 'charmap.c', + 'envvar.c', + 'fio.c', + 'flist.c', + 'fqueue.c', + 'fsm.c', + 'fvwmlib3.c', + 'fvwmrect.c', + 'fvwmsignal.c', + 'getpwuid.c', + 'gravity.c', + 'log.c', + 'modifiers.c', + 'safemalloc.c', + 'setpgrp.c', + 'strtonum.c', + 'timeout.c', + 'wcontext.c', + 'wild.c', +) + +string_sources = files( + 'strlcat.c', + 'strlcpy.c', +) + +# We don't build the string sources on macOS +# We probably could check for target_system, but nobody is cross-compiling _to_ macOS +if not (host_machine.system() == 'darwin') + libfvwm3_sources += string_sources +endif + libfvwm3 = static_library( 'fvwm3', - sources: [ - 'BidiJoin.c', - 'Bindings.c', - 'ClientMsg.c', - 'ColorUtils.c', - 'Colorset.c', - 'CombineChars.c', - 'Cursor.c', - 'Event.c', - 'FBidi.c', - 'FEvent.c', - 'FGettext.c', - 'FImage.c', - 'FRender.c', - 'FRenderInit.c', - 'FScreen.c', - 'FShape.c', - 'FTips.c', - 'Fft.c', - 'Ficonv.c', - 'Flocale.c', - 'FlocaleCharset.c', - 'Grab.c', - 'Graphics.c', - 'Module.c', - 'Parse.c', - 'Picture.c', - 'PictureBase.c', - 'PictureGraphics.c', - 'PictureImageLoader.c', - 'PictureUtils.c', - 'Rectangles.c', - 'Strings.c', - 'System.c', - 'Target.c', - 'WinMagic.c', - 'XError.c', - 'XResource.c', - 'cJSON.c', - 'charmap.c', - 'envvar.c', - 'fio.c', - 'flist.c', - 'fqueue.c', - 'fsm.c', - 'fvwmlib3.c', - 'fvwmrect.c', - 'fvwmsignal.c', - 'getpwuid.c', - 'gravity.c', - 'log.c', - 'modifiers.c', - 'safemalloc.c', - 'setpgrp.c', - 'strlcat.c', - 'strlcpy.c', - 'strtonum.c', - 'timeout.c', - 'wcontext.c', - 'wild.c', - ], + sources: libfvwm3_sources, include_directories: includedirs, dependencies: all_found_deps, install: false, diff --git a/meson.build b/meson.build index 984eaad31..cab6f6cfb 100644 --- a/meson.build +++ b/meson.build @@ -65,6 +65,10 @@ if host_machine.endian() == 'big' conf.set('WORDS_BIGENDIAN', true) endif +if host_machine.system() == 'darwin' + conf.set10('HOST_MACOS', true) +endif + # Set static configuration. conf.set_quoted('VERSION', meson.project_version()) conf.set_quoted('VERSIONINFO', fvwm_vcs_versioninfo)