fbcf48a522c9f502e796dd9454de472cd3923703
[platform/framework/web/wrt-plugins-common.git] / src / plugin-loading / CMakeLists.txt
1 # Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
2 #
3 #    Licensed under the Apache License, Version 2.0 (the "License");
4 #    you may not use this file except in compliance with the License.
5 #    You may obtain a copy of the License at
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #    Unless required by applicable law or agreed to in writing, software
10 #    distributed under the License is distributed on an "AS IS" BASIS,
11 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #    See the License for the specific language governing permissions and
13 #    limitations under the License.
14 #
15
16 # @file     CMakeLists.txt
17 # @author   Lukasz Marek (l.marek@samsung.com)
18 # @version  1.0
19 #
20
21 pkg_search_module(plugin-types REQUIRED wrt-plugins-types)
22 pkg_search_module(dpl REQUIRED dpl-efl)
23 pkg_search_module(dpl-event REQUIRED dpl-event-efl)
24 pkg_search_module(dpl-wrt-dao-ro REQUIRED dpl-wrt-dao-ro)
25 pkg_search_module(webkit2 REQUIRED ewebkit2)
26
27 set(PLUGIN_LOADING_SOURCES
28     ${PLUGIN_LOADING_DIRS}/plugin_logic.cpp
29     ${PLUGIN_LOADING_DIRS}/plugin.cpp
30     ${PLUGIN_LOADING_DIRS}/plugin_model.cpp
31     ${PLUGIN_LOADING_DIRS}/explorer.cpp
32     ${PLUGIN_LOADING_DIRS}/plugin_iframe_support.cpp
33     ${PLUGIN_LOADING_DIRS}/plugin_container_support.cpp
34     ${PLUGIN_LOADING_DIRS}/plugin_property_support.cpp
35     ${PLUGIN_LOADING_DIRS}/javascript_interface.cpp
36     ${PLUGIN_LOADING_DIRS}/js_page_session.cpp
37 )
38
39 INCLUDE_DIRECTORIES(
40     ${PLUGIN_MODULE_SRC_DIR}
41     ${PLUGIN_LOADING_DIRS}
42     ${webkit2_INCLUDE_DIRS}
43     ${plugin-types_INCLUDE_DIRS}
44 )
45
46 ADD_LIBRARY(${TARGET_PLUGIN_LOADING_LIB} SHARED
47     ${PLUGIN_LOADING_SOURCES}
48 )
49
50 SET_TARGET_PROPERTIES(${TARGET_PLUGIN_LOADING_LIB} PROPERTIES
51     COMPILE_FLAGS -fPIC
52     LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
53 )
54
55 SET_TARGET_PROPERTIES(${TARGET_PLUGIN_LOADING_LIB} PROPERTIES
56     SOVERSION ${CMAKE_PROJECT_API_VERSION}
57     VERSION ${CMAKE_PROJECT_VERSION}
58 )
59
60 target_link_libraries(${TARGET_PLUGIN_LOADING_LIB}
61     ${dpl_LIBRARIES}
62     ${dpl-event_LIBRARIES}
63     ${dpl-wrt-dao-ro_LIBRARIES}
64     ${TARGET_COMMONS}
65     ${TARGET_JS_OVERLAY}
66     wrt-plugins-tizen-service-event # static lib
67     wrt-plugins-softkeyboardchange-event       # static lib
68 )
69
70 INSTALL(TARGETS ${TARGET_PLUGIN_LOADING_LIB}
71     DESTINATION lib
72     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
73     GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
74 )
75
76 # For wrt-plugins
77 INSTALL(FILES
78     ${PLUGIN_LOADING_DIRS}/plugin_logic.h
79     ${PLUGIN_LOADING_DIRS}/js_types.h
80     DESTINATION include/wrt-plugin-loading)