mirror of
https://github.com/libevent/libevent.git
synced 2025-01-20 05:02:55 +08:00
16 lines
554 B
CMake
16 lines
554 B
CMake
cmake_minimum_required(VERSION 3.1.2)
|
|
if (POLICY CMP0074)
|
|
cmake_policy(SET CMP0074 NEW)
|
|
endif()
|
|
project(verify)
|
|
# set(CMAKE_VERBOSE_MAKEFILE 1)
|
|
if(NOT ${EVENT__CODE_COMPONENT} STREQUAL "")
|
|
string(TOUPPER ${EVENT__CODE_COMPONENT} _UPPER_COMPONENT)
|
|
endif()
|
|
find_package(Libevent 2.2.0 REQUIRED COMPONENTS ${EVENT__LINK_COMPONENT})
|
|
add_definitions(-DEVENT_EXPORT_TEST_COMPONENT_${_UPPER_COMPONENT})
|
|
add_executable(test-export test-export.c)
|
|
target_link_libraries(test-export ${LIBEVENT_LIBRARIES})
|
|
enable_testing()
|
|
add_test(test-export test-export)
|