Skip to content

Commit

Permalink
Link with libdl when we compile shared libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Jul 27, 2024
1 parent 852a088 commit 13066c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ cutest_headers = []
libcutest_include = []
libcutest_include += include_directories('include')

# Dependency
libdl = dependency('dl', required: false)

# Sources
subdir('include')
# subdir('src/algencan') # needs algencan_
Expand Down Expand Up @@ -139,6 +142,7 @@ gen_single = generator(fc_compiler,
pp_sources_single = [gen_single.process(libcutest_src)]

libcutest_single = library(libcutest_single_name,
dependencies : libdl,
sources : pp_sources_single + libcutest_c_src,
include_directories : libcutest_include,
install : true)
Expand All @@ -158,6 +162,7 @@ gen_double = generator(fc_compiler,
pp_sources_double = [gen_double.process(libcutest_src)]

libcutest_double = library(libcutest_double_name,
dependencies : libdl,
sources : pp_sources_double + libcutest_c_src,
include_directories : libcutest_include,
install : true)
Expand All @@ -178,6 +183,7 @@ if build_quadruple
pp_sources_quadruple = [gen_quadruple.process(libcutest_src)]

libcutest_quadruple = library(libcutest_quadruple_name,
dependencies : libdl,
sources : pp_sources_quadruple + libcutest_c_src,
include_directories : libcutest_include,
install : true)
Expand Down

0 comments on commit 13066c2

Please sign in to comment.