6590a16f43aa6f5b338e7189cefb89a363d98ec3
[platform/framework/web/crosswalk-tizen.git] / src / bundle / 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 # Dependencies
6 PKG_CHECK_MODULES(TARGET_INJECTED_BUNDLE_DEPS REQUIRED
7   dlog
8   glib-2.0
9   gio-2.0
10   uuid
11   elementary
12   chromium-efl
13 )
14
15 # Include Directories
16 SET(TARGET_INJECTED_BUNDLE_INCS
17   ${BASE_SRCDIR}
18   ${TARGET_INJECTED_BUNDLE_DEPS_INCLUDE_DIRS}
19 )
20
21 # Libraries
22 SET(TARGET_INJECTED_BUNDLE_LIBS
23   ${TARGET_INJECTED_BUNDLE_DEPS_LIBRARIES}
24 )
25
26 # Source Files
27 SET(TARGET_INJECTED_BUNDLE_SRCS
28   ${BASE_SRCDIR}/bundle/injected_bundle.cc
29   ${BASE_SRCDIR}/bundle/extension_renderer_controller.cc
30   ${BASE_SRCDIR}/bundle/extension_client.cc
31   ${BASE_SRCDIR}/bundle/extension_module.cc
32   ${BASE_SRCDIR}/bundle/module_system.cc
33   ${BASE_SRCDIR}/bundle/runtime_ipc_client.cc
34   ${BASE_SRCDIR}/bundle/xwalk_v8tools_module.cc
35 )
36
37 # Compiler Flags
38 SET(TARGET_INJECTED_BUNDLE_CFLAGS
39   "-fPIC"
40 )
41
42 # Linker Flags
43 SET(TARGET_INJECTED_BUNDLE_LDFLAGS
44   "-ldl"
45 )
46
47 INCLUDE_DIRECTORIES(${TARGET_INJECTED_BUNDLE_INCS})
48 ADD_DEFINITIONS(${TARGET_INJECTED_BUNDLE_CFLAGS})
49 ADD_LIBRARY(${TARGET_INJECTED_BUNDLE} SHARED
50   ${TARGET_INJECTED_BUNDLE_SRCS}
51 )
52 TARGET_LINK_LIBRARIES(${TARGET_INJECTED_BUNDLE}
53   ${TARGET_INJECTED_BUNDLE_LIBS}
54   ${TARGET_COMMON_STATIC}
55   ${TARGET_INJECTED_BUNDLE_LDFLAGS}
56 )
57
58 SET_TARGET_PROPERTIES(${TARGET_INJECTED_BUNDLE} PROPERTIES
59     COMPILE_FLAGS -fPIC)
60 SET_TARGET_PROPERTIES(${TARGET_INJECTED_BUNDLE} PROPERTIES
61     LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
62     OUTPUT_NAME ${TARGET_INJECTED_BUNDLE}
63 )
64
65 INSTALL(TARGETS ${TARGET_INJECTED_BUNDLE}
66     DESTINATION ${LIB_INSTALL_DIR}
67     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
68     GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
69 )