Release version 0.20.21
[platform/core/appfw/slp-pkgmgr.git] / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
2
3 PROJECT(package-manager)
4
5 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
6 SET(EXEC_PREFIX "\${prefix}")
7 SET(LIBDIR ${LIB_INSTALL_DIR})
8 SET(INCLUDEDIR "\${prefix}/include")
9 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")
10
11 SET(PKGMGR_CLIENT "pkgmgr-client")
12 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-zdefs -fvisibility=hidden -g -Wall -fpic ")
13 SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++17 ")
14 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
15
16 INCLUDE(TizenCommon)
17 INCLUDE_DIRECTORIES(include)
18 INCLUDE(FindPkgConfig)
19 INCLUDE(ApplyPkgConfig)
20
21 PKG_CHECK_MODULES(BUNDLE_DEPS REQUIRED bundle)
22 PKG_CHECK_MODULES(DLOG_DEPS REQUIRED dlog)
23 PKG_CHECK_MODULES(GMOCK_DEPS REQUIRED gmock)
24 PKG_CHECK_MODULES(GLIB_DEPS REQUIRED glib-2.0)
25 PKG_CHECK_MODULES(GIO_DEPS REQUIRED gio-2.0)
26 PKG_CHECK_MODULES(RPC_PORT_DEPS REQUIRED rpc-port)
27 PKG_CHECK_MODULES(PKGMGR_PARSER_DEPS REQUIRED pkgmgr-parser)
28 PKG_CHECK_MODULES(PKGMGR_INFO_DEPS REQUIRED pkgmgr-info)
29 PKG_CHECK_MODULES(INIPARSER_DEPS REQUIRED iniparser)
30 PKG_CHECK_MODULES(XDGMIME_DEPS REQUIRED xdgmime)
31 PKG_CHECK_MODULES(PLATFORM_CONFIG_DEPS REQUIRED libtzplatform-config)
32 PKG_CHECK_MODULES(MINIZIP_DEPS REQUIRED minizip)
33
34 ADD_DEFINITIONS("-DLIBDIR=\"${LIBDIR}\"")
35
36 ADD_SUBDIRECTORY(installer)
37 ADD_SUBDIRECTORY(client)
38 ADD_SUBDIRECTORY(types)
39
40 ENABLE_TESTING()
41 SET(TARGET_PKGMGR_UNIT_TEST "pkgmgr-unit-test")
42 ADD_SUBDIRECTORY(test)