[Release] wrt_0.8.274
[platform/framework/web/wrt.git] / src / api_new / 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 ADD_LIBRARY(${TARGET_CORE_MODULE_LIB} SHARED
17     ${PROJECT_SOURCE_DIR}/src/api_new/core_module.cpp
18     ${PROJECT_SOURCE_DIR}/src/api_new/runnable_widget_object.cpp
19     ${PROJECT_SOURCE_DIR}/src/api_new/runnable_widget_object_state.cpp
20 )
21
22 SET_TARGET_PROPERTIES(${TARGET_CORE_MODULE_LIB} PROPERTIES
23 #    COMPILE_FLAGS "-include profiling_util.h"
24     OUTPUT_NAME ${TARGET_CORE_MODULE_LIB}
25 )
26
27 PKG_CHECK_MODULES(CORE_MODULE_DEP
28     dpl-efl
29     wrt-popup-wrt-runner
30     REQUIRED
31 )
32
33 PKG_CHECK_MODULES(SYS_CORE_MODULE_DEP
34     libprivilege-control
35     cert-svc
36     REQUIRED
37 )
38
39 INCLUDE_DIRECTORIES(
40     ${CORE_MODULE_DEP_INCLUDE_DIRS}
41     ${CMAKE_CURRENT_SOURCE_DIR}
42 )
43
44 INCLUDE_DIRECTORIES( SYSTEM ${SYS_CORE_MODULE_DEP_INCLUDE_DIRS})
45
46
47 #
48 #Set libraries that should be linked to the file that is linking wrt-core-module
49 #Do not set any static libraries as it will be included in wrt-core-module
50 #
51 SET(WRT_CORE_MODULE_INTERFACE_LIBRARIES
52     ${WRT_ENGINE_DEPS_LIBRARIES}
53     ${SYS_WRT_ENGINE_DEPS_LIBRARIES}
54     ${CORE_MODULE_DEP_LIBRARIES}
55     ${SYS_CORE_MODULE_DEP_LIBRARIES}
56 )
57
58 TARGET_LINK_LIBRARIES(${TARGET_CORE_MODULE_LIB}
59 # include all symbols that could be used by wrt-client or other binaries
60     "-Wl,--whole-archive"
61     ${TARGET_WRT_ENGINE_STATIC}
62     ${TARGET_VIEW_COMMON_LIB_STATIC}
63     "-Wl,--no-whole-archive"
64     ${TARGET_VIEW_MODULE_LIB}
65     ${WRT_CORE_MODULE_INTERFACE_LIBRARIES}
66 )
67
68 SET_TARGET_PROPERTIES(${TARGET_CORE_MODULE_LIB}
69     PROPERTIES
70     LINK_INTERFACE_LIBRARIES "${WRT_CORE_MODULE_INTERFACE_LIBRARIES}"
71 )
72
73 INSTALL(TARGETS ${TARGET_CORE_MODULE_LIB}
74     DESTINATION ${LIB_INSTALL_DIR}/
75     PERMISSIONS OWNER_READ OWNER_WRITE
76     GROUP_READ GROUP_EXECUTE WORLD_READ
77 )
78
79 INSTALL(FILES
80     ${PROJECT_SOURCE_DIR}/src/api_new/core_module.h
81     ${PROJECT_SOURCE_DIR}/src/api_new/i_runnable_widget_object.h
82     ${PROJECT_SOURCE_DIR}/src/api_new/user_delegates.h
83     DESTINATION include/${PROJECT_NAME}
84 )