2015-12-05 22:50:00 +01:00
|
|
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
|
2015-12-08 08:36:00 +01:00
|
|
|
# add project files
|
|
|
|
set(HEADER_FILES
|
|
|
|
io/cryptoexception.h
|
|
|
|
io/entry.h
|
|
|
|
io/field.h
|
|
|
|
io/parsingexception.h
|
|
|
|
io/passwordfile.h
|
|
|
|
util/openssl.h
|
2019-02-06 18:02:40 +01:00
|
|
|
util/opensslrandomdevice.h)
|
2015-12-08 08:36:00 +01:00
|
|
|
set(SRC_FILES
|
|
|
|
io/cryptoexception.cpp
|
|
|
|
io/entry.cpp
|
|
|
|
io/field.cpp
|
|
|
|
io/parsingexception.cpp
|
|
|
|
io/passwordfile.cpp
|
|
|
|
util/openssl.cpp
|
2019-02-06 18:02:40 +01:00
|
|
|
util/opensslrandomdevice.cpp)
|
|
|
|
set(TEST_HEADER_FILES)
|
2016-02-28 01:07:58 +01:00
|
|
|
set(TEST_SRC_FILES
|
2018-06-09 22:24:03 +02:00
|
|
|
tests/utils.h
|
2016-02-28 01:07:58 +01:00
|
|
|
tests/passwordfiletests.cpp
|
2018-06-09 21:18:36 +02:00
|
|
|
tests/entrytests.cpp
|
2018-06-09 22:24:03 +02:00
|
|
|
tests/fieldtests.cpp
|
2018-06-09 19:47:50 +02:00
|
|
|
tests/opensslrandomdevice.cpp
|
2019-02-06 18:02:40 +01:00
|
|
|
tests/opensslutils.cpp)
|
2015-12-08 08:36:00 +01:00
|
|
|
|
2019-02-06 18:02:40 +01:00
|
|
|
set(DOC_FILES README.md)
|
2016-06-10 23:18:21 +02:00
|
|
|
|
2015-12-05 22:50:00 +01:00
|
|
|
# meta data
|
|
|
|
set(META_PROJECT_NAME passwordfile)
|
2016-04-16 00:51:17 +02:00
|
|
|
set(META_PROJECT_VARNAME PASSWORD_FILE)
|
2015-12-05 22:50:00 +01:00
|
|
|
set(META_APP_NAME "Passwordfile library")
|
|
|
|
set(META_APP_AUTHOR "Martchus")
|
|
|
|
set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
2016-07-22 01:36:23 +02:00
|
|
|
set(META_APP_DESCRIPTION "C++ library to read/write passwords from/to encrypted files")
|
2018-12-18 23:17:19 +01:00
|
|
|
set(META_VERSION_MAJOR 4)
|
|
|
|
set(META_VERSION_MINOR 0)
|
2019-02-17 17:07:11 +01:00
|
|
|
set(META_VERSION_PATCH 1)
|
2016-11-08 20:02:31 +01:00
|
|
|
set(META_PUBLIC_SHARED_LIB_DEPENDS c++utilities)
|
|
|
|
set(META_PUBLIC_STATIC_LIB_DEPENDS c++utilities_static)
|
2019-01-13 22:30:54 +01:00
|
|
|
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
|
2015-12-05 22:50:00 +01:00
|
|
|
|
2016-04-16 00:51:17 +02:00
|
|
|
# find c++utilities
|
2019-01-13 22:30:54 +01:00
|
|
|
find_package(c++utilities 4.17.0 REQUIRED)
|
2016-04-16 00:51:17 +02:00
|
|
|
use_cpp_utilities()
|
|
|
|
|
2016-07-22 01:36:23 +02:00
|
|
|
# find 3rd party libraries
|
|
|
|
include(3rdParty)
|
2016-08-19 16:17:26 +02:00
|
|
|
# zlib
|
2019-02-06 18:02:40 +01:00
|
|
|
use_external_library_from_package(z ZLIB ANY_VERSION ZLIB_INCLUDE_DIRS ZLIB_LIBRARIES AUTO_LINKAGE REQUIRED)
|
2016-08-19 16:17:26 +02:00
|
|
|
# crypto library from OpenSSL
|
2019-02-06 18:02:40 +01:00
|
|
|
use_external_library_from_package(crypto
|
|
|
|
OpenSSL
|
|
|
|
ANY_VERSION
|
|
|
|
OPENSSL_INCLUDE_DIR
|
|
|
|
OPENSSL_CRYPTO_LIBRARY
|
|
|
|
AUTO_LINKAGE
|
|
|
|
REQUIRED)
|
2016-04-16 00:51:17 +02:00
|
|
|
|
|
|
|
# include modules to apply configuration
|
|
|
|
include(BasicConfig)
|
|
|
|
include(WindowsResources)
|
|
|
|
include(LibraryTarget)
|
|
|
|
include(TestTarget)
|
2016-06-10 23:18:21 +02:00
|
|
|
include(Doxygen)
|
2016-07-27 21:40:22 +02:00
|
|
|
include(ConfigHeader)
|