summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-12-29 13:51:21 +0100
committerAndreas Schneider <asn@cryptomilk.org>2011-05-31 19:45:28 +0200
commitdafc2dd4bd95e991ec69a22a729f9e0c79c6ca2e (patch)
tree23ae0aa3029bd0006b879cb51f453728d25bf74f /CMakeLists.txt
parent386504bff3f84b9b106c25f296685ba572fbab20 (diff)
downloadcmocka-dafc2dd4bd95e991ec69a22a729f9e0c79c6ca2e.zip
cmocka-dafc2dd4bd95e991ec69a22a729f9e0c79c6ca2e.tar.gz
cmocka-dafc2dd4bd95e991ec69a22a729f9e0c79c6ca2e.tar.bz2
build: Added CMake build of cmockery.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt48
1 files changed, 48 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..4efade0
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,48 @@
+project(cmockery C)
+
+# Required cmake version
+cmake_minimum_required(VERSION 2.6.0)
+
+# global needed variables
+set(APPLICATION_NAME ${PROJECT_NAME})
+
+set(APPLICATION_VERSION_MAJOR "0")
+set(APPLICATION_VERSION_MINOR "1")
+set(APPLICATION_VERSION_PATCH "2")
+
+set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
+
+# SOVERSION scheme: CURRENT.AGE.REVISION
+# If there was an incompatible interface change:
+# Increment CURRENT. Set AGE and REVISION to 0
+# If there was a compatible interface change:
+# Increment AGE. Set REVISION to 0
+# If the source code was changed, but there were no interface changes:
+# Increment REVISION.
+set(LIBRARY_VERSION "0.0.0")
+set(LIBRARY_SOVERSION "0")
+
+# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
+set(CMAKE_MODULE_PATH
+ ${CMAKE_SOURCE_DIR}/cmake/Modules
+)
+
+# add definitions
+include(DefineCMakeDefaults)
+include(DefinePlatformDefaults)
+include(DefineCompilerFlags)
+include(DefineInstallationPaths)
+#include(DefineOptions.cmake)
+#include(CPackConfig.cmake)
+
+# disallow in-source build
+include(MacroEnsureOutOfSourceBuild)
+macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.")
+
+# config.h checks
+include(ConfigureChecks.cmake)
+configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+
+# check subdirectories
+#add_subdirectory(doc)
+add_subdirectory(src)