net-im/toxext: Add test target
Only build tests when tests are run.
This commit is contained in:
parent
d17857267d
commit
5308f4b529
@ -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
|
||||
|
||||
|
14
net-im/toxext/files/patch-CMakeLists.txt
Normal file
14
net-im/toxext/files/patch-CMakeLists.txt
Normal file
@ -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::)
|
Loading…
Reference in New Issue
Block a user