-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
56 lines (47 loc) · 1.13 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
cmake_minimum_required(VERSION 3.22)
set(PATCH_VERSION "1" CACHE INTERNAL "Patch version")
set(PROJECT_VESRION 0.0.${PATCH_VERSION})
project(SHELL_MAKER VERSION ${PROJECT_VESRION})
include_directories(shell_builder)
add_executable(
shell_builder
shell_builder/shell_builder.cpp
shell_builder/main.cpp
)
set_target_properties(
shell_builder
PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
)
if (MSVC)
target_compile_options(shell_builder PRIVATE /W4)
else ()
target_link_options(shell_builder PRIVATE -static-libgcc -static-libstdc++)
target_compile_options(
shell_builder
PRIVATE
-Wall
-Wextra
-pedantic
)
endif()
install(
TARGETS
shell_builder
RUNTIME DESTINATION . COMPONENT release
)
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_COMPONENTS_ALL release)
# CPack area
if (WIN32)
set(CPACK_GENERATOR "ZIP")
else()
set(CPACK_GENERATOR "DEB")
endif()
set(CPACK_PACKAGE_VERSION "0.0.1")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "1")
set(CPACK_PACKAGE_CONTACT https://github.com/4l3x777/shell_maker)
include(CPack)