diff --git a/.gitignore b/.gitignore
index 7b5dfb3..7c40d38 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,4 +23,4 @@ missing
Makefile.in
**/*~
config.h
-config.h.in
+build
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..2f9a728
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,32 @@
+cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
+project (moolticute-pass VERSION 0.1.0 LANGUAGES C)
+
+include(GNUInstallDirs)
+include(CTest)
+enable_testing()
+
+option(DOXYGEN "Also build the doxygen documentation" OFF)
+
+find_package(Git)
+find_package(Moolticute REQUIRED)
+
+configure_file(${PROJECT_SOURCE_DIR}/src/config.h.in ${PROJECT_SOURCE_DIR}/src/config.h @ONLY)
+
+
+add_executable(moolticute-pass
+ yaap/src/argparse.h
+ yaap/src/argparse.c
+ src/commands.h
+ src/get.c
+ src/info.c
+ src/ls.c
+ #src/x11_clipboard.c
+ #src/x11_clipboard.h
+ src/main.c
+ )
+target_link_libraries(moolticute-pass moolticute)
+
+target_include_directories(moolticute-pass
+ PRIVATE
+ src
+)
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 894d5ad..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-SUBDIRS = libmoolticute-c
-
-bin_PROGRAMS=mpass
-
-mpass_SOURCES = src/get.c
-mpass_SOURCES += yaap/src/argparse.c
-mpass_SOURCES += src/main.c
-mpass_SOURCES += src/ls.c
-mpass_SOURCES += src/info.c
-
-if HAVE_X11
- mpass_SOURCES+=src/x11_clipboard.c
-endif
-
-mpass_LDADD = libmoolticute-c/libmoolticute.a
diff --git a/bootstrap.sh b/bootstrap.sh
deleted file mode 100755
index 52ea12a..0000000
--- a/bootstrap.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#! /bin/sh
-(cd libmoolticute-c;./bootstrap.sh) \
-&& aclocal \
-&& libtoolize \
-&& autoheader \
-&& automake --gnu --add-missing \
-&& autoconf
diff --git a/src/config.h.in b/src/config.h.in
new file mode 100644
index 0000000..da49f18
--- /dev/null
+++ b/src/config.h.in
@@ -0,0 +1,12 @@
+#ifndef __CONFIG_HPP__
+#define __CONFIG_HPP__
+
+#define PROJECT_NAME @PROJECT_NAME@
+
+#define VERSION_MAJOR @PROJECT_VERSION_MAJOR@
+#define VERSION_MINOR @PROJECT_VERSION_MINOR@
+#define VERSION_PATCH @PROJECT_VERSION_PATCH@
+#define PROJECT_VERSION "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@"
+
+
+#endif
diff --git a/src/get.c b/src/get.c
index 66e8500..68eae91 100644
--- a/src/get.c
+++ b/src/get.c
@@ -23,10 +23,10 @@ along with this program. If not, see .
* @author Dominik Meyer
* @copyright 2018 by Dominik Meyer
*/
-#include "../libmoolticute-c/src/moolticute.h"
+#include
#include "../yaap/src/argparse.h"
-#include "x11_clipboard.h"
-#include "../config.h"
+#include
+#include
/**
* @brief get the password of a services and login
diff --git a/src/info.c b/src/info.c
index 3e087be..d12173c 100644
--- a/src/info.c
+++ b/src/info.c
@@ -23,7 +23,7 @@ along with this program. If not, see .
* @author Dominik Meyer
* @copyright 2018 by Dominik Meyer
*/
-#include "../libmoolticute-c/src/moolticute.h"
+#include
/**
* @brief show infos about the mooltipass device
diff --git a/src/ls.c b/src/ls.c
index 82cd96f..69002f7 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -23,7 +23,7 @@ along with this program. If not, see .
* @author Dominik Meyer
* @copyright 2018 by Dominik Meyer
*/
-#include "../libmoolticute-c/src/moolticute.h"
+#include
#include "../yaap/src/argparse.h"
/**
diff --git a/src/main.c b/src/main.c
index 918be26..eefb154 100644
--- a/src/main.c
+++ b/src/main.c
@@ -25,7 +25,7 @@ along with this program. If not, see .
*/
#include
#include
-#include "commands.h"
+#include
#include "../yaap/src/argparse.h"
/**
diff --git a/src/x11_clipboard.c b/src/x11_clipboard.c
index 89c132c..f62eddd 100644
--- a/src/x11_clipboard.c
+++ b/src/x11_clipboard.c
@@ -23,7 +23,7 @@ along with this program. If not, see .
* @author Dominik Meyer
* @copyright 2018 by Dominik Meyer
*/
-#include "x11_clipboard.h"
+#include
#include
#include
#include