ADD: moved to CMAKE
This commit is contained in:
parent
64703c4c6b
commit
7809e6416b
2
.gitignore
vendored
2
.gitignore
vendored
@ -23,4 +23,4 @@ missing
|
||||
Makefile.in
|
||||
**/*~
|
||||
config.h
|
||||
config.h.in
|
||||
build
|
||||
|
32
CMakeLists.txt
Normal file
32
CMakeLists.txt
Normal file
@ -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
|
||||
)
|
15
Makefile.am
15
Makefile.am
@ -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
|
@ -1,7 +0,0 @@
|
||||
#! /bin/sh
|
||||
(cd libmoolticute-c;./bootstrap.sh) \
|
||||
&& aclocal \
|
||||
&& libtoolize \
|
||||
&& autoheader \
|
||||
&& automake --gnu --add-missing \
|
||||
&& autoconf
|
12
src/config.h.in
Normal file
12
src/config.h.in
Normal file
@ -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
|
@ -23,10 +23,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* @author Dominik Meyer <dmeyer@federationhq.de>
|
||||
* @copyright 2018 by Dominik Meyer
|
||||
*/
|
||||
#include "../libmoolticute-c/src/moolticute.h"
|
||||
#include <moolticute.h>
|
||||
#include "../yaap/src/argparse.h"
|
||||
#include "x11_clipboard.h"
|
||||
#include "../config.h"
|
||||
#include <x11_clipboard.h>
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* @brief get the password of a services and login
|
||||
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* @author Dominik Meyer <dmeyer@federationhq.de>
|
||||
* @copyright 2018 by Dominik Meyer
|
||||
*/
|
||||
#include "../libmoolticute-c/src/moolticute.h"
|
||||
#include <moolticute.h>
|
||||
|
||||
/**
|
||||
* @brief show infos about the mooltipass device
|
||||
|
2
src/ls.c
2
src/ls.c
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* @author Dominik Meyer <dmeyer@federationhq.de>
|
||||
* @copyright 2018 by Dominik Meyer
|
||||
*/
|
||||
#include "../libmoolticute-c/src/moolticute.h"
|
||||
#include <moolticute.h>
|
||||
#include "../yaap/src/argparse.h"
|
||||
|
||||
/**
|
||||
|
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "commands.h"
|
||||
#include <commands.h>
|
||||
#include "../yaap/src/argparse.h"
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* @author Dominik Meyer <dmeyer@federationhq.de>
|
||||
* @copyright 2018 by Dominik Meyer
|
||||
*/
|
||||
#include "x11_clipboard.h"
|
||||
#include <x11_clipboard.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
Loading…
Reference in New Issue
Block a user