/
CMakeLists.txt
82 lines (73 loc) · 2.51 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright (c) 2014-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed in accordance with the terms specified in
# the LICENSE file found in the root directory of this source tree.
function(libcryptsetupMain)
set(library_root "${CMAKE_CURRENT_SOURCE_DIR}/src")
add_library(thirdparty_libcryptsetup
"${library_root}/lib/crypto_backend/pbkdf_check.c"
"${library_root}/lib/crypto_backend/crc32.c"
"${library_root}/lib/crypto_backend/crypto_cipher_kernel.c"
"${library_root}/lib/crypto_backend/crypto_storage.c"
"${library_root}/lib/crypto_backend/crypto_gcrypt.c"
"${library_root}/lib/luks1/af.c"
"${library_root}/lib/luks1/keyencryption.c"
"${library_root}/lib/luks1/keymanage.c"
"${library_root}/lib/loopaes/loopaes.c"
"${library_root}/lib/verity/verity_hash.c"
"${library_root}/lib/verity/verity.c"
"${library_root}/lib/tcrypt/tcrypt.c"
"${library_root}/lib/utils_device.c"
"${library_root}/lib/libdevmapper.c"
"${library_root}/lib/utils_wipe.c"
"${library_root}/lib/utils.c"
"${library_root}/lib/utils_benchmark.c"
"${library_root}/lib/setup.c"
"${library_root}/lib/utils_crypt.c"
"${library_root}/lib/utils_loop.c"
"${library_root}/lib/utils_devpath.c"
"${library_root}/lib/utils_fips.c"
"${library_root}/lib/volumekey.c"
"${library_root}/lib/crypt_plain.c"
"${library_root}/lib/random.c"
"${library_root}/src/utils_tools.c"
"${library_root}/src/utils_password.c"
)
target_compile_definitions(thirdparty_libcryptsetup PRIVATE
DATADIR="/usr/share"
HAVE_CONFIG_H
LIBDIR="/usr/lib"
LOCALEDIR="/usr/share/locale"
PREFIX="/usr"
SYSCONFDIR="/etc"
VERSION="1.7.5"
)
target_compile_options(thirdparty_libcryptsetup PRIVATE
-include config.h
)
target_link_libraries(thirdparty_libcryptsetup PUBLIC
global_c_settings
thirdparty_util-linux
thirdparty_libgcrypt
thirdparty_popt
)
target_link_libraries(thirdparty_libcryptsetup PRIVATE
thirdparty_source_module_warnings
)
target_include_directories(thirdparty_libcryptsetup PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/config"
"${library_root}"
"${library_root}/lib"
"${library_root}/lib/crypto_backend"
"${library_root}/lib/loopaes"
"${library_root}/lib/luks1"
"${library_root}/lib/tcrypt"
"${library_root}/lib/verity"
"${library_root}/src"
)
target_include_directories(thirdparty_libcryptsetup SYSTEM INTERFACE
"${library_root}/lib"
)
endfunction()
libcryptsetupMain()