# # Copyright (C) 2015 - 2020 Samsung Electronics Co., Ltd All Rights Reserved # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # CMAKE_MINIMUM_REQUIRED (VERSION 2.6) PROJECT (nether) INCLUDE (FindPkgConfig) # Set compiler warning flags ADD_DEFINITIONS("-Werror") # Make all warnings into errors. ADD_DEFINITIONS("-Wall") # Generate all warnings ADD_DEFINITIONS("-Wextra") # Generate even more extra warnings IF (CMAKE_BUILD_TYPE MATCHES DEBUG) SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++11") ELSE () SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") ENDIF (CMAKE_BUILD_TYPE MATCHES DEBUG) SET (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) IF (NOT DEFINED SYSCONF_INSTALL_DIR) SET(SYSCONF_INSTALL_DIR "/etc") ENDIF (NOT DEFINED SYSCONF_INSTALL_DIR) IF (NOT DEFINED SYSTEMD_UNIT_DIR) SET(SYSTEMD_UNIT_DIR "${CMAKE_INSTALL_PREFIX}/lib/systemd/system") ENDIF (NOT DEFINED SYSTEMD_UNIT_DIR) ADD_SUBDIRECTORY (src) ADD_SUBDIRECTORY (conf)