1 # Copyright (c) 2014-2015 Samsung Electronics Co., Ltd All Rights Reserved
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 # @file CMakeLists.txt
17 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/oem)
18 INCLUDE_DIRECTORIES(PLUGIN_SRCS include)
21 wfd-plugin-wpasupplicant.c
22 dbus/wfd-plugin-supplicant-dbus.c
25 pkg_check_modules(plugin_pkgs REQUIRED capi-network-wifi-direct glib-2.0 gio-2.0 dlog)
27 FOREACH(flag ${plugin_pkgs_CFLAGS})
28 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
31 INCLUDE_DIRECTORIES($(plugin_pkgs_INCLUDE_DIRS))
32 LINK_DIRECTORIES($(plugin_pkgs_LIBRARY_DIRS))
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")
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})
45 INSTALL(TARGETS ${PLUGIN} LIBRARY DESTINATION ${LIB_DIR})