ae0fc985bfebc8fa035fee8ceb8b4fad851076cd
[platform/framework/web/wrt.git] / src / plugin-service / 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 # @author   Yunchan Cho (yunchan.cho@samgsung.com)
19 # @version  1.0
20 #
21
22 PKG_CHECK_MODULES(WRT_PLUGIN_DEP
23     wrt-plugin-loading
24     wrt-plugin-js-overlay
25     REQUIRED)
26
27 set(PLUGIN_MODULE_SRC_DIR ${PROJECT_SOURCE_DIR}/src/plugin-service)
28
29 set(PLUGIN_MODULE_SOURCES
30     ${PLUGIN_MODULE_SRC_DIR}/wrt_plugin_module.cpp
31 )
32 ADD_DEFINITIONS(${WRT_PLUGIN_DEP_CFLAGS})
33 INCLUDE_DIRECTORIES(
34     ${PLUGIN_MODULE_SRC_DIR}
35     ${WRT_PLUGIN_DEP_INCLUDE_DIRS}
36 )
37
38 ADD_LIBRARY(${TARGET_PLUGIN_MODULE_LIB} SHARED
39     ${PLUGIN_MODULE_SOURCES}
40 )
41
42 SET_TARGET_PROPERTIES(${TARGET_PLUGIN_MODULE_LIB} PROPERTIES
43     COMPILE_FLAGS -fPIC
44     LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
45 )
46
47 SET_TARGET_PROPERTIES(${TARGET_PLUGIN_MODULE_LIB} PROPERTIES
48     SOVERSION ${PROJECT_API_VERSION}
49     VERSION ${PROJECT_VERSION}
50 )
51
52 target_link_libraries(${TARGET_PLUGIN_MODULE_LIB}
53     ${WRT_PLUGIN_DEP_LIBRARIES}
54 )
55
56 INSTALL(TARGETS ${TARGET_PLUGIN_MODULE_LIB}
57     DESTINATION lib)