1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
5 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
6 SET(BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
7 SET(LIBDIR ${LIB_INSTALL_DIR})
8 SET(INCLUDEDIR "\${prefix}/include")
9 SET(EXEC_PREFIX "\${prefix}")
11 ADD_DEFINITIONS("-DSHARE_PREFIX=\"${SHARE_INSTALL_PREFIX}/aul\"")
14 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-zdefs -fvisibility=hidden -g -Wall -Werror -fpic")
15 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
16 SET(CMAKE_C_FLAGS_RELEASE "-O2")
18 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_C_FLAGS} -std=c++14")
19 SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
20 SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
22 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
24 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")
30 SET(TARGET_AUL_UNIT_TEST "aul-unit-test")
32 INCLUDE(FindPkgConfig)
33 INCLUDE(ApplyPkgConfig)
35 PKG_CHECK_MODULES(BUNDLE_DEPS REQUIRED bundle)
36 PKG_CHECK_MODULES(CAPI_SYSTEM_INFO_DEPS REQUIRED capi-system-info)
37 PKG_CHECK_MODULES(DLOG_DEPS REQUIRED dlog)
38 PKG_CHECK_MODULES(GIO_DEPS REQUIRED gio-2.0)
39 PKG_CHECK_MODULES(GLIB_DEPS REQUIRED glib-2.0)
40 PKG_CHECK_MODULES(GMOCK_DEPS REQUIRED gmock)
41 PKG_CHECK_MODULES(INIPARSER_DEPS REQUIRED iniparser)
42 PKG_CHECK_MODULES(LIBSMACK_DEPS REQUIRED libsmack)
43 PKG_CHECK_MODULES(LIBTZPLATFORM_CONFIG_DEPS REQUIRED libtzplatform-config)
44 PKG_CHECK_MODULES(LIBXML_DEPS REQUIRED libxml-2.0)
45 PKG_CHECK_MODULES(PKGMGR_INFO_DEPS REQUIRED pkgmgr-info)
46 PKG_CHECK_MODULES(PKGMGR_INSTALLER_DEPS REQUIRED pkgmgr-installer)
47 PKG_CHECK_MODULES(SQLITE3_DEPS REQUIRED sqlite3)
48 PKG_CHECK_MODULES(STORAGE_DEPS REQUIRED storage)
49 PKG_CHECK_MODULES(TTRACE_DEPS REQUIRED ttrace)
50 PKG_CHECK_MODULES(UUID_DEPS REQUIRED uuid)
51 PKG_CHECK_MODULES(VCONF_DEPS REQUIRED vconf)
52 PKG_CHECK_MODULES(XDGMIME_DEPS REQUIRED xdgmime)
56 AUX_SOURCE_DIRECTORY(src SRCS)
57 AUX_SOURCE_DIRECTORY(aul AUL_SRCS)
58 AUX_SOURCE_DIRECTORY(aul/api AUL_API_SRCS)
59 AUX_SOURCE_DIRECTORY(aul/app_manager AUL_APP_MANAGER_SRCS)
60 AUX_SOURCE_DIRECTORY(aul/common AUL_COMMON_SRCS)
61 AUX_SOURCE_DIRECTORY(aul/socket AUL_SOCKET_SRCS)
63 ADD_LIBRARY(${TARGET_AUL} SHARED
67 ${AUL_APP_MANAGER_SRCS}
72 TARGET_INCLUDE_DIRECTORIES(${TARGET_AUL} PUBLIC
73 ${CMAKE_CURRENT_SOURCE_DIR}
74 ${CMAKE_CURRENT_SOURCE_DIR}/include
75 ${CMAKE_CURRENT_SOURCE_DIR}/include/internal
76 ${CMAKE_CURRENT_SOURCE_DIR}/aul/
77 ${CMAKE_CURRENT_SOURCE_DIR}/aul/api
78 ${CMAKE_CURRENT_SOURCE_DIR}/aul/app_manager
79 ${CMAKE_CURRENT_SOURCE_DIR}/aul/common
80 ${CMAKE_CURRENT_SOURCE_DIR}/aul/socket
83 SET_TARGET_PROPERTIES(${TARGET_AUL} PROPERTIES SOVERSION ${MAJORVER})
84 SET_TARGET_PROPERTIES(${TARGET_AUL} PROPERTIES VERSION ${FULLVER})
86 APPLY_PKG_CONFIG(${TARGET_AUL} PUBLIC
94 LIBTZPLATFORM_CONFIG_DEPS
105 INSTALL(TARGETS ${TARGET_AUL} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
108 CONFIGURE_FILE(aul.pc.in aul.pc @ONLY)
109 CONFIGURE_FILE(feature/preexec_list.txt.in feature/preexec_list.txt @ONLY)
111 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/aul.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
112 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/feature/preexec_list.txt DESTINATION ${SHARE_INSTALL_PREFIX}/aul )
113 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/miregex DESTINATION ${SHARE_INSTALL_PREFIX}/aul )
114 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/aul.conf DESTINATION /etc/dbus-1/system.d)
115 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include/aul/
119 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/aul/api/ DESTINATION include/aul/api/
125 ADD_SUBDIRECTORY(tool)
126 ADD_SUBDIRECTORY(parser)
127 ADD_SUBDIRECTORY(test)