| 1 |
cmake_minimum_required(VERSION 3.10) |
| 2 |
project(TestFindLibRHash C) |
| 3 |
include(CTest) |
| 4 |
|
| 5 |
# CMake does not actually provide FindLibRHash publicly. |
| 6 |
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../Source/Modules) |
| 7 |
|
| 8 |
find_package(LibRHash REQUIRED) |
| 9 |
|
| 10 |
add_executable(test_librhash_tgt main.c) |
| 11 |
target_link_libraries(test_librhash_tgt LibRHash::LibRHash) |
| 12 |
add_test(NAME test_librhash_tgt COMMAND test_librhash_tgt) |
| 13 |
|
| 14 |
add_executable(test_librhash_var main.c) |
| 15 |
target_include_directories(test_librhash_var PRIVATE ${LibRHash_INCLUDE_DIRS}) |
| 16 |
target_link_libraries(test_librhash_var PRIVATE ${LibRHash_LIBRARIES}) |
| 17 |
add_test(NAME test_librhash_var COMMAND test_librhash_var) |