passwordfile/CMakeLists.txt

65 lines
1.8 KiB
CMake
Raw Permalink Normal View History

cmake_minimum_required(VERSION 3.17.0 FATAL_ERROR)
2015-12-05 22:50:00 +01:00
# set meta data
project(passwordfile)
set(META_PROJECT_NAME ${PROJECT_NAME})
set(META_PROJECT_VARNAME PASSWORD_FILE)
set(META_APP_NAME "Passwordfile library")
set(META_APP_AUTHOR "Martchus")
set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
set(META_APP_DESCRIPTION "C++ library to read/write passwords from/to encrypted files")
set(META_VERSION_MAJOR 5)
set(META_VERSION_MINOR 0)
2024-02-04 20:42:27 +01:00
set(META_VERSION_PATCH 11)
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
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)
set(TEST_SRC_FILES tests/utils.h tests/passwordfiletests.cpp tests/entrytests.cpp tests/fieldtests.cpp
tests/opensslrandomdevice.cpp 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
option(COMPILE_AES_SOURCES "compile AES sources" OFF)
if (COMPILE_AES_SOURCES)
list(APPEND HEADER_FILES aes/aes.h)
list(APPEND SRC_FILES aes/aes.cpp)
endif ()
# find c++utilities
set(CONFIGURATION_PACKAGE_SUFFIX
""
2019-03-13 19:08:30 +01:00
CACHE STRING "sets the suffix for find_package() calls to packages configured via c++utilities")
find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.14.0 REQUIRED)
2019-03-13 19:08:30 +01:00
use_cpp_utilities(VISIBILITY PUBLIC)
2016-07-22 01:36:23 +02:00
# find 3rd party libraries
include(3rdParty)
2019-03-13 19:08:30 +01:00
use_zlib()
use_crypto()
use_standard_filesystem()
# 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)