-
Notifications
You must be signed in to change notification settings - Fork 21
/
CMakeLists.txt
50 lines (38 loc) · 1.12 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
cmake_minimum_required(VERSION 3.25)
project(covirt VERSION 0.1.0 LANGUAGES C CXX)
SET(CMAKE_CXX_STANDARD 23)
configure_file(version.h.in version.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_SOURCE_DIR}/covirt)
include(FetchContent)
find_package(Zydis QUIET)
if (NOT Zydis_FOUND)
FetchContent_Declare(
Zydis
GIT_REPOSITORY https://github.com/zyantific/zydis.git
GIT_TAG v4.1.0
)
FetchContent_MakeAvailable(Zydis)
endif()
find_package(LIEF QUIET)
if (NOT LIEF_FOUND)
FetchContent_Declare(
LIEF
GIT_REPOSITORY https://github.com/lief-project/LIEF
GIT_TAG 0.15.1
)
FetchContent_MakeAvailable(LIEF)
endif()
find_package(zasm QUIET)
if (NOT zasm_FOUND)
FetchContent_Declare(
zasm
GIT_REPOSITORY https://github.com/zyantific/zasm
GIT_BRANCH master
)
FetchContent_MakeAvailable(zasm)
endif()
file(GLOB_RECURSE COVIRT_GLOB_SRC CONFIGURE_DEPENDS "covirt/*.cpp")
add_executable(covirt ${COVIRT_GLOB_SRC})
target_link_libraries(covirt LIEF::LIEF Zydis zasm)