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