summaryrefslogtreecommitdiffstats
path: root/Tests/FindLibUV/Test/CMakeLists.txt
blob: 257ddf3cc90dbdd28dd4d48955fffefecd6ba274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cmake_minimum_required(VERSION 3.6)
project(TestFindLibUV C)
include(CTest)

# CMake does not actually provide FindLibUV publicly.
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../Source/Modules)

find_package(LibUV REQUIRED)

add_executable(test_libuv_tgt main.c)
target_link_libraries(test_libuv_tgt LibUV::LibUV)
add_test(NAME test_libuv_tgt COMMAND test_libuv_tgt)

add_executable(test_libuv_var main.c)
target_include_directories(test_libuv_var PRIVATE ${LibUV_INCLUDE_DIRS})
target_link_libraries(test_libuv_var PRIVATE ${LibUV_LIBRARIES})
add_test(NAME test_libuv_var COMMAND test_libuv_var)