Skip to content

Commit

Permalink
utils: only build mu-tests-utils when tests are enabled
Browse files Browse the repository at this point in the history
This fixes a compilation failure.

Fixes #2684.
  • Loading branch information
djcb committed Apr 6, 2024
1 parent be63bf2 commit 5186264
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions lib/utils/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,28 @@
## along with this program; if not, write to the Free Software Foundation,
## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


thirdparty=join_paths('..', '..', 'thirdparty')

lib_mu_utils=static_library('mu-utils', [
srcs = [
'mu-command-handler.cc',
'mu-html-to-text.cc',
'mu-lang-detector.cc',
'mu-logger.cc',
'mu-option.cc',
'mu-readline.cc',
'mu-sexp.cc',
'mu-test-utils.cc',
'mu-utils-file.cc',
'mu-utils.cc'
], dependencies: [
'mu-utils.cc',
]

if get_option('tests').enabled()
test_srcs = [ 'mu-test-utils.cc' ]
else
test_srcs = []
endif

lib_mu_utils=static_library('mu-utils',
[ srcs, test_srcs ], dependencies: [
glib_dep,
gio_dep,
gio_unix_dep,
Expand Down

0 comments on commit 5186264

Please sign in to comment.