upload tizen1.0 source
[framework/web/wrt-commons.git] / build / db / 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      Lukasz Marek (l.marek@samsung.com)
17 # @version     1.0
18 # @brief
19 #
20
21 # Check required modules
22 INCLUDE(FindPkgConfig)
23 PKG_CHECK_MODULES(SYS_EFL_DB
24     sqlite3
25     db-util
26     REQUIRED)
27
28 # Add core include directories
29 INCLUDE_DIRECTORIES(
30     ${DPL_LOG_INCLUDE_DIR}
31     ${DPL_CORE_INCLUDE_DIR}
32     ${DPL_DB_INCLUDE_DIR}
33     ${SYS_EFL_INCLUDE_DIRS})
34
35 LINK_DIRECTORIES(
36     ${SYS_EFL_DB_LIBRARY_DIRS}
37 )
38
39 # Base EFL based DPL library
40 SET(DPL_EFL_DB_LIBRARY "${PROJECT_NAME}-db-efl")
41
42 # Build shared library
43
44 ADD_LIBRARY(${TARGET_DPL_DB_EFL} SHARED  ${DPL_DB_SOURCES})
45
46 TARGET_LINK_LIBRARIES(${TARGET_DPL_DB_EFL}
47     ${SYS_EFL_DB_LIBRARIES}
48     ${TARGET_DPL_EFL}
49 )
50
51 # Target library properties
52 SET_TARGET_PROPERTIES(${TARGET_DPL_DB_EFL} PROPERTIES
53     SOVERSION ${API_VERSION} 
54  VERSION ${VERSION}
55     CLEAN_DIRECT_OUTPUT 1
56     OUTPUT_NAME ${DPL_EFL_DB_LIBRARY})
57
58 # Install libraries
59 INSTALL(TARGETS ${TARGET_DPL_DB_EFL}
60         DESTINATION lib)
61
62 # Install detail headers
63 INSTALL(FILES ${DPL_DB_HEADERS}
64         DESTINATION include/dpl-efl/dpl/db)
65
66 # Install pkgconfig script
67 configure_and_install_pkg(dpl-db-efl.pc)