blob: 5681f747159c3aae0b7fe663459926df448c1616 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
cmake_minimum_required(VERSION 3.9)
project(TestFindEXPAT C)
include(CTest)
find_package(EXPAT REQUIRED)
add_definitions(-DCMAKE_EXPECTED_EXPAT_VERSION="${EXPAT_VERSION_STRING}")
add_executable(testexpat_tgt main.c)
target_link_libraries(testexpat_tgt EXPAT::EXPAT)
add_test(NAME testexpat_tgt COMMAND testexpat_tgt)
add_executable(testexpat_var main.c)
target_include_directories(testexpat_var PRIVATE ${EXPAT_INCLUDE_DIRS})
target_link_libraries(testexpat_var PRIVATE ${EXPAT_LIBRARIES})
add_test(NAME testexpat_var COMMAND testexpat_var)
|