1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(calendar-service C CXX)
4 #IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
5 # SET(CMAKE_BUILD_TYPE "Release")
6 #ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
7 #MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
9 SET(DEST_INCLUDE_DIR "include/calendar-svc")
10 SET(SRC_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/include")
12 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
13 SET(EXEC_PREFIX "\${prefix}")
14 SET(LIBDIR "\${prefix}/lib")
15 SET(INCLUDEDIR "\${prefix}/${DEST_INCLUDE_DIR}")
17 SET(VERSION "${VERSION_MAJOR}.1.14")
19 #INCLUDE_DIRECTORIES(${SRC_INCLUDE_DIR})
20 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -I${CMAKE_SOURCE_DIR}/include")
22 INCLUDE(FindPkgConfig)
23 pkg_check_modules(pkgs REQUIRED glib-2.0 sqlite3 vconf dlog db-util alarm-service icu-i18n appsvc bundle)
25 FOREACH(flag ${pkgs_CFLAGS})
26 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
29 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
31 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
32 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
33 #SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
34 #SET(CMAKE_C_FLAGS_RELEASE "-mabi=aapcs-linux -march=armv7-a -msoft-float -O2")
36 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
39 SET(IMMIGRATION "calendar")
40 INSTALL(FILES ${IMMIGRATION}.pc DESTINATION lib/pkgconfig)
42 FILE(GLOB NOTI_FILES ${CMAKE_SOURCE_DIR}/.CALENDAR_SVC_*_CHANGED)
43 INSTALL(FILES ${NOTI_FILES} DESTINATION /opt/usr/data/calendar-svc)
45 ADD_SUBDIRECTORY(schema)
46 ADD_SUBDIRECTORY(client)
47 ADD_SUBDIRECTORY(server)
48 ADD_SUBDIRECTORY(native)