Meson will complain on linux that libraries are not compiled with -fpic but then ignore options to enable -fpic by default, also despite detecting this Meson will not add it on Linux. Because of this I have to only build static libraries. CMake might be on the table now.

main
Zed A. Shaw 3 days ago
parent 838f54a4f4
commit 8dc70ad1ed
  1. 11
      meson.build

@ -4,7 +4,7 @@ project('lel-guecs', 'cpp',
version: '0.2.0',
default_options: [
'cpp_std=c++20',
'cpp_args=-D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1'
'cpp_args=-D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1',
])
# use this for common options only for our executables
@ -81,10 +81,9 @@ sources = [
lel_guecs_inc = include_directories('include')
lel_guecs_lib = both_libraries('lel-guecs',
lel_guecs_lib = static_library('lel-guecs',
sources,
version: '0.2.0',
soversion: '1',
pic: true,
cpp_args: cpp_args,
include_directories: lel_guecs_inc,
override_options: exe_defaults,
@ -105,7 +104,7 @@ executable('runtests', [
link_args: link_args,
override_options: exe_defaults,
include_directories: lel_guecs_inc,
link_with: [lel_guecs_lib.get_static_lib()],
link_with: [lel_guecs_lib],
dependencies: dependencies + [catch2])
executable('calc', [
@ -115,5 +114,5 @@ executable('calc', [
link_args: link_args,
override_options: exe_defaults,
include_directories: lel_guecs_inc,
link_with: [lel_guecs_lib.get_static_lib()],
link_with: [lel_guecs_lib],
dependencies: dependencies)

Loading…
Cancel
Save