Fix invalid licenses
[platform/framework/web/crosswalk-tizen.git] / src / runtime / 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 # Package Dependencies
18 IF(X11_SUPPORT)
19   SET(WIN_PKG "ecore-x")
20 ENDIF(X11_SUPPORT)
21 IF(WAYLAND_SUPPORT)
22   SET(WIN_PKG "ecore-wayland")
23 ENDIF(WAYLAND_SUPPORT)
24
25 PKG_CHECK_MODULES(TARGET_RUNTIME_DEPS
26   dlog
27   ${WIN_PKG}
28   elementary
29   capi-appfw-application
30   chromium-efl
31   efl-assist
32   deviced
33   ecore
34   notification
35   REQUIRED
36 )
37
38 FIND_PACKAGE(Boost REQUIRED system filesystem)
39
40 # Include Directories
41 SET(TARGET_RUNTIME_INCS
42   ${BASE_SRCDIR}
43   ${TARGET_RUNTIME_DEPS_INCLUDE_DIRS}
44 )
45
46 # Libraries
47 SET(TARGET_RUNTIME_LIBS
48   ${TARGET_RUNTIME_DEPS_LIBRARIES}
49   ${Boost_LIBRARIES}
50 )
51
52 # Source Files
53 SET(TARGET_RUNTIME_SRCS
54   ${BASE_SRCDIR}/runtime/main.cc
55   ${BASE_SRCDIR}/runtime/native_window.cc
56   ${BASE_SRCDIR}/runtime/native_app_window.cc
57   ${BASE_SRCDIR}/runtime/web_application.cc
58   ${BASE_SRCDIR}/runtime/runtime.cc
59   ${BASE_SRCDIR}/runtime/web_view.cc
60   ${BASE_SRCDIR}/runtime/web_view_impl.cc
61   ${BASE_SRCDIR}/runtime/vibration_manager.cc
62   ${BASE_SRCDIR}/runtime/notification_manager.cc
63   ${BASE_SRCDIR}/runtime/popup.cc
64   ${BASE_SRCDIR}/runtime/popup_string.cc
65 )
66
67 # Compiler Flags
68 SET(TARGET_RUNTIME_CFLAGS
69   "-fPIE"
70 )
71
72 # Linker Flags
73 SET(TARGET_RUNTIME_LDFLAGS
74   "-pie"
75 )
76
77 # Build Executable
78 INCLUDE_DIRECTORIES(${TARGET_RUNTIME_INCS})
79 ADD_DEFINITIONS(${TARGET_RUNTIME_CFLAGS})
80 ADD_EXECUTABLE(${TARGET_RUNTIME} ${TARGET_RUNTIME_SRCS})
81 TARGET_LINK_LIBRARIES(${TARGET_RUNTIME}
82   ${TARGET_RUNTIME_LIBS}
83   ${TARGET_COMMON_STATIC}
84   ${TARGET_EXTENSION_STATIC}
85   ${TARGET_RUNTIME_LDFLAGS}
86 )
87
88 # Install
89 INSTALL(TARGETS ${TARGET_RUNTIME} DESTINATION bin)
90
91 # EDC Build
92 ADD_CUSTOM_COMMAND(
93     OUTPUT ${BASE_SRCDIR}/runtime/wrt.edj
94     COMMAND edje_cc
95     ARGS  ${BASE_SRCDIR}/runtime/wrt.edc
96           ${BASE_SRCDIR}/runtime/wrt.edj
97     DEPENDS ${BASE_SRCDIR}/runtime/wrt.edc
98 )
99 ADD_CUSTOM_TARGET(WRT_EDJE ALL
100     DEPENDS ${BASE_SRCDIR}/runtime/wrt.edj
101 )
102 INSTALL(FILES
103     ${BASE_SRCDIR}/runtime/wrt.edj
104     DESTINATION share/edje/wrt/
105 )