| 1 |
macro(add_ews_test _name) |
| 2 |
set(DEPENDENCIES |
| 3 |
evolution-ews |
| 4 |
) |
| 5 |
|
| 6 |
set(SOURCES |
| 7 |
ews-test-common.c |
| 8 |
ews-test-common.h |
| 9 |
) |
| 10 |
|
| 11 |
add_executable(${_name} |
| 12 |
${SOURCES} |
| 13 |
${ARGN} |
| 14 |
) |
| 15 |
|
| 16 |
add_dependencies(${_name} |
| 17 |
${DEPENDENCIES} |
| 18 |
) |
| 19 |
|
| 20 |
target_compile_definitions(${_name} PRIVATE |
| 21 |
-DG_LOG_DOMAIN=\"${_name}\" |
| 22 |
-DTEST_FILE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\" |
| 23 |
-DCALENDAR_MODULE_DIR=\"${CMAKE_BINARY_DIR}/src/EWS/calendar/\" |
| 24 |
) |
| 25 |
|
| 26 |
target_compile_options(${_name} PUBLIC |
| 27 |
${LIBECAL_CFLAGS} |
| 28 |
${LIBEDATASERVER_CFLAGS} |
| 29 |
${UHTTPMOCK_CFLAGS} |
| 30 |
) |
| 31 |
|
| 32 |
target_include_directories(${_name} PUBLIC |
| 33 |
${CMAKE_BINARY_DIR} |
| 34 |
${CMAKE_SOURCE_DIR} |
| 35 |
${CMAKE_BINARY_DIR}/src/EWS |
| 36 |
${CMAKE_SOURCE_DIR}/src/EWS |
| 37 |
${LIBECAL_INCLUDE_DIRS} |
| 38 |
${LIBEDATASERVER_INCLUDE_DIRS} |
| 39 |
${UHTTPMOCK_INCLUDE_DIRS} |
| 40 |
) |
| 41 |
|
| 42 |
target_link_libraries(${_name} |
| 43 |
${DEPENDENCIES} |
| 44 |
${LIBECAL_LDFLAGS} |
| 45 |
${LIBEDATASERVER_LDFLAGS} |
| 46 |
${UHTTPMOCK_LDFLAGS} |
| 47 |
) |
| 48 |
|
| 49 |
add_check_test(${_name}) |
| 50 |
endmacro(add_ews_test) |
| 51 |
|
| 52 |
add_ews_test(ews-test-camel ews-test-camel.c) |
| 53 |
add_ews_test(ews-test-timezones ews-test-timezones.c) |