1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(notification C)
4 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
5 SET(EXEC_PREFIX "\${prefix}")
6 SET(LIBDIR ${LIB_INSTALL_DIR})
7 SET(INCLUDEDIR "\${prefix}/include/${PROJECT_NAME}")
9 #ADD_SUBDIRECTORY(test-app)
12 ./src/notification_init.c
15 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
16 AUX_SOURCE_DIRECTORY(src SRCS)
17 LIST(REMOVE_ITEM SRCS ${INIT-SRCS})
19 INCLUDE(FindPkgConfig)
20 pkg_check_modules(pkgs REQUIRED
28 capi-appfw-app-control
29 capi-appfw-package-manager
40 FOREACH(flag ${pkgs_CFLAGS})
41 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
44 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -g -Wall")
45 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
47 SET(CMAKE_SKIP_BUILD_RPATH TRUE)
49 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
50 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${MAJORVER})
51 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${FULLVER})
52 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
54 ADD_EXECUTABLE(notification_init ${INIT-SRCS})
55 TARGET_LINK_LIBRARIES(notification_init ${pkgs_LDFLAGS} notification "-pie")
57 CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
58 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
59 INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
60 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/
61 DESTINATION include/notification
63 PATTERN "*_private.h" EXCLUDE
64 PATTERN "*_group.h" EXCLUDE
65 PATTERN "*_debug.h" EXCLUDE
68 INSTALL(FILES ${CMAKE_BINARY_DIR}/11_notification-add.post DESTINATION ${SYSCONF_INSTALL_DIR}/gumd/useradd.d/)
69 INSTALL(TARGETS notification_init DESTINATION bin)