diff --git a/CMakeLists.txt b/CMakeLists.txt index f1a93901..34c5a066 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,8 +14,3 @@ endif() endif() endif() - -macro(_add_exec _name) - set_property(TARGET ${_name} PROPERTY - POSITION_INDEPENDENT_CODE True) -endmacro() diff --git a/examples/meson.build b/examples/meson.build index 31a47a83..266d9e24 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -50,6 +50,7 @@ libui_examples = { }, } foreach name, args : libui_examples + # TODO once we upgrade to 0.49.0, add pie: true executable(name, args['sources'] + libui_example_sources, dependencies: args.get('deps', []) + libui_binary_deps, link_with: libui_libui, @@ -60,4 +61,4 @@ foreach name, args : libui_examples install: false) endforeach -# TODO define the top-level examples target here +# MESONTODO define the top-level examples target here diff --git a/meson.build b/meson.build index 3b7408ce..780cbf49 100644 --- a/meson.build +++ b/meson.build @@ -7,24 +7,24 @@ # [--layout=flat] \ (useful for distribution and Windows DLL tests) # [--b_sanitize=whatever] # It turns out that I wouldn't really need any custom options; go figure. -# TODO I'm not sure how to allow building 32-bit instead of 64-bit with meson. -# TODO figure out what (meson/ninja) dist do -# TODO figure out why test and examples aren't included in ninja all -# TODO figure out how to make an overarching "examples" target -# TODOs from cmake; not sure if they're relevant here: +# MESONTODO I'm not sure how to allow building 32-bit instead of 64-bit with meson. +# MESONTODO figure out what (meson/ninja) dist do +# MESONTODO figure out why test and examples aren't included in ninja all +# MESONTODO figure out how to make an overarching "examples" target +# MESONTODOs from cmake; not sure if they're relevant here: # - uname -s for more refined OS control # - Haiku for haiku # - debian DESTDIR? https://github.com/andlabs/libui/pull/10 # - disable incremental linking? I forget if meson already doesn't do this or not; we did it manually in cmake -# we have to specify C++ here even if we're not using C++ immediately because otherwise none of the C++ built-in options are available (sigh; TODO) +# we have to specify C++ here even if we're not using C++ immediately because otherwise none of the C++ built-in options are available (sigh; MESONTODO) project('libui', ['c', 'cpp'], meson_version: '>=0.48.0', default_options: [ 'buildtype=debug', # build debug by default 'default_library=shared', # build shared libraries by default - # these are forced options, but meson doesn't let me set these up separately before I call project() (TODO) + # these are forced options, but meson doesn't let me set these up separately before I call project() (MESONTODO) 'warning_level=3', # always max warnings 'b_pch=false', # we don't want precompiled headers 'b_staticpic=true', # use PIC even for static libraries @@ -36,7 +36,7 @@ project('libui', ['c', 'cpp'], ], license: 'MIT') -# TODO move these below the next part (I need them here for other reasons) +# MESONTODO move these below the next part (I need them here for other reasons) libui_OS = host_machine.system() libui_MSVC = meson.get_compiler('c').get_id() == 'msvc' @@ -45,7 +45,7 @@ if libui_OS == 'darwin' required: true) endif -# TODO switch to tabs; the spaces are just so I can share this file while I'm writing it +# MESONTODO switch to tabs; the spaces are just so I can share this file while I'm writing it libui_forced_options = { 'warning_level': '3', # always max warnings 'b_pch': 'false', # we don't want precompiled headers @@ -57,7 +57,7 @@ libui_forced_options = { 'cpp_winlibs': '[]', # likewise as with c_winlibs } foreach name, value : libui_forced_options - # TODO why does meson need this guard? why aren't all options defined regardless of target?! + # MESONTODO why does meson need this guard? why aren't all options defined regardless of target?! if not ((name == 'c_winlibs' or name == 'cpp_eh' or name == 'cpp_winlibs') and not libui_MSVC) and not (name == 'c_std' and libui_MSVC) actual = '@0@'.format(get_option(name)) if actual != value diff --git a/test/meson.build b/test/meson.build index 744fa3ac..928d814e 100644 --- a/test/meson.build +++ b/test/meson.build @@ -39,7 +39,8 @@ if libui_OS == 'windows' ] endif -# TODO meson doesn't let us name this target test, but also doesn't seem to provide a way to override the executable name???? +# MESONTODO meson doesn't let us name this target test, but also doesn't seem to provide a way to override the executable name???? +# TODO once we upgrade to 0.49.0, add pie: true executable('tester', libui_test_sources, dependencies: libui_binary_deps, link_with: libui_libui, diff --git a/unix/meson.build b/unix/meson.build index 5b48ad98..9a2c8f74 100644 --- a/unix/meson.build +++ b/unix/meson.build @@ -52,7 +52,7 @@ libui_deps += [ version: '>=3.10.0', method: 'pkg-config', required: true), - # TODO are there better ways for these two? + # MESONTODO are there better ways for these two? I forget if I asked this already... meson.get_compiler('c').find_library('m', required: true), meson.get_compiler('c').find_library('dl', diff --git a/windows/meson.build b/windows/meson.build index 1d1a3baf..bfd496fe 100644 --- a/windows/meson.build +++ b/windows/meson.build @@ -70,10 +70,8 @@ libui_sources += [ # For a DLL, we have to include this directly, so we do so. # Windows won't link resources in static libraries, so including this would have no effect. # In those cases, we just need them to include the manifest with the executable (or link it directly into the output executable themselves); they can also customize the manifest as they see fit (assuming nothing breaks in the process). -# TODO make sure this gets added to both binary-only archives and install rules in this case if libui_mode == 'shared' libui_sources += [ - # TODO settle the path thing once and for all windows.compile_resources('resources.rc', args: libui_manifest_args, depend_files: ['libui.manifest'], @@ -81,7 +79,7 @@ if libui_mode == 'shared' endif # TODO prune this list -# TODO find out if we can just pass libui_winlibs to find_library() +# MESONTODO find out if we can just pass libui_winlibs to find_library() libui_winlibs = 'user32 kernel32 gdi32 comctl32 uxtheme msimg32 comdlg32 d2d1 dwrite ole32 oleaut32 oleacc uuid windowscodecs'.split(' ') foreach lib : libui_winlibs libui_deps += [