Skip to content

Commit 1a9c401

Browse files
Add native targets
1 parent b8a35e2 commit 1a9c401

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

src/catch2/meson.build

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ catch2 = static_library(
360360
dependencies: catch2_dependencies,
361361
include_directories: '..',
362362
install: get_option('install'),
363-
native: true,
364363
build_by_default: meson.is_subproject() == false
365364
)
366365

@@ -369,6 +368,19 @@ catch2_dep = declare_dependency(
369368
include_directories: '..',
370369
)
371370

371+
catch2_native = static_library(
372+
'Catch2_native',
373+
sources,
374+
include_directories: '..',
375+
native: true,
376+
build_by_default: meson.is_subproject() == false
377+
)
378+
379+
catch2_native_dep = declare_dependency(
380+
link_with: catch2_native,
381+
include_directories: '..',
382+
)
383+
372384
if get_option('install')
373385
pkg.generate(
374386
catch2,
@@ -384,7 +396,6 @@ catch2_with_main = static_library(
384396
link_with: catch2,
385397
include_directories: '..',
386398
install: get_option('install'),
387-
native: true,
388399
build_by_default: meson.is_subproject() == false
389400
)
390401

@@ -393,6 +404,20 @@ catch2_with_main_dep = declare_dependency(
393404
include_directories: '..',
394405
)
395406

407+
catch2_with_main_native = static_library(
408+
'Catch2Main_native',
409+
'internal/catch_main.cpp',
410+
link_with: catch2_native,
411+
include_directories: '..',
412+
install: get_option('install'),
413+
build_by_default: meson.is_subproject() == false
414+
)
415+
416+
catch2_with_main_native_dep = declare_dependency(
417+
link_with: [catch2_native, catch2_with_main_native],
418+
include_directories: '..',
419+
)
420+
396421
if get_option('install')
397422
pkg.generate(
398423
catch2_with_main,

0 commit comments

Comments
 (0)