| 1 |
macro(add_simple_module _name _sourcesvar _depsvar _defsvar _cflagsvar _incdirsvar _ldflagsvar _destination) |
| 2 |
set(DEPENDENCIES |
| 3 |
evolution-ews |
| 4 |
) |
| 5 |
|
| 6 |
set(SOURCES |
| 7 |
${${_sourcesvar}} |
| 8 |
) |
| 9 |
|
| 10 |
add_library(${_name} MODULE |
| 11 |
${SOURCES} |
| 12 |
) |
| 13 |
|
| 14 |
set_target_properties(${_name} PROPERTIES |
| 15 |
PREFIX "" |
| 16 |
) |
| 17 |
|
| 18 |
add_dependencies(${_name} |
| 19 |
${DEPENDENCIES} |
| 20 |
${${_depsvar}} |
| 21 |
) |
| 22 |
|
| 23 |
target_compile_definitions(${_name} PRIVATE |
| 24 |
-DG_LOG_DOMAIN=\"${_name}\" |
| 25 |
-DEXCHANGE_EWS_LOCALEDIR=\"${LOCALE_INSTALL_DIR}\" |
| 26 |
${${_defsvar}} |
| 27 |
) |
| 28 |
|
| 29 |
target_compile_options(${_name} PUBLIC |
| 30 |
${LIBEBACKEND_CFLAGS} |
| 31 |
${LIBEDATASERVER_CFLAGS} |
| 32 |
${SOUP_CFLAGS} |
| 33 |
${${_cflagsvar}} |
| 34 |
) |
| 35 |
|
| 36 |
target_include_directories(${_name} PUBLIC |
| 37 |
${CMAKE_BINARY_DIR} |
| 38 |
${CMAKE_SOURCE_DIR} |
| 39 |
${LIBEBACKEND_INCLUDE_DIRS} |
| 40 |
${LIBEDATASERVER_INCLUDE_DIRS} |
| 41 |
${SOUP_INCLUDE_DIRS} |
| 42 |
${${_incdirsvar}} |
| 43 |
) |
| 44 |
|
| 45 |
target_link_libraries(${_name} |
| 46 |
${DEPENDENCIES} |
| 47 |
${${_depsvar}} |
| 48 |
${LIBEBACKEND_LDFLAGS} |
| 49 |
${LIBEDATASERVER_LDFLAGS} |
| 50 |
${SOUP_LDFLAGS} |
| 51 |
${${_ldflagsvar}} |
| 52 |
) |
| 53 |
|
| 54 |
install(TARGETS ${_name} |
| 55 |
DESTINATION ${_destination} |
| 56 |
) |
| 57 |
endmacro(add_simple_module) |
| 58 |
|
| 59 |
add_subdirectory(addressbook) |
| 60 |
add_subdirectory(calendar) |
| 61 |
add_subdirectory(camel) |
| 62 |
add_subdirectory(common) |
| 63 |
add_subdirectory(evolution) |
| 64 |
add_subdirectory(registry) |