summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorZofia Abramowska <z.abramowska@samsung.com>2014-05-14 18:39:57 +0200
committerZofia Abramowska <z.abramowska@samsung.com>2014-05-22 17:40:33 +0200
commit75eefc778a27ef1bbaa5f25405eda4cfe2afa29c (patch)
tree0e7ef4f49aa5afa1a628dd58c8f839574ed1a83c /CMakeLists.txt
parent4b0983df07687e9a2bf60a2e2cc474b0306bbb2a (diff)
downloadkey-manager-75eefc778a27ef1bbaa5f25405eda4cfe2afa29c.tar.gz
key-manager-75eefc778a27ef1bbaa5f25405eda4cfe2afa29c.tar.bz2
key-manager-75eefc778a27ef1bbaa5f25405eda4cfe2afa29c.zip
Initial commit
Change-Id: I4e7b15fdcfdc4f4fe6c0b9401d30b9dea038866f
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt73
1 files changed, 73 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..e5647df6
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,73 @@
+# Copyright (c) 2011 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
+# @author
+# @brief
+#
+
+############################# Check minimum CMake version #####################
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT("key-manager")
+
+############################# cmake packages ##################################
+
+INCLUDE(FindPkgConfig)
+
+############################# compiler flags ##################################
+
+SET(CMAKE_C_FLAGS_PROFILING "-g -O0 -pg")
+SET(CMAKE_CXX_FLAGS_PROFILING "-g -std=c++0x -O0 -pg")
+SET(CMAKE_C_FLAGS_DEBUG "-g -O0 -ggdb")
+SET(CMAKE_CXX_FLAGS_DEBUG "-g -std=c++0x -O0 -ggdb")
+SET(CMAKE_C_FLAGS_RELEASE "-g -O2")
+SET(CMAKE_CXX_FLAGS_RELEASE "-g -std=c++0x -O2")
+SET(CMAKE_C_FLAGS_CCOV "-g -O2 --coverage")
+SET(CMAKE_CXX_FLAGS_CCOV "-g -std=c++0x -O2 --coverage")
+
+# If supported for the target machine, emit position-independent code,suitable
+# for dynamic linking and avoiding any limit on the size of the global offset
+# table. This option makes a difference on the m68k, PowerPC and SPARC.
+# (BJ: our ARM too?)
+ADD_DEFINITIONS("-fPIC")
+
+# 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
+
+STRING(REGEX MATCH "([^.]*)" API_VERSION "${VERSION}")
+ADD_DEFINITIONS("-DAPI_VERSION=\"$(API_VERSION)\"")
+ADD_DEFINITIONS("-DSMACK_ENABLED")
+
+IF (CMAKE_BUILD_TYPE MATCHES "DEBUG")
+ ADD_DEFINITIONS("-DTIZEN_DEBUG_ENABLE")
+ ADD_DEFINITIONS("-DBUILD_TYPE_DEBUG")
+ENDIF (CMAKE_BUILD_TYPE MATCHES "DEBUG")
+
+SET(TARGET_KEY_MANAGER "key-manager")
+SET(TARGET_KEY_MANAGER_CLIENT "key-manager-client")
+SET(TARGET_KEY_MANAGER_COMMON "key-manager-commons")
+
+INSTALL(FILES
+ ${CMAKE_SOURCE_DIR}/packaging/libkey-manager-client.manifest
+ ${CMAKE_SOURCE_DIR}/packaging/key-manager.manifest
+ DESTINATION
+ /usr/share
+)
+
+ADD_SUBDIRECTORY(src)
+ADD_SUBDIRECTORY(build)
+ADD_SUBDIRECTORY(systemd)