-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
112 lines (103 loc) · 2.35 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
cmake_minimum_required (VERSION 3.15)
project (lzma C)
include(GNUInstallDirs)
set(CMAKE_DEBUG_POSTFIX "d")
set(LZMA_SOURCES
src/7zAlloc.c
src/7zArcIn.c
src/7zBuf.c
src/7zBuf2.c
src/7zCrc.c
src/7zCrcOpt.c
src/7zDec.c
src/7zFile.c
src/7zStream.c
src/Aes.c
src/AesOpt.c
src/Alloc.c
src/Bcj2.c
src/Bcj2Enc.c
src/Bra.c
src/Bra86.c
src/BraIA64.c
src/CpuArch.c
src/Delta.c
src/DllSecur.c
src/LzFind.c
src/LzFindMt.c
src/Lzma2Dec.c
src/Lzma2DecMt.c
src/Lzma2Enc.c
src/Lzma86Dec.c
src/Lzma86Enc.c
src/LzmaDec.c
src/LzmaEnc.c
src/LzmaLib.c
src/MtCoder.c
src/MtDec.c
src/Ppmd7.c
src/Ppmd7Dec.c
src/Ppmd7Enc.c
src/Sha256.c
src/Sort.c
src/Threads.c
src/Xz.c
src/XzCrc64.c
src/XzCrc64Opt.c
src/XzDec.c
src/XzEnc.c
src/XzIn.c)
set(LZMA_HEADERS
src/7z.h
src/7zAlloc.h
src/7zBuf.h
src/7zCrc.h
src/7zFile.h
src/7zTypes.h
src/7zVersion.h
src/Aes.h
src/Alloc.h
src/Bcj2.h
src/Bra.h
src/Compiler.h
src/CpuArch.h
src/Delta.h
src/DllSecur.h
src/LzFind.h
src/LzFindMt.h
src/LzHash.h
src/Lzma2Dec.h
src/Lzma2DecMt.h
src/Lzma2Enc.h
src/Lzma86.h
src/LzmaDec.h
src/LzmaEnc.h
src/LzmaLib.h
src/MtCoder.h
src/MtDec.h
src/Ppmd.h
src/Ppmd7.h
src/Precomp.h
src/RotateDefs.h
src/Sha256.h
src/Sort.h
src/Threads.h
src/Xz.h
src/XzCrc64.h
src/XzEnc.h)
add_library(${PROJECT_NAME} ${LZMA_SOURCES} ${LZMA_HEADERS})
set_target_properties(${PROJECT_NAME} PROPERTIES
LINKER_LANGUAGE C
PUBLIC_HEADER "${LZMA_HEADERS}")
# configure the LZMAConfig.cmake file
set(CONF_LIBRARIES ${PROJECT_NAME}d)
configure_file(LZMAConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LZMAConfig.dbg.cmake" @ONLY)
set(CONF_LIBRARIES ${PROJECT_NAME})
configure_file(LZMAConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LZMAConfig.rel.cmake" @ONLY)
install(
TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}d
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/lzma"
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LZMAConfig.dbg.cmake" RENAME LZMAConfig.cmake CONFIGURATIONS Debug DESTINATION lib/cmake/lzma)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LZMAConfig.rel.cmake" RENAME LZMAConfig.cmake CONFIGURATIONS Release DESTINATION lib/cmake/lzma)