-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
74 lines (59 loc) · 1.85 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
# CMakeList.txt : CMake project for vulkan, include source and define
# project specific logic here.
#
cmake_minimum_required (VERSION 3.8)
# Enable Hot Reload for MSVC compilers if supported.
if (POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
endif()
project (vulkan)
# Set our C++ standard
set(CMAKE_CXX_STANDARD 23)
# Include fetch content
include(FetchContent)
# Fetch the latest version of wincpp
FetchContent_Declare (
wincpp
URL https://github.com/atrexus/wincpp/releases/download/v1.4.2/wincpp-src.zip
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
FetchContent_MakeAvailable (wincpp)
# Fetch the latest version of spdlog
FetchContent_Declare (
spdlog
URL https://github.com/gabime/spdlog/archive/refs/tags/v1.15.0.zip
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
FetchContent_MakeAvailable (spdlog)
# Fetch the latest version of argparse
FetchContent_Declare (
argparse
URL https://github.com/p-ranav/argparse/archive/refs/tags/v3.1.zip
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
FetchContent_MakeAvailable (argparse)
# Set the header files.
set (HDR
"include/dumper.hpp"
"include/pe/image.hpp"
"include/pe/section_headers.hpp"
"include/pe/import_directory.hpp"
"include/pe/util.hpp"
)
# Set the source files.
set (SRC
"src/main.cpp"
"src/dumper.cpp"
"src/pe/image.cpp"
"src/pe/section_headers.cpp"
"src/pe/import_directory.cpp"
)
# Add source to this project's executable.
add_executable (vulkan ${SRC} ${HDR})
# Set the include directories.
target_include_directories(vulkan PRIVATE "include")
# Link project dependencies.
target_link_libraries(vulkan PRIVATE wincpp)
target_link_libraries(vulkan PRIVATE spdlog::spdlog)
target_link_libraries(vulkan PRIVATE argparse)