Warning, /pim/akonadi/src/xml/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 0002 find_package(LibXml2) 0003 set_package_properties(LibXml2 PROPERTIES 0004 DESCRIPTION "Required for XML schema validation in akonadixml" 0005 URL "http://xmlsoft.org" 0006 TYPE OPTIONAL 0007 ) 0008 0009 if (LIBXML2_FOUND) 0010 add_definitions(-DHAVE_LIBXML2) 0011 endif () 0012 0013 if (BUILD_TESTING) 0014 add_subdirectory(autotests) 0015 endif() 0016 set(akonadixml_SRCS 0017 xmldocument.cpp xmldocument.h 0018 xmlreader.cpp xmlreader.h 0019 xmlwritejob.cpp xmlwritejob.h 0020 xmlwriter.cpp xmlwriter.h 0021 ) 0022 0023 # base install include dir 0024 set(AkonadiXml_INSTALL_INCLUDEDIR "${KDE_INSTALL_INCLUDEDIR}/KPim6/AkonadiXml") 0025 0026 ecm_generate_headers(AkonadiXml_CC_HEADERS 0027 HEADER_NAMES 0028 XmlDocument 0029 XmlReader 0030 XmlWriteJob 0031 XmlWriter 0032 REQUIRED_HEADERS AkonadiXml_HEADERS 0033 PREFIX Akonadi 0034 ) 0035 0036 add_executable(akonadi2xml akonadi2xml.cpp) 0037 if (COMPILE_WITH_UNITY_CMAKE_SUPPORT) 0038 set_target_properties(akonadi2xml PROPERTIES UNITY_BUILD ON) 0039 endif() 0040 0041 set_target_properties(akonadi2xml PROPERTIES MACOSX_BUNDLE FALSE) 0042 0043 target_link_libraries(akonadi2xml 0044 KPim6::AkonadiXml 0045 KF6::I18n 0046 Qt::Widgets # for QApplication 0047 ) 0048 0049 add_library(KPim6AkonadiXml ${akonadixml_SRCS}) 0050 0051 generate_export_header(KPim6AkonadiXml BASE_NAME akonadi-xml) 0052 0053 add_library(KPim6::AkonadiXml ALIAS KPim6AkonadiXml) 0054 0055 target_include_directories(KPim6AkonadiXml INTERFACE "$<INSTALL_INTERFACE:${AkonadiXml_INSTALL_INCLUDEDIR}>") 0056 target_include_directories(KPim6AkonadiXml PUBLIC "$<BUILD_INTERFACE:${Akonadi_SOURCE_DIR}/src/core;${Akonadi_BINARY_DIR}/src/core>") 0057 0058 target_link_libraries(KPim6AkonadiXml 0059 PUBLIC 0060 KPim6::AkonadiCore 0061 Qt::Xml 0062 PRIVATE 0063 KF6::I18n 0064 ) 0065 if (LIBXML2_FOUND) 0066 target_link_libraries(KPim6AkonadiXml PRIVATE LibXml2::LibXml2) 0067 endif() 0068 0069 set_target_properties(KPim6AkonadiXml PROPERTIES 0070 VERSION ${AKONADI_VERSION} 0071 SOVERSION ${AKONADI_SOVERSION} 0072 EXPORT_NAME AkonadiXml 0073 ) 0074 0075 install(TARGETS 0076 KPim6AkonadiXml 0077 EXPORT KPim6AkonadiTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} 0078 ) 0079 0080 install(TARGETS 0081 akonadi2xml ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} 0082 ) 0083 0084 install(FILES 0085 ${CMAKE_CURRENT_BINARY_DIR}/akonadi-xml_export.h 0086 ${AkonadiXml_HEADERS} 0087 DESTINATION ${AkonadiXml_INSTALL_INCLUDEDIR}/akonadi 0088 COMPONENT Devel 0089 ) 0090 install(FILES 0091 ${AkonadiXml_CC_HEADERS} 0092 DESTINATION ${AkonadiXml_INSTALL_INCLUDEDIR}/Akonadi 0093 COMPONENT Devel 0094 ) 0095 0096 install(FILES 0097 akonadi-xml.xsd 0098 DESTINATION ${KDE_INSTALL_DATADIR_KF}/akonadi/ 0099 )