Use library() instead of static_library()

Build type will be set by default_library, which default to static.
However, shared libraries can be built, by passing -Ddefault_library=shared
This commit is contained in:
Daniel 2024-10-11 16:47:19 +02:00 committed by GitHub
parent e9c36da60e
commit c8b394e6cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -351,7 +351,7 @@ if ((host_machine.system() == 'android') or
catch2_dependencies += log_dep catch2_dependencies += log_dep
endif endif
catch2 = static_library( catch2 = library(
'Catch2', 'Catch2',
sources, sources,
dependencies: catch2_dependencies, dependencies: catch2_dependencies,
@ -371,7 +371,7 @@ pkg.generate(
url: 'https://github.com/catchorg/Catch2', url: 'https://github.com/catchorg/Catch2',
) )
catch2_with_main = static_library( catch2_with_main = library(
'Catch2Main', 'Catch2Main',
'internal/catch_main.cpp', 'internal/catch_main.cpp',
link_with: catch2, link_with: catch2,