1 # Copyright (c) 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
16 # @author Aleksander Zdyb <a.zdyb@samsung.com>
19 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
22 OPTION(WITH_TESTS "Build tests" ON)
24 # Check for C++11 support and enable proper compilation flags
25 INCLUDE(CheckCXXCompilerFlag)
26 CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
27 IF(COMPILER_SUPPORTS_CXX11)
28 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
30 CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
31 IF(COMPILER_SUPPORTS_CXX0X)
32 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
34 MESSAGE(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
39 "${CMAKE_INSTALL_PREFIX}/bin"
41 "User executables directory"
45 "${CMAKE_INSTALL_PREFIX}/sbin"
47 "System admin executables directory"
51 "${CMAKE_INSTALL_PREFIX}/etc"
53 "Read-only single-machine data directory"
56 INCLUDE(FindPkgConfig)
58 SET(TARGET_NICE_LAD "nice-lad")
61 ADD_SUBDIRECTORY(conf)
64 SET(TARGET_NICE_LAD_TESTS "nice-lad-tests")
65 ADD_SUBDIRECTORY(tests)