File: CMakeLists.txt

package info (click to toggle)
kdepimlibs 4:4.14.2-2+deb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 35,360 kB
  • ctags: 31,564
  • sloc: cpp: 266,319; xml: 4,188; ansic: 2,946; yacc: 1,904; perl: 381; sh: 77; ruby: 60; makefile: 16
file content (53 lines) | stat: -rw-r--r-- 1,430 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
if ( LIBXML2_FOUND )
  add_definitions( -DHAVE_LIBXML2 )
endif ()

add_subdirectory( tests )

include_directories(
    ${KDE4_INCLUDES}
    ${LIBXML2_INCLUDE_DIR}
    ${CMAKE_CURRENT_BINARY_DIR}
)

set( akonadixml_SRCS
  xmldocument.cpp
  xmlreader.cpp
  xmlwriter.cpp
  xmlwritejob.cpp
)

set( akonadixml_HDRS
  ${CMAKE_CURRENT_BINARY_DIR}/akonadi-xml_export.h
  xmldocument.h
  xmlreader.h
  xmlwritejob.h
  xmlwriter.h
)

kde4_add_library(akonadi-xml ${LIBRARY_TYPE} ${akonadixml_SRCS})
generate_export_header(akonadi-xml BASE_NAME akonadi_xml EXPORT_FILE_NAME akonadi-xml_export.h)

target_link_libraries(akonadi-xml
  ${KDE4_KIO_LIBS}
  ${QT_QTXML_LIBRARY}
  ${LIBXML2_LIBRARIES}
  akonadi-kde
)

set_target_properties(akonadi-xml PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
set_target_properties(akonadi-xml PROPERTIES COMPILE_DEFINITIONS
    SOVERSION="${GENERIC_LIB_SOVERSION}")

install(TARGETS akonadi-xml EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES ${akonadixml_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/akonadi/xml COMPONENT Devel)
install(FILES akonadi-xml.xsd DESTINATION ${DATA_INSTALL_DIR}/akonadi RENAME akonadi-xml${GENERIC_LIB_SOVERSION}.xsd)

kde4_add_executable(akonadi2xml akonadi2xml.cpp)
target_link_libraries(akonadi2xml
   akonadi-xml
   ${KDE4_KDEUI_LIBS}
   akonadi-kde
)

install(TARGETS akonadi2xml ${INSTALL_TARGETS_DEFAULT_ARGS})