Class for managing libvirt containers
[platform/core/security/vasum.git] / CMakeLists.txt
1 # Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
2 #
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
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14 #
15 #
16 # @file   CMakeLists.txt
17 # @author Jan Olszak (j.olszak@samsung.com)
18 #
19
20 CMAKE_MINIMUM_REQUIRED (VERSION 2.6.2)
21 PROJECT(security-containers)
22
23 ## pkgconfig ###################################################################
24 INCLUDE(FindPkgConfig)
25
26 ## File names ##################################################################
27 SET(SERVER_CODENAME "${PROJECT_NAME}-server")
28 SET(CLIENT_CODENAME "${PROJECT_NAME}-client")
29
30
31 ## Generate the pc file ########################################################
32 CONFIGURE_FILE(security-containers.pc.in security-containers.pc @ONLY)
33
34
35 ## Compiler flags, depending on the build type #################################
36 SET(CMAKE_C_FLAGS_PROFILING    "-g -O0 -pg")
37 SET(CMAKE_CXX_FLAGS_PROFILING  "-g -std=c++0x -O0 -pg")
38 SET(CMAKE_C_FLAGS_DEBUG        "-g -O0 -ggdb")
39 SET(CMAKE_CXX_FLAGS_DEBUG      "-g -std=c++0x -O0 -ggdb")
40 SET(CMAKE_C_FLAGS_RELEASE      "-g -O2")
41 SET(CMAKE_CXX_FLAGS_RELEASE    "-g -std=c++0x -O2")
42 SET(CMAKE_C_FLAGS_CCOV         "-g -O2 --coverage")
43 SET(CMAKE_CXX_FLAGS_CCOV       "-g -std=c++0x -O2 --coverage")
44
45 ADD_DEFINITIONS("-fPIC")   # Position Independent Code
46 ADD_DEFINITIONS("-Werror") # Make all warnings into errors.
47 ADD_DEFINITIONS("-Wall")   # Generate all warnings
48 ADD_DEFINITIONS("-Wextra") # Generate even more extra warnings
49
50
51 ## Subdirectories ##############################################################
52 SET(CLIENT_FOLDER ${PROJECT_SOURCE_DIR}/src/client)
53 SET(SERVER_FOLDER ${PROJECT_SOURCE_DIR}/src/server)
54 ADD_SUBDIRECTORY(src)
55
56
57 ## Installations ###############################################################
58 # FILE(MAKE_DIRECTORY /usr/include/security-containers)
59 INSTALL(FILES       ${CLIENT_FOLDER}/include/security-containers-client.h
60         DESTINATION /usr/include/security-containers)
61
62 INSTALL(FILES       ${CMAKE_BINARY_DIR}/security-containers.pc
63         DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)