CMakeLists.txt 1.79 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
set(akonadinotes_LIB_SRC
Laurent Montel's avatar
indent  
Laurent Montel committed
2 3
    noteutils.cpp
    )
Laurent Montel's avatar
Laurent Montel committed
4

5 6
ecm_qt_declare_logging_category(akonadinotes_LIB_SRC HEADER akonadi_notes_debug.h IDENTIFIER AKONADINOTES_LOG CATEGORY_NAME log_akonadi_notes)

Laurent Montel's avatar
Laurent Montel committed
7 8 9 10 11 12
add_library(KF5AkonadiNotes ${akonadinotes_LIB_SRC})

generate_export_header(KF5AkonadiNotes BASE_NAME akonadi-notes)

add_library(KF5::KF5AkonadiNotes ALIAS KF5AkonadiNotes)

13 14
kde_target_enable_exceptions(KF5AkonadiNotes PUBLIC)

Volker Krause's avatar
Volker Krause committed
15
target_include_directories(KF5AkonadiNotes INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/Akonadi/Notes;${KDE_INSTALL_INCLUDEDIR_KF5}/akonadi/notes>")
Laurent Montel's avatar
Laurent Montel committed
16
target_include_directories(KF5AkonadiNotes PUBLIC "$<BUILD_INTERFACE:${Akonadi-Notes_SOURCE_DIR}/src;${Akonadi-Notes_BINARY_DIR}/src;>")
Laurent Montel's avatar
Laurent Montel committed
17 18

target_link_libraries(KF5AkonadiNotes
Laurent Montel's avatar
indent  
Laurent Montel committed
19
    PUBLIC
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
20
    KF5::Mime
Laurent Montel's avatar
indent  
Laurent Montel committed
21
    PRIVATE
22 23
    Qt5::Xml
    KF5::I18n
Laurent Montel's avatar
indent  
Laurent Montel committed
24
    )
Laurent Montel's avatar
Laurent Montel committed
25 26 27 28 29

set_target_properties(KF5AkonadiNotes PROPERTIES
    VERSION ${AKONADINOTES_VERSION_STRING}
    SOVERSION ${AKONADINOTES_SOVERSION}
    EXPORT_NAME AkonadiNotes
Laurent Montel's avatar
indent  
Laurent Montel committed
30
    )
Laurent Montel's avatar
Laurent Montel committed
31 32 33

install(TARGETS
    KF5AkonadiNotes
34
    EXPORT KF5AkonadiNotesTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}
Laurent Montel's avatar
indent  
Laurent Montel committed
35
    )
Laurent Montel's avatar
Laurent Montel committed
36

Laurent Montel's avatar
Laurent Montel committed
37
ecm_generate_headers(AkonadiNotes_CamelCase_HEADERS
Laurent Montel's avatar
indent  
Laurent Montel committed
38
    HEADER_NAMES
Laurent Montel's avatar
Laurent Montel committed
39

Laurent Montel's avatar
indent  
Laurent Montel committed
40 41 42 43
    NoteUtils
    REQUIRED_HEADERS AkonadiNotes_HEADERS
    PREFIX Akonadi/Notes
    )
Laurent Montel's avatar
Laurent Montel committed
44 45

install(FILES
Laurent Montel's avatar
Laurent Montel committed
46
    ${AkonadiNotes_CamelCase_HEADERS}
47
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/Akonadi/Notes
48
    COMPONENT Devel
Laurent Montel's avatar
indent  
Laurent Montel committed
49
    )
50 51 52 53 54

install(FILES
    ${AkonadiNotes_HEADERS}
    ${CMAKE_CURRENT_BINARY_DIR}/akonadi-notes_export.h
    ${AkonadiNotes_CamelCase_HEADERS}
55
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/akonadi/notes
Laurent Montel's avatar
Laurent Montel committed
56
    COMPONENT Devel
Laurent Montel's avatar
indent  
Laurent Montel committed
57
    )
Laurent Montel's avatar
Laurent Montel committed
58

59
ecm_generate_pri_file(BASE_NAME AkonadiNotes
Laurent Montel's avatar
indent  
Laurent Montel committed
60
    LIB_NAME KF5AkonadiNotes
Laurent Montel's avatar
Laurent Montel committed
61
    DEPS "KMime" FILENAME_VAR PRI_FILENAME
Laurent Montel's avatar
indent  
Laurent Montel committed
62
    )
63

64
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})