1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(ma-dependency-default)
4 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
5 SET(PACKAGE ${PROJECT_NAME})
7 SET(CMAKE_SKIP_BUILD_RPATH TRUE)
10 ${CMAKE_SOURCE_DIR}/inc
14 SET(DDPKG_CHECK_MODULES
18 capi-appfw-app-manager
19 capi-network-connection
21 capi-media-sound-manager
27 INCLUDE(FindPkgConfig)
28 pkg_check_modules(ddpkgs REQUIRED ${DDPKG_CHECK_MODULES})
29 MESSAGE("Modules : ${DDPKG_CHECK_MODULES}")
31 IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
32 SET(CMAKE_BUILD_TYPE "Release")
33 ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
34 MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
36 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
37 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
40 src/dependency_default.cpp
41 src/dependency_default_audio.cpp
42 src/dependency_default_button.cpp
45 FOREACH(flag ${ddpkgs_CFLAGS})
46 SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
51 SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} -fPIC -Wall" )
52 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro -fPIC -std=c++11 -fvisibility=hidden")
53 SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
55 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS} )
58 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ddpkgs_LDFLAGS} -ldl ${EXTRA_LDFLAGS})
59 MESSAGE("LDFLAG : ${ddpkgs_LDFLAGS}")
60 INSTALL(FILES ${CMAKE_SOURCE_DIR}/plugins/wakeup-manager/dependency-default/lib${PACKAGE}.so DESTINATION ${TZ_SYS_RO_SHARE}/multiassistant/)