Files
CMake/Tests/FindLibRHash/Test/CMakeLists.txt
Brad King 71180fc8aa FindLibRHash: Add module to find the librhash package
Add it to a private source directory that is not installed so that we
can use it for building CMake itself.  This will allow it to mature
before being distributed publicly.
2016-11-10 08:29:38 -05:00

18 lines
657 B
CMake

cmake_minimum_required(VERSION 3.7)
project(TestFindLibRHash C)
include(CTest)
# CMake does not actually provide FindLibRHash publicly.
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../Source/Modules)
find_package(LibRHash REQUIRED)
add_executable(test_librhash_tgt main.c)
target_link_libraries(test_librhash_tgt LibRHash::LibRHash)
add_test(NAME test_librhash_tgt COMMAND test_librhash_tgt)
add_executable(test_librhash_var main.c)
target_include_directories(test_librhash_var PRIVATE ${LibRHash_INCLUDE_DIRS})
target_link_libraries(test_librhash_var PRIVATE ${LibRHash_LIBRARIES})
add_test(NAME test_librhash_var COMMAND test_librhash_var)