-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+# Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# @file CMakeLists.txt
+#
+
+############################# Check minimum CMake version #####################
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
PROJECT(wifi-direct C)
+SET(PACKAGE_DESCRIPTION "Library and header files for Wi-Fi Direct Native API")
+
+############################# cmake packages ##################################
+
+INCLUDE(FindPkgConfig)
-#SET(PREFIX $(CMAKE_INSTALL_PREFIX))
-SET(prefix "/usr")
-SET(EXEC_PREFIX "\${prefix}")
-SET(LIBDIR "\${prefix}/lib")
-SET(INCLUDEDIR "\${prefix}/include")
+SET(COMMON_DEPS "dlog glib-2.0 gio-2.0 vconf capi-system-info")
+SET(PC_DEPS "capi-base-common")
-SET(dependents "capi-base-common")
-SET(pc_dependents "capi-base-common")
-#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror -fprofile-arcs -ftest-coverage")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror")
+SET(TARGET_WIFI_DIRECT "wifi-direct")
+SET(TARGET_WIFI_DIRECT_TEST "wifi_direct_test")
+ADD_SUBDIRECTORY(include)
+ADD_SUBDIRECTORY(pkgconfig)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(test)