tizen 2.4 release
[framework/web/wrt-commons.git] / build / core / 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 # @file        CMakeLists.txt
16 # @author      Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
17 # @version     1.0
18 # @brief
19 #
20
21 # Check required modules
22 INCLUDE(FindPkgConfig)
23 PKG_CHECK_MODULES(SYS_EFL
24   ecore
25   appcore-efl
26   capi-appfw-application
27   openssl
28   dlog
29   vconf
30   libpcrecpp
31   icu-uc
32   minizip
33   ttrace
34   REQUIRED)
35
36 # Add core include directories
37 INCLUDE_DIRECTORIES(
38     ${DPL_LOG_INCLUDE_DIR}
39     ${DPL_CORE_INCLUDE_DIR}
40     ${WRT_TRACE_INCLUDE_DIR}
41 )
42
43 INCLUDE_DIRECTORIES(SYSTEM ${SYS_EFL_INCLUDE_DIRS})
44
45 LINK_DIRECTORIES(${SYS_EFL_LIBRARY_DIRS})
46
47 # Base EFL based DPL library
48 SET(DPL_EFL_LIBRARY "${PROJECT_NAME}-efl")
49
50 # Build shared library
51 ADD_LIBRARY(${TARGET_DPL_EFL} SHARED
52     ${DPL_CORE_SOURCES}
53     ${DPL_LOG_SOURCES}
54     ${WRT_TRACE_SOURCES}
55 )
56
57 TARGET_LINK_LIBRARIES(${TARGET_DPL_EFL} ${SYS_EFL_LIBRARIES} "-lrt")
58
59 # Target library properties
60 SET_TARGET_PROPERTIES(${TARGET_DPL_EFL} PROPERTIES
61     SOVERSION ${API_VERSION}
62  VERSION ${VERSION}
63     CLEAN_DIRECT_OUTPUT 1
64     OUTPUT_NAME ${DPL_EFL_LIBRARY})
65
66 # Install libraries
67 INSTALL(TARGETS ${TARGET_DPL_EFL}
68         DESTINATION lib)
69
70 # Install detail headers
71 INSTALL(FILES ${DPL_CORE_EFL_DETAIL_HEADERS}
72         DESTINATION include/dpl-efl/dpl)
73
74 # Install core headers
75 INSTALL(FILES ${DPL_CORE_HEADERS}
76         DESTINATION include/dpl-efl/dpl)
77
78 # Install trace headers
79 INSTALL(FILES ${WRT_TRACE_HEADERS}
80         DESTINATION include/dpl-efl)
81
82 # Install log headers
83 INSTALL(FILES ${DPL_LOG_HEADERS}
84         DESTINATION include/dpl-efl/dpl/log)
85
86 # Install pkgconfig script
87 CONFIGURE_AND_INSTALL_PKG(dpl-efl.pc)