summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-02-19 00:06:20 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2011-02-19 00:06:20 +0100
commit876d6f498bbf358a23b47edaf8b0d967724b1b94 (patch)
tree01f50dcb0fc680bbad756f6d4d2bf8a9e791530e /CMakeLists.txt
parent9bfdbb1d569eea229fd9f10823891234c8676145 (diff)
downloadk8055-876d6f498bbf358a23b47edaf8b0d967724b1b94.zip
k8055-876d6f498bbf358a23b47edaf8b0d967724b1b94.tar.gz
libk8055 uses cmake
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt37
1 files changed, 37 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..d64eeca
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,37 @@
+#
+# CMAKE SETUP
+#
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+#
+# PROJECT INFO
+#
+PROJECT(libk8055)
+SET(VERSION_MAJOR "0")
+SET(VERSION_MINOR "4")
+SET(VERSION_PATCH "2")
+SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
+ADD_DEFINITIONS(-DVERSION="${VERSION}")
+#
+# CONFIG OPTIONS
+#
+OPTION(WANT_DEBUG "build with debug information" OFF)
+IF(WANT_DEBUG)
+ SET(CMAKE_BUILD_TYPE Debug)
+ELSE()
+ SET(CMAKE_BUILD_TYPE Release)
+ENDIF()
+SET(CMAKE_CXX_FLAGS "-O2 -fno-implement-inlines")
+SET(CMAKE_CXX_FLAGS_RELEASE "")
+SET(CMAKE_CXX_FLAGS_DEBUG "-g ")
+#
+# HEADER LIBRARY FUNCTIONS
+#
+INCLUDE(CheckIncludeFiles)
+INCLUDE(CheckLibraryExists)
+CHECK_INCLUDE_FILES(usb.h HAVE_USB_H)
+CHECK_INCLUDE_FILES(string.h HAVE_STRING_H)
+CHECK_INCLUDE_FILES(stdio.h HAVE_STDIO_H)
+CHECK_INCLUDE_FILES(assert.h HAVE_ASSERT_H)
+CHECK_INCLUDE_FILES(math.h HAVE_MATH_H)
+ADD_SUBDIRECTORY(libk8055)
+#