Change plugin path to %{_libdir}/dpm/plguins
[platform/core/security/dpm-auth.git] / plugin / CMakeLists.txt
1 #
2 # Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 SET(TARGET "dpm-plugin-auth")
17
18 SET(PLUGIN_SOURCES  password.cpp
19                                         password-manager.cpp
20 )
21
22 SET(DEPENDENCY      klay
23                                         dpm-pil
24                                         auth-fw-admin
25 )
26
27 PKG_CHECK_MODULES(PLUGIN_DEPS REQUIRED ${DEPENDENCY})
28
29 SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,noexecstack")
30
31 ADD_LIBRARY(${TARGET} SHARED ${PLUGIN_SOURCES})
32 SET_TARGET_PROPERTIES(${TARGET} PROPERTIES COMPILE_FLAGS "-fvisibility=default")
33 INCLUDE_DIRECTORIES(SYSTEM ${PLUGIN_DEPS_INCLUDE_DIRS})
34 TARGET_LINK_LIBRARIES(${TARGET} ${PLUGIN_DEPS_LIBRARIES})
35
36 INSTALL(FILES libdpm-plugin-auth.so RENAME auth DESTINATION ${PLUGIN_INSTALL_DIR})