f98c49e477ae98e392961b1fa4d702f643ce5d7a
[platform/framework/web/crosswalk-tizen.git] / CMakeLists.txt
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.
4
5 # Check minimum CMake version
6 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
7
8 # Project name
9 PROJECT(wrt)
10
11 INCLUDE(FindPkgConfig)
12
13 # Options
14 OPTION(X11_SUPPORT "Support x11 for window manager" OFF)
15 OPTION(WAYLAND_SUPPORT "Support wayland for window manager" OFF)
16
17 # Compiler flags
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")
29
30 ADD_DEFINITIONS("-Wall")
31 ADD_DEFINITIONS("-Wextra")
32 ADD_DEFINITIONS("-Wno-variadic-macros")
33
34 IF(X11_SUPPORT)
35   ADD_DEFINITIONS("-DHAVE_X11")
36 ENDIF(X11_SUPPORT)
37 IF(WAYLAND_SUPPORT)
38   ADD_DEFINITIONS("-DHAVE_WAYLAND")
39 ENDIF(WAYLAND_SUPPORT)
40
41 # Targets names
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")
46
47 # Sub Directories
48 ADD_SUBDIRECTORY(src)