mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-22 15:15:28 +00:00
Support datachannel-tests and datachannel-benchmark in UWP.
This commit is contained in:
@ -128,14 +128,22 @@ set(TESTS_SOURCES
|
||||
)
|
||||
|
||||
set(TESTS_UWP_RESOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp/Logo.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp/package.appxManifest
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp/SmallLogo.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp/SmallLogo44x44.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp/SplashScreen.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp/StoreLogo.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp/Windows_TemporaryKey.pfx
|
||||
)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-tests/Logo.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-tests/package.appxManifest
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-tests/SmallLogo.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-tests/SmallLogo44x44.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-tests/SplashScreen.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-tests/StoreLogo.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-tests/Windows_TemporaryKey.pfx)
|
||||
|
||||
set(BENCHMARK_UWP_RESOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-benchmark/Logo.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-benchmark/package.appxManifest
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-benchmark/SmallLogo.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-benchmark/SmallLogo44x44.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-benchmark/SplashScreen.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-benchmark/StoreLogo.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/uwp-benchmark/Windows_TemporaryKey.pfx)
|
||||
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
@ -294,7 +302,12 @@ endif()
|
||||
|
||||
# Tests
|
||||
if(NOT NO_TESTS)
|
||||
add_executable(datachannel-tests ${TESTS_SOURCES} ${TESTS_UWP_RESOURCES})
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
# Add resource files needed for UWP apps.
|
||||
add_executable(datachannel-tests ${TESTS_SOURCES} ${TESTS_UWP_RESOURCES})
|
||||
else()
|
||||
add_executable(datachannel-tests ${TESTS_SOURCES})
|
||||
endif()
|
||||
set_target_properties(datachannel-tests PROPERTIES
|
||||
VERSION ${PROJECT_VERSION}
|
||||
CXX_STANDARD 17)
|
||||
@ -305,7 +318,12 @@ if(NOT NO_TESTS)
|
||||
target_link_libraries(datachannel-tests datachannel)
|
||||
|
||||
# Benchmark
|
||||
add_executable(datachannel-benchmark test/benchmark.cpp)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
# Add resource files needed for UWP apps.
|
||||
add_executable(datachannel-benchmark test/benchmark.cpp ${BENCHMARK_UWP_RESOURCES})
|
||||
else()
|
||||
add_executable(datachannel-benchmark test/benchmark.cpp)
|
||||
endif()
|
||||
set_target_properties(datachannel-benchmark PROPERTIES
|
||||
VERSION ${PROJECT_VERSION}
|
||||
CXX_STANDARD 17)
|
||||
|
Reference in New Issue
Block a user