diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2022-03-21 17:50:38 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2022-03-21 17:51:15 +0000 |
commit | 5308f4b529765e2e145ea2e7152679e3a75607a2 (patch) | |
tree | 567e96f03244f2169985ee8ad8e66dd48d311a6f | |
parent | d17857267da72b22ed4a3d5d58850c98abe86158 (diff) |
net-im/toxext: Add test target
Only build tests when tests are run.
-rw-r--r-- | net-im/toxext/Makefile | 3 | ||||
-rw-r--r-- | net-im/toxext/files/patch-CMakeLists.txt | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/net-im/toxext/Makefile b/net-im/toxext/Makefile index a3198e55469d..6a77c0d415d9 100644 --- a/net-im/toxext/Makefile +++ b/net-im/toxext/Makefile @@ -14,10 +14,11 @@ LIB_DEPENDS= libopus.so:audio/opus \ libtoxcore.so:net-im/tox \ libvpx.so:multimedia/libvpx -USES= cmake localbase:ldflags pkgconfig +USES= cmake:testing localbase:ldflags pkgconfig USE_GITHUB= yes CMAKE_ON= BUILD_SHARED_LIBS +CMAKE_TESTING_ON= BUILD_TESTS CFLAGS+= -fPIC # see https://github.com/toxext/toxext/issues/7 diff --git a/net-im/toxext/files/patch-CMakeLists.txt b/net-im/toxext/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..eb0ea86f3616 --- /dev/null +++ b/net-im/toxext/files/patch-CMakeLists.txt @@ -0,0 +1,14 @@ +--- CMakeLists.txt.orig 2022-03-21 17:46:44 UTC ++++ CMakeLists.txt +@@ -15,7 +15,9 @@ endfunction() + add_subdirectory(src) + add_subdirectory(mock) + +-enable_testing() +-add_subdirectory(test) ++if (BUILD_TESTS) ++ enable_testing() ++ add_subdirectory(test) ++endif() + + install(EXPORT ToxExtConfig DESTINATION lib/cmake/ToxExt NAMESPACE ToxExt::) |