summaryrefslogtreecommitdiff
path: root/notes/CMakeLists.txt
blob: dcc8fac1afefcc5476c28faddf12be708992ff18 (plain)
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
project(akonadi-notes)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
cmake_minimum_required(VERSION 2.6)

# only available from cmake-2.8.0
if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7)
    cmake_policy(SET CMP0012 NEW)
endif()

# only available from cmake-2.8.4
if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
    ${CMAKE_PATCH_VERSION} GREATER 3)
    cmake_policy(SET CMP0017 NEW)
endif()

find_package(Qt4 4.6.0 REQUIRED)

include_directories(${QT_INCLUDES})

include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_CURRENT_BINARY_DIR}
)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -UQT_NO_CAST_FROM_ASCII -UQT_NO_CAST_TO_ASCII ${KDE4_ENABLE_EXCEPTIONS}")

set(akonadinotes_LIB_SRC
  noteutils.cpp
)
add_library(calendaring-akonadi-notes ${LIBRARY_TYPE} ${akonadinotes_LIB_SRC})

target_link_libraries(calendaring-akonadi-notes calendaring-kmime
${QT_QTXML_LIBRARY} ${QT_QTGUI_LIBRARY})

set_target_properties(calendaring-akonadi-notes PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})

install(TARGETS calendaring-akonadi-notes EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})

install( FILES
  noteutils.h
  akonadi-notes_export.h
  DESTINATION ${INCLUDE_INSTALL_DIR}/akonadi/notes COMPONENT Devel
)

# add_subdirectory(tests)