7a67b5e49d9c73e9aa6fcde6b750dc4b4b8cf4ba
[platform/framework/web/wrt-plugins-common.git] / src / plugins-api-support / 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   Grzegorz Krawczyk (g.krawczyk@samsung.com)
18 # @version  1.0
19 #
20
21 pkg_search_module(dpl REQUIRED dpl-efl)
22
23 set(PLUGINS_API_SUPPORT_SOURCES
24     ${CMAKE_CURRENT_SOURCE_DIR}/Plugin.cpp
25     ${CMAKE_CURRENT_SOURCE_DIR}/Object.cpp
26     ${CMAKE_CURRENT_SOURCE_DIR}/ObjectFactory.cpp
27     ${CMAKE_CURRENT_SOURCE_DIR}/PluginRegistration.cpp
28     ${CMAKE_CURRENT_SOURCE_DIR}/PluginRegistry.cpp
29 )
30
31 INCLUDE_DIRECTORIES(
32     ${CMAKE_CURRENT_SOURCE_DIR}
33     ${dpl_INCLUDE_DIRS}
34 )
35
36 ADD_LIBRARY(${TARGET_PLUGINS_API_SUPPORT} SHARED
37     ${PLUGINS_API_SUPPORT_SOURCES}
38 )
39
40 SET_TARGET_PROPERTIES(${TARGET_PLUGIN_API_SUPPORT} PROPERTIES
41     COMPILE_FLAGS -fPIC
42     LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
43 )
44
45 SET_TARGET_PROPERTIES(${TARGET_PLUGINS_API_SUPPORT} PROPERTIES
46     SOVERSION ${CMAKE_PROJECT_API_VERSION}
47     VERSION ${CMAKE_PROJECT_VERSION}
48 )
49
50 target_link_libraries(${TARGET_PLUGINS_API_SUPPORT}
51     ${dpl_LIBRARIES}
52 )
53
54 INSTALL(TARGETS ${TARGET_PLUGINS_API_SUPPORT}
55     DESTINATION lib
56     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
57     GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
58 )
59
60 INSTALL(FILES
61     ${CMAKE_CURRENT_SOURCE_DIR}/ExportedApi.h
62     ${CMAKE_CURRENT_SOURCE_DIR}/Plugin.h
63     ${CMAKE_CURRENT_SOURCE_DIR}/IObject.h
64     ${CMAKE_CURRENT_SOURCE_DIR}/ObjectFactory.h
65     ${CMAKE_CURRENT_SOURCE_DIR}/CallbackSupport.h
66     ${CMAKE_CURRENT_SOURCE_DIR}/tuple.h
67     ${CMAKE_CURRENT_SOURCE_DIR}/PluginSignals.h
68     ${CMAKE_CURRENT_SOURCE_DIR}/SignalSignature.h
69     ${CMAKE_CURRENT_SOURCE_DIR}/PluginRegistration.h
70     DESTINATION include/wrt-plugins-api-support)