1 # Copyright 2015 Samsung Electronics Co, Ltd. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # Check minimum CMake version
6 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
11 INCLUDE(FindPkgConfig)
14 OPTION(X11_SUPPORT "Support x11 for window manager" OFF)
15 OPTION(WAYLAND_SUPPORT "Support wayland for window manager" OFF)
18 IF(NOT CMAKE_BUILD_TYPE)
19 SET(CMAKE_BUILD_TYPE "Release")
20 ENDIF(NOT CMAKE_BUILD_TYPE)
21 SET(CMAKE_C_FLAGS_PROFILING "-O2")
22 SET(CMAKE_CXX_FLAGS_PROFILING "-O2 -std=c++0x")
23 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
24 SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -std=c++0x -g")
25 SET(CMAKE_C_FLAGS_RELEASE "-Os")
26 SET(CMAKE_CXX_FLAGS_RELEASE "-Os -std=c++0x -fvisibility-inlines-hidden")
27 SET(CMAKE_C_FLAGS_CCOV "-O0 -g --coverage")
28 SET(CMAKE_CXX_FLAGS_CCOV "-O0 -std=c++0x -g --coverage")
30 ADD_DEFINITIONS("-Wall")
31 ADD_DEFINITIONS("-Wextra")
32 ADD_DEFINITIONS("-Wno-variadic-macros")
35 ADD_DEFINITIONS("-DHAVE_X11")
38 ADD_DEFINITIONS("-DHAVE_WAYLAND")
39 ENDIF(WAYLAND_SUPPORT)
42 SET(TARGET_RUNTIME "wrt")
43 SET(TARGET_COMMON_STATIC "wrt-common-static")
44 SET(TARGET_EXTENSION "wrt-extension")
45 SET(TARGET_INJECTED_BUNDLE "wrt-injected-bundle")