1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
4 IF(_TIZEN_FEATURE_PRIORITY_CHANGE)
5 ADD_DEFINITIONS("-DTIZEN_FEATURE_PRIORITY_CHANGE")
6 ENDIF(_TIZEN_FEATURE_PRIORITY_CHANGE)
7 IF(_TIZEN_FEATURE_SET_PERSONALITY_32)
8 ADD_DEFINITIONS("-DTIZEN_FEATURE_SET_PERSONALITY_32")
9 ENDIF(_TIZEN_FEATURE_SET_PERSONALITY_32)
11 ADD_DEFINITIONS("-DSHARE_PREFIX=\"/usr/share/aul\"")
12 ADD_DEFINITIONS("-DLAUNCHPAD_LOG")
13 ADD_DEFINITIONS("-DPRELOAD_ACTIVATE")
14 ADD_DEFINITIONS("-DPREEXEC_ACTIVATE")
15 ADD_DEFINITIONS("-DLIBDIR=\"${CMAKE_INSTALL_LIBDIR}\"")
18 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
19 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
20 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-zdefs")
21 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
22 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdata-sections")
23 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections")
24 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,--gc-sections")
25 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FILE_OFFSET_BITS=64")
26 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
27 SET(CMAKE_C_FLAGS_RELEASE "-O2")
29 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_C_FLAGS} -std=c++17")
30 SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
31 SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
34 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
37 SET(TARGET_APP_DEFINED_LOADER "app-defined-loader")
38 SET(TARGET_LAUNCHPAD "launchpad")
39 SET(TARGET_LAUNCHPAD_COMMON "launchpad-common")
40 SET(TARGET_LAUNCHPAD_HYDRA "launchpad-hydra")
41 SET(TARGET_LAUNCHPAD_LOADER "launchpad-loader")
42 SET(TARGET_LAUNCHPAD_PARSER "launchpad-parser")
43 SET(TARGET_LAUNCHPAD_PROCESS_POOL "launchpad-process-pool")
45 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
46 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")
48 INCLUDE(FindPkgConfig)
49 INCLUDE(ApplyPkgConfig)
51 PKG_CHECK_MODULES(AUL_DEPS REQUIRED aul)
52 PKG_CHECK_MODULES(BUNDLE_DEPS REQUIRED bundle)
53 PKG_CHECK_MODULES(BUXTON2_DEPS REQUIRED buxton2)
54 PKG_CHECK_MODULES(DBUS_DEPS REQUIRED dbus-1)
55 PKG_CHECK_MODULES(DLOG_DEPS REQUIRED dlog)
56 PKG_CHECK_MODULES(DLOG_REDIRECT_STDOUT_DEPS REQUIRED dlog-redirect-stdout)
57 PKG_CHECK_MODULES(ECORE_DEPS REQUIRED ecore)
58 PKG_CHECK_MODULES(ECORE_CORE_DEPS REQUIRED ecore-core)
59 PKG_CHECK_MODULES(ELEMENTARY_DEPS REQUIRED elementary)
60 PKG_CHECK_MODULES(GIO_DEPS REQUIRED gio-2.0)
61 PKG_CHECK_MODULES(INIPARSER_DEPS REQUIRED iniparser)
62 PKG_CHECK_MODULES(LIBCAP_DEPS REQUIRED libcap)
63 PKG_CHECK_MODULES(LIBSMACK_DEPS REQUIRED libsmack)
64 PKG_CHECK_MODULES(LIBSYSTEMD_DEPS REQUIRED libsystemd)
65 PKG_CHECK_MODULES(LIBTZPLATFORM_CONFIG_DEPS REQUIRED libtzplatform-config)
66 PKG_CHECK_MODULES(LIBXML_DEPS REQUIRED libxml-2.0)
67 PKG_CHECK_MODULES(PKGMGR_INSTALLER_DEPS REQUIRED pkgmgr-installer)
68 PKG_CHECK_MODULES(SECURITY_MANAGER_DEPS REQUIRED security-manager)
69 PKG_CHECK_MODULES(TANCHOR_DEPS REQUIRED tanchor)
70 PKG_CHECK_MODULES(TTRACE_DEPS REQUIRED ttrace)
71 PKG_CHECK_MODULES(VCONF_DEPS REQUIRED vconf)
72 PKG_CHECK_MODULES(GMOCK_DEPS REQUIRED gmock)
75 SET(LAUNCHPAD_PROCESS_POOL_UNITTEST launchpad-process-pool-unittest)
76 ADD_TEST(NAME ${LAUNCHPAD_PROCESS_POOL_UNITTEST} COMMAND ${LAUNCHPAD_PROCESS_POOL_UNITTEST}
77 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests/launchpad-process-pool-unittest)
80 ADD_SUBDIRECTORY(tests)