[Release] wrt-commons_0.2.139
[framework/web/wrt-commons.git] / build / encryption / 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      Soyoung Kim (sy037.kim@samsung.com)
17 # @version     1.0
18 # @brief
19 #
20
21 # Check required modules
22 INCLUDE(FindPkgConfig)
23 PKG_CHECK_MODULES(SYS_ENCRYPTION
24     dlog
25     openssl
26     cryptsvc
27     dukgenerator
28     REQUIRED
29 )
30
31 # Add core include directories
32 INCLUDE_DIRECTORIES(
33     ${DPL_LOG_INCLUDE_DIR}
34     ${DPL_CORE_INCLUDE_DIR}
35     ${DPL_DB_INCLUDE_DIR}
36     ${DPL_ENCRYPTION_INCLUDE_DIR}
37 )
38
39 INCLUDE_DIRECTORIES(SYSTEM ${SYS_ENCRYPTION_INCLUDE_DIRS})
40
41 LINK_DIRECTORIES(
42     ${SYS_ENCRYPTION_LIBRARY_DIRS}
43 )
44
45 # Base EFL based DPL library
46 SET(DPL_ENCRYPTION_LIBRARY "${PROJECT_NAME}-encryption")
47
48 # Build shared library
49
50 ADD_LIBRARY(${TARGET_DPL_ENCRYPTION} SHARED
51     ${DPL_ENCRYPTION_SOURCES}
52 )
53
54 TARGET_LINK_LIBRARIES(${TARGET_DPL_ENCRYPTION}
55     ${SYS_ENCRYPTION_LIBRARIES}
56     ${TARGET_DPL_EFL}
57 )
58
59 # Target library properties
60 SET_TARGET_PROPERTIES(${TARGET_DPL_ENCRYPTION} PROPERTIES
61     SOVERSION ${API_VERSION}
62  VERSION ${VERSION}
63     CLEAN_DIRECT_OUTPUT 1
64     OUTPUT_NAME ${DPL_ENCRYPTION_LIBRARY})
65
66 # Install libraries
67 INSTALL(TARGETS ${TARGET_DPL_ENCRYPTION}
68         DESTINATION lib)
69
70 # Install detail headers
71
72 INSTALL(FILES ${DPL_ENCRYPTION_HEADERS}
73         DESTINATION include/dpl-efl/dpl/encryption)
74
75 # Install pkgconfig script
76 configure_and_install_pkg(dpl-encryption.pc)