-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
64 lines (42 loc) · 1.22 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
cmake_minimum_required(VERSION 3.01)
#TODO: stop if we use vs2015 or older
project(lzma VERSION 19.0
DESCRIPTION "Cross-platform decompiler for scenes.image file."
LANGUAGES C)
set(SOURCES
"src/Alloc.c"
"src/LzFind.c"
"src/LzmaDec.c"
"src/LzmaEnc.c"
"src/LzmaLib.c"
"include/Alloc.h"
"include/LzFind.h"
"include/LzmaDec.h"
"include/LzmaEnc.h"
"include/LzmaLib.h"
"include/7zTypes.h")
if(WIN32)
set(SOURCES ${SOURCES}
"src/win/LzFindMt.c"
"src/win/LzmaLibExports.c"
"src/win/Threads.c"
"include/win/LzFindMt.h"
"include/win/Threads.h"
"src/win/LzmaLib.def"
"src/win/resource.rc")
endif()
# Dodaj źródło do pliku wykonywalnego tego projektu.
add_library (lzma STATIC ${SOURCES})
if (NOT MSVC)
set (CFLAGS " -c -O2 -Wall -fPIC")
target_compile_definitions(lzma PUBLIC _7ZIP_ST)
elseif(MINGW)
set (CFLAGS " -c -O2 -Wall")
endif()
target_precompile_headers(lzma PUBLIC "include/Precomp.h")
target_include_directories(lzma PUBLIC
"${PROJECT_SOURCE_DIR}/include/")
if(WIN32)
target_include_directories(lzma PUBLIC
"${PROJECT_SOURCE_DIR}/include/win")
endif()