# 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 # INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/oem ) IF(TIZEN_ENABLE_PRD) INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/prd/include ) ENDIF(TIZEN_ENABLE_PRD) AUX_SOURCE_DIRECTORY(./ SRCS) SET(SRCS ${SRCS} ${CMAKE_SOURCE_DIR}/oem/wifi-direct-oem.c) IF(TIZEN_ENABLE_PRD) SET(SRCS ${SRCS} ${CMAKE_SOURCE_DIR}/prd/src/wifi-direct-prd.c) ENDIF(TIZEN_ENABLE_PRD) PKG_CHECK_MODULES(daemon_pkgs REQUIRED capi-network-wifi-direct glib-2.0 gio-2.0 gobject-2.0 dlog libnl-3.0 capi-appfw-application vconf aul libsystemd capi-system-info libtzplatform-config ${MDM_REQUIRED_PKGS}) FOREACH(flag ${daemon_pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) INCLUDE_DIRECTORIES($(daemon_pkgs_INCLUDE_DIRS)) LINK_DIRECTORIES($(daemon_pkgs_LIBRARY_DIRS)) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Werror -fPIE") SET(CMAKE_C_FLAGS_DEBUG "O0 -g -fPIE") SET(CMAKE_C_FLAGS_RELEASE "O2 -fPIE") SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie") ADD_EXECUTABLE(${DAEMON} ${SRCS}) TARGET_LINK_LIBRARIES(${DAEMON} ${daemon_pkgs_LDFLAGS} -ldl) INSTALL(TARGETS ${DAEMON} DESTINATION bin)