Skip to content

Commit

Permalink
Correctly compile tests if build without writer (on Windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautierfr committed Aug 26, 2024
1 parent b6fe360 commit 2b5ff31
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/meson.build
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
gtest_dep = dependency('gtest', main:true, fallback:['gtest', 'gtest_main_dep'], required:false)


test_deps = [gtest_dep, libzim_dep, icu_dep]
tests = [
'metadata-test',
'tools-test',
'zimwriterfs-zimcreatorfs',
'zimcheck-test'
]

if with_writer
tests += [
'tools-test',
'zimwriterfs-zimcreatorfs'
]
test_deps += [gumbo_dep, magic_dep, zlib_dep]
endif

zimwriter_srcs = [ '../src/zimwriterfs/tools.cpp',
'../src/zimwriterfs/zimcreatorfs.cpp',
'../src/tools.cpp']
Expand All @@ -21,7 +29,7 @@ if gtest_dep.found() and not meson.is_cross_build()
foreach test_name : tests

test_exe = executable(test_name, [test_name+'.cpp'] + tests_src_map[test_name],
dependencies : [gtest_dep, libzim_dep, gumbo_dep, magic_dep, zlib_dep, icu_dep],
dependencies : test_deps,
include_directories: inc,
build_rpath : '$ORIGIN')

Expand Down

0 comments on commit 2b5ff31

Please sign in to comment.