summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 00408a5436d7cf64419ad1b5bfdf4f5c6c8d8cb3 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wl,--no-undefined" )

set(LIBCALENDARING_VERSION_MAJOR 0)
set(LIBCALENDARING_VERSION_MINOR 1)

set(KDE_NON_GENERIC_LIB_VERSION ${LIBCALENDARING_VERSION_MAJOR}.${LIBCALENDARING_VERSION_MINOR})
set(KDE_NON_GENERIC_LIB_SOVERSION ${LIBCALENDARING_VERSION_MAJOR})

set(ECM_VERSION_STRING ${LIBCALENDARING_VERSION_MAJOR}.${LIBCALENDARING_VERSION_MINOR})
set(ECM_SOVERSION ${LIBCALENDARING_VERSION_MAJOR})

set(GENERIC_LIB_VERSION ${LIBCALENDARING_VERSION_MAJOR}.${LIBCALENDARING_VERSION_MINOR})
set(GENERIC_LIB_SOVERSION ${LIBCALENDARING_VERSION_MAJOR})

add_definitions(-DKDE_NO_DBUS)
add_definitions(-DKDE_NO_TIMEZONED)

include_directories(./)
include_directories(kdecore/localization)
include_directories(kdecore)
include_directories(kdecore/config)
include_directories(kdecore/date)
include_directories(kdecore/io)
include_directories(kdecore/jobs)
include_directories(kdecore/kernel)
include_directories(kdecore/network)
include_directories(kdecore/services)
include_directories(kdecore/sycoca)
include_directories(kdecore/text)
include_directories(kdecore/util)

set(LIBRARY_TYPE SHARED)

set(LIB_INSTALL_DIR lib CACHE STRING "The directories where to install libraries to")
set(INCLUDE_INSTALL_DIR include CACHE STRING "The directories where to install headers to")
set(INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_DIR}/calendaring)
set(INSTALL_TARGETS_DEFAULT_ARGS  RUNTIME DESTINATION ${BIN_INSTALL_DIR}
                                LIBRARY DESTINATION ${LIB_INSTALL_DIR}
                                ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
)
# set(CMAKE_AUTOMOC ON)

add_subdirectory(kdecore)
add_subdirectory(kmime)
add_subdirectory(kcalcore)
add_subdirectory(kimap)
add_subdirectory(kabc)
add_subdirectory(notes)
add_subdirectory(kpimutils)
add_subdirectory(kcalutils)

install( FILES kdemacros.h
 DESTINATION ${INCLUDE_INSTALL_DIR}  COMPONENT Devel)

# set(static_libs ${CMAKE_CURRENT_BINARY_DIR}/kdecore/libcalendaring-kdecore.a
# ${CMAKE_CURRENT_BINARY_DIR}/kmime/libcalendaring-kmime
# ${CMAKE_CURRENT_BINARY_DIR}/kcalcore/libcalendaring-kcalcore
# ${CMAKE_CURRENT_BINARY_DIR}/kimap/libcalendaring-kimap
# )
# set(libs calendaring-kdecore
#         calendaring-kmime
#         calendaring-kcalcore
#         calendaring-kimap
# )
# 
# add_library(calendaring SHARED dummy.cpp)
# set_target_properties(calendaring PROPERTIES STATIC_LIBRARY_FLAGS "${CMAKE_CURRENT_BINARY_DIR}/kdecore/libcalendaring-kdecore.a ${CMAKE_CURRENT_BINARY_DIR}/kmime/libcalendaring-kmime.a ${CMAKE_CURRENT_BINARY_DIR}/kcalcore/libcalendaring-kcalcore.a ${CMAKE_CURRENT_BINARY_DIR}/kimap/libcalendaring-kimap.a")
# target_link_libraries(calendaring LINK_INTERFACE_LIBRARIES ${libs} )
# target_link_libraries(calendaring ${libs})
# message("${libs}")
# include(MergeStaticLibraries)
# MERGE_STATIC_LIBS(calendaring ${libs})