mirror of
https://github.com/NaC-L/Mergen.git
synced 2026-05-12 09:40:34 +00:00
85 lines
2.7 KiB
TOML
85 lines
2.7 KiB
TOML
[cmake]
|
|
version = "3.16"
|
|
cmkr-include = "cmake/cmkr.cmake;"
|
|
|
|
[project]
|
|
name = "Mergen"
|
|
|
|
[conditions]
|
|
windows = "WIN32"
|
|
testmode = "DEFINED MERGEN_TEST"
|
|
|
|
|
|
[variables]
|
|
CMAKE_MODULE_PATH = "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
|
|
CMAKE_CXX_FLAGS_DEBUG = "-O0 -gfull"
|
|
|
|
[fetch-content.linux-pe]
|
|
git = "https://github.com/can1357/linux-pe"
|
|
tag = "be6d1f6"
|
|
|
|
|
|
[find-package.Iced-Wrapper]
|
|
|
|
[fetch-content.Zydis]
|
|
condition = "ICED_NOT_FOUND"
|
|
git = "https://github.com/zyantific/zydis"
|
|
tag = "v4.1.0"
|
|
|
|
[fetch-content.magic_enum]
|
|
git = "https://github.com/Neargye/magic_enum"
|
|
tag = "a413fcc"
|
|
|
|
|
|
[find-package.LLVM-Wrapper]
|
|
|
|
|
|
[target.lifter]
|
|
type = "executable"
|
|
sources = ["lifter/core/*.cpp", "lifter/analysis/*.cpp", "lifter/test/*.cpp"]
|
|
headers = [
|
|
"lifter/core/*.h", "lifter/core/*.hpp",
|
|
"lifter/semantics/*.hpp", "lifter/semantics/*.ipp",
|
|
"lifter/disasm/*.h", "lifter/disasm/*.hpp",
|
|
"lifter/memory/*.h", "lifter/memory/*.hpp", "lifter/memory/*.ipp",
|
|
"lifter/analysis/*.h", "lifter/analysis/*.hpp", "lifter/analysis/*.ipp",
|
|
"lifter/test/*.h", "lifter/test/*.hpp"
|
|
]
|
|
include-directories = ["lifter/core", "lifter/semantics", "lifter/disasm", "lifter/memory", "lifter/analysis", "lifter/test"]
|
|
link-libraries = ["LLVM-Wrapper", "linux-pe", "magic_enum"]
|
|
ICED_NOT_FOUND.link-libraries = ["Zydis"]
|
|
ICED_FOUND.link-libraries = ["Iced_Wrapper"]
|
|
windows.link-libraries = ["Ws2_32"]
|
|
compile-features = ["cxx_std_20"]
|
|
testmode.compile-definitions = ["MERGEN_TEST"]
|
|
windows.compile-options = [
|
|
"$<$<BOOL:${MSVC}>:/EHsc>",
|
|
"$<$<AND:$<BOOL:${MSVC}>,$<NOT:$<CXX_COMPILER_ID:Clang>>>:/Zc:preprocessor>"
|
|
]
|
|
|
|
|
|
# rewrite_microtests is a clone of lifter with MERGEN_TEST always defined.
|
|
# cmkr lacks target inheritance, so fields are duplicated — keep in sync with [target.lifter].
|
|
[target.rewrite_microtests]
|
|
type = "executable"
|
|
sources = ["lifter/core/*.cpp", "lifter/analysis/*.cpp", "lifter/test/*.cpp"]
|
|
headers = [
|
|
"lifter/core/*.h", "lifter/core/*.hpp",
|
|
"lifter/semantics/*.hpp", "lifter/semantics/*.ipp",
|
|
"lifter/disasm/*.h", "lifter/disasm/*.hpp",
|
|
"lifter/memory/*.h", "lifter/memory/*.hpp", "lifter/memory/*.ipp",
|
|
"lifter/analysis/*.h", "lifter/analysis/*.hpp", "lifter/analysis/*.ipp",
|
|
"lifter/test/*.h", "lifter/test/*.hpp"
|
|
]
|
|
include-directories = ["lifter/core", "lifter/semantics", "lifter/disasm", "lifter/memory", "lifter/analysis", "lifter/test"]
|
|
link-libraries = ["LLVM-Wrapper", "linux-pe", "magic_enum"]
|
|
ICED_NOT_FOUND.link-libraries = ["Zydis"]
|
|
ICED_FOUND.link-libraries = ["Iced_Wrapper"]
|
|
windows.link-libraries = ["Ws2_32"]
|
|
compile-features = ["cxx_std_20"]
|
|
compile-definitions = ["MERGEN_TEST"]
|
|
windows.compile-options = [
|
|
"$<$<BOOL:${MSVC}>:/EHsc>",
|
|
"$<$<AND:$<BOOL:${MSVC}>,$<NOT:$<CXX_COMPILER_ID:Clang>>>:/Zc:preprocessor>"
|
|
]
|