# Copyright (c) 2014-2015 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(capi-network-asp) ############################# cmake packages ################################## INCLUDE(FindPkgConfig) ########################## search for packages ################################ SET(COMMON_DEPS "dlog glib-2.0 gio-2.0 capi-base-common capi-system-info gio-unix-2.0") SET(PC_DEPS "capi-base-common") PKG_CHECK_MODULES(ASP_DEPS REQUIRED ${COMMON_DEPS}) ######################## directory configuration ############################ ############################# compiler flags ################################## FOREACH(flag ${ASP_DEPS_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") SET(CMAKE_C_FLAGS_RELEASE "-O2 -g") # Don't export symbols by default ADD_DEFINITIONS("-fvisibility=hidden") ADD_DEFINITIONS("-DUSE_DLOG") SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIBDIR}") SET(TARGET_ASP "asp") SET(TARGET_ASP_TEST "asp-test") ADD_SUBDIRECTORY(include) ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(pkgconfig) ADD_SUBDIRECTORY(test)