Commit 57d89288 authored by David Jarvie's avatar David Jarvie
Browse files

Update for use in kdepimlibs

parent b7c64795
project(kalarmcal)
# The library version should be the same as that returned by
# KAEvent::currentCalendarVersion() (see kaevent.cpp)
set(LIB_VERSION 2.7.0)
set(LIB_SOVERSION 2)
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5955)
############### Build Options ###############
# KALARM_USE_KRESOURCES - builds to use KResources instead of Akonadi
#option(KALARM_USE_KRESOURCES "Build to use KResources" OFF)
if(NOT KALARM_USE_AKONADI)
add_definitions(-DUSE_KRESOURCES)
endif(NOT KALARM_USE_AKONADI)
option(KALARM_USE_KRESOURCES "Build to use KResources" OFF)
########### next target ###############
set(kalarm_calendar_LIB_SRCS
kacalendar.cpp
karecurrence.cpp
alarmtext.cpp
identities.cpp
kaevent.cpp
datetime.cpp
repetition.cpp
version.cpp
)
set(kalarmcal_LIB_SRCS
kacalendar.cpp
karecurrence.cpp
alarmtext.cpp
identities.cpp
kaevent.cpp
datetime.cpp
repetition.cpp
version.cpp
)
if(NOT KALARM_USE_KRESOURCES)
set(kalarm_calendar_LIB_SRCS ${kalarm_calendar_LIB_SRCS}
set(kalarmcal_LIB_SRCS ${kalarmcal_LIB_SRCS}
collectionattribute.cpp
compatibilityattribute.cpp
eventattribute.cpp
)
)
endif(NOT KALARM_USE_KRESOURCES)
kde4_add_library(kalarm_calendar ${LIBRARY_TYPE} ${kalarm_calendar_LIB_SRCS})
kde4_add_library(kalarmcal ${LIBRARY_TYPE} ${kalarmcal_LIB_SRCS})
if(KALARM_USE_KRESOURCES)
target_link_libraries(kalarm_calendar ${KDEPIMLIBS_KCAL_LIBS} ${KDEPIMLIBS_KPIMIDENTITIES_LIBS} ${KDEPIMLIBS_KHOLIDAYS_LIBS})
target_link_libraries(kalarm_calendar LINK_INTERFACE_LIBRARIES ${KDEPIMLIBS_KCAL_LIBS} ${KDEPIMLIBS_KPIMIDENTITIES_LIBS} ${KDEPIMLIBS_KHOLIDAYS_LIBS})
target_link_libraries(kalarmcal
${KDEPIMLIBS_KCAL_LIBS}
${KDEPIMLIBS_KPIMIDENTITIES_LIBS}
${KDEPIMLIBS_KHOLIDAYS_LIBS}
)
else(KALARM_USE_KRESOURCES)
target_link_libraries(kalarm_calendar ${KDEPIMLIBS_AKONADI_LIBS} ${KDEPIMLIBS_KCALCORE_LIBS} ${KDEPIMLIBS_KPIMIDENTITIES_LIBS} ${KDEPIMLIBS_KHOLIDAYS_LIBS})
target_link_libraries(kalarm_calendar LINK_INTERFACE_LIBRARIES ${KDEPIMLIBS_AKONADI_LIBS} ${KDEPIMLIBS_KCAL_LIBS} ${KDEPIMLIBS_KPIMIDENTITIES_LIBS} ${KDEPIMLIBS_KHOLIDAYS_LIBS})
target_link_libraries(kalarmcal
${KDEPIMLIBS_AKONADI_LIBS}
${KDEPIMLIBS_KCALCORE_LIBS}
${KDEPIMLIBS_KPIMIDENTITIES_LIBS}
${KDEPIMLIBS_KHOLIDAYS_LIBS}
)
endif(KALARM_USE_KRESOURCES)
set_target_properties(kalarm_calendar PROPERTIES
VERSION ${GENERIC_LIB_VERSION}
SOVERSION ${GENERIC_LIB_SOVERSION}
set_target_properties(kalarmcal PROPERTIES
VERSION ${LIB_VERSION}
SOVERSION ${LIB_SOVERSION}
)
install(TARGETS kalarmcal EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES
alarmtext.h
datetime.h
identities.h
kacalendar.h
kaevent.h
kalarmcal_export.h
karecurrence.h
kcalcore_constptr.h
repetition.h
version.h
DESTINATION ${INCLUDE_INSTALL_DIR}/kalarmcal
COMPONENT Devel
)
install(TARGETS kalarm_calendar ${INSTALL_TARGETS_DEFAULT_ARGS})
if(NOT KALARM_USE_KRESOURCES)
install(FILES
collectionattribute.h
compatibilityattribute.h
eventattribute.h
DESTINATION ${INCLUDE_INSTALL_DIR}/kalarmcal
COMPONENT Devel
)
endif(NOT KALARM_USE_KRESOURCES)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment