5f966ded92c343001a2995fe741fda6c00a3c324
[platform/core/connectivity/wifi-direct-manager.git] / plugin / wpasupplicant / ctrl_iface_dbus / CMakeLists.txt
1 # Copyright (c) 2014-2015 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 #
17 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/oem)
18 INCLUDE_DIRECTORIES(PLUGIN_SRCS include)
19
20 SET(PLUGIN_SRCS
21         wfd-plugin-wpasupplicant.c
22         dbus/wfd-plugin-supplicant-dbus.c
23         )
24
25 pkg_check_modules(plugin_pkgs REQUIRED capi-network-wifi-direct glib-2.0 gio-2.0 dlog)
26
27 FOREACH(flag ${plugin_pkgs_CFLAGS})
28         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
29 ENDFOREACH(flag)
30
31 INCLUDE_DIRECTORIES($(plugin_pkgs_INCLUDE_DIRS))
32 LINK_DIRECTORIES($(plugin_pkgs_LIBRARY_DIRS))
33
34 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Werror")
35 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
36 SET(CMAKE_C_FLAGS_RELEASE "-O2")
37
38 # library build
39 ADD_LIBRARY(${PLUGIN} SHARED ${PLUGIN_SRCS})
40 TARGET_LINK_LIBRARIES(${PLUGIN} ${plugin_pkgs_LDFLAGS})
41 #SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0)
42 SET_TARGET_PROPERTIES(${PLUGIN} PROPERTIES PREFIX "" OUTPUT_NAME ${PLUGIN})
43
44 # install
45 INSTALL(TARGETS ${PLUGIN} LIBRARY DESTINATION ${LIB_DIR})