-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcmake.toml
40 lines (37 loc) · 1.19 KB
/
cmake.toml
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
# Reference: https://build-cpp.github.io/cmkr/cmake-toml
[project]
name = "EfiCMake"
cmake-before = """
set(CMAKE_CONFIGURATION_TYPES "Release" CACHE STRING "")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG:FULL /INCREMENTAL:NO" CACHE STRING "")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/DEBUG:FULL /INCREMENTAL:NO" CACHE STRING "")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS- /EHs-")
"""
cmake-after = """
set(CMAKE_EXECUTABLE_SUFFIX ".efi")
"""
[fetch-content.edk2]
url = "https://github.com/tianocore/edk2/archive/refs/tags/edk2-stable202205.tar.gz"
sha256 = "E6CF93BAE78B30A10732B8AFB5CC438735DC9EC976AE65D12DAB041C18BB7987"
# Hacky thing just for the bootkit
[target.edk2_headers]
alias = "edk2::headers"
type = "interface"
include-directories = [
"${edk2_SOURCE_DIR}/MdePkg/Include",
"${edk2_SOURCE_DIR}/MdePkg/Include/X64",
]
msvc.link-options = [
"/NODEFAULTLIB",
"/ENTRY:EfiEntry",
"/SUBSYSTEM:EFI_APPLICATION",
"/MANIFESTUAC:NO",
"/DYNAMICBASE:NO",
"/NXCOMPAT:NO",
]
compile-features = ["cxx_std_17"]
[target.EfiCMake]
type = "executable"
sources = ["src/EfiCMake/*.cpp", "src/EfiCMake/*.hpp"]
link-libraries = ["edk2::headers"]