Revert "[Temporary] skip ewk_shutdown"
[platform/framework/web/nwrt.git] / CMakeLists.txt
1 #
2 # Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3 #
4 #    Licensed under the Apache License, Version 2.0 (the "License");
5 #    you may not use this file except in compliance with the License.
6 #    You may obtain a copy of the License at
7 #
8 #        http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #    Unless required by applicable law or agreed to in writing, software
11 #   distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #    See the License for the specific language governing permissions and
14 #    limitations under the License.
15 #
16
17 # Check minimum CMake version
18 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
19
20 # Project name
21 PROJECT(wrt)
22
23 INCLUDE(FindPkgConfig)
24
25 # Options
26 OPTION(X11_SUPPORT "Support x11 for window manager" OFF)
27 OPTION(WAYLAND_SUPPORT "Support wayland for window manager" OFF)
28 OPTION(PLUGIN_LAZY_LOADING "Support plugins lazy loading" ON)
29
30 # Compiler flags
31 IF(NOT CMAKE_BUILD_TYPE)
32     SET(CMAKE_BUILD_TYPE "Release")
33 ENDIF(NOT CMAKE_BUILD_TYPE)
34 SET(CMAKE_C_FLAGS_PROFILING    "-O2")
35 SET(CMAKE_CXX_FLAGS_PROFILING  "-O2 -std=c++0x")
36 SET(CMAKE_C_FLAGS_DEBUG        "-O0 -g")
37 SET(CMAKE_CXX_FLAGS_DEBUG      "-O0 -std=c++0x -g")
38 SET(CMAKE_C_FLAGS_RELEASE      "-Os")
39 SET(CMAKE_CXX_FLAGS_RELEASE    "-Os -std=c++0x -fvisibility-inlines-hidden")
40 SET(CMAKE_C_FLAGS_CCOV         "-O0 -g --coverage")
41 SET(CMAKE_CXX_FLAGS_CCOV       "-O0 -std=c++0x -g --coverage")
42
43 ADD_DEFINITIONS("-Wall")
44 ADD_DEFINITIONS("-Wextra")
45 ADD_DEFINITIONS("-Wno-variadic-macros")
46
47 IF(X11_SUPPORT)
48   ADD_DEFINITIONS("-DHAVE_X11")
49 ENDIF(X11_SUPPORT)
50 IF(WAYLAND_SUPPORT)
51   ADD_DEFINITIONS("-DHAVE_WAYLAND")
52 ENDIF(WAYLAND_SUPPORT)
53
54 IF(PLUGIN_LAZY_LOADING)
55   ADD_DEFINITIONS("-DPLUGIN_LAZY_LOADING")
56 ENDIF(PLUGIN_LAZY_LOADING)
57
58 IF(NOT EXTENSION_PATH)
59   SET(EXTENSION_PATH ${LIB_INSTALL_DIR}/tizen-extensions-crosswalk)
60 ENDIF(NOT EXTENSION_PATH)
61 ADD_DEFINITIONS("-DEXTENSION_PATH=\"${EXTENSION_PATH}\"")
62
63 IF(NOT INJECTED_BUNDLE_PATH)
64   SET(INJECTED_BUNDLE_PATH ${LIB_INSTALL_DIR}/libwrt-injected-bundle.so)
65 ENDIF(NOT INJECTED_BUNDLE_PATH)
66 ADD_DEFINITIONS("-DINJECTED_BUNDLE_PATH=\"${INJECTED_BUNDLE_PATH}\"")
67
68 # Targets names
69 SET(TARGET_RUNTIME  "wrt")
70 SET(TARGET_COMMON_STATIC "wrt-common-static")
71 SET(TARGET_EXTENSION_STATIC "wrt-extension-static")
72 SET(TARGET_INJECTED_BUNDLE "wrt-injected-bundle")
73 SET(TARGET_WIDGET_PLUGIN "widget-plugin")
74
75 # Sub Directories
76 ADD_SUBDIRECTORY(src)
77 ADD_SUBDIRECTORY(po)
78 ADD_SUBDIRECTORY(tests)