-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
65 lines (50 loc) · 2.43 KB
/
CMakeLists.txt
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
54
55
56
57
58
59
60
61
62
63
64
65
project(todo_txt_akonadi)
# search packages used by KDE
find_package (KDE4 REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)
include(MacroOptionalAddSubdirectory)
include(CheckIncludeFiles)
find_package (KdepimLibs REQUIRED)
find_program(XSLTPROC_EXECUTABLE xsltproc)
macro_log_feature(XSLTPROC_EXECUTABLE "xsltproc" "The command line XSLT processor from libxslt" "http://xmlsoft.org/XSLT/" FALSE "" "Needed for building Akonadi resources. Recommended.")
if (XSLTPROC_EXECUTABLE)
# generates a D-Bus interface description from a KConfigXT file
macro( kcfg_generate_dbus_interface _kcfg _name )
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_name}.xml
COMMAND ${XSLTPROC_EXECUTABLE} --stringparam interfaceName ${_name}
${KDEPIMLIBS_DATA_DIR}/akonadi-kde/kcfg2dbus.xsl
${_kcfg}
> ${CMAKE_CURRENT_BINARY_DIR}/${_name}.xml
DEPENDS ${KDEPIMLIBS_DATA_DIR}/akonadi-kde/kcfg2dbus.xsl
${_kcfg}
)
endmacro( kcfg_generate_dbus_interface )
endif (XSLTPROC_EXECUTABLE)
if(WIN32)
set(LIB_INSTALL_DIR ${LIB_INSTALL_DIR}
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR} )
endif(WIN32)
set(KDE4_ICON_DIR ${KDE4_INSTALL_DIR}/share/icons)
include_directories(
${KDE4_INCLUDES}
${KDE4_INCLUDES}/kcalcore
${KDEPIMLIBS_INCLUDE_DIRS}
)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" )
########### next target ###############
set( todo_txt_akonadiresource_SRCS
todo_txt_akonadiresource.cpp
)
install( FILES todo_txt_akonadiresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" )
kde4_add_kcfg_files(todo_txt_akonadiresource_SRCS settings.kcfgc)
kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/todo_txt_akonadiresource.kcfg org.kde.Akonadi.todo_txt_akonadi.Settings)
qt4_add_dbus_adaptor(todo_txt_akonadiresource_SRCS
${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.todo_txt_akonadi.Settings.xml settings.h Settings
)
kde4_add_executable(akonadi_todo_txt_akonadi_resource RUN_UNINSTALLED ${todo_txt_akonadiresource_SRCS})
target_link_libraries(akonadi_todo_txt_akonadi_resource ${KDE4_AKONADI_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KCALCORE_LIBS})
install(TARGETS akonadi_todo_txt_akonadi_resource ${INSTALL_TARGETS_DEFAULT_ARGS})