-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
37 lines (27 loc) · 934 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
37 lines (27 loc) · 934 Bytes
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
cmake_minimum_required(VERSION 3.20)
project(VTableExplorer LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(IDASDK_DIR "" CACHE PATH "Path to IDA SDK root (containing include/ and lib/)")
if(NOT IDASDK_DIR)
message(FATAL_ERROR "IDASDK_DIR must be set. Example: -DIDASDK_DIR=C:/idasdk")
endif()
if(NOT EXISTS "${IDASDK_DIR}/include/ida.hpp")
message(FATAL_ERROR "IDASDK_DIR does not point to a valid IDA SDK: ${IDASDK_DIR}")
endif()
add_library(vtable64 SHARED src/main.cpp)
target_include_directories(vtable64 PRIVATE "${IDASDK_DIR}/include")
target_compile_definitions(vtable64 PRIVATE
__NT__
__EA64__
__X64__
)
if(MSVC)
target_compile_options(vtable64 PRIVATE /EHsc /W3)
endif()
target_link_libraries(vtable64 PRIVATE "${IDASDK_DIR}/lib/x64_win_vc_64/ida.lib")
set_target_properties(vtable64 PROPERTIES
OUTPUT_NAME "vtable64"
SUFFIX ".dll"
PREFIX ""
)