-
Notifications
You must be signed in to change notification settings - Fork 44
/
CMakeLists.txt
35 lines (30 loc) · 1.08 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
cmake_minimum_required(VERSION 3.10)
project(hexagon)
set(CMAKE_CXX_STANDARD 20)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_find")
include(boilerplate)
option(OPT_LOGGING "Build with logging" OFF)
find_package(idasdk REQUIRED)
find_package(gnutools REQUIRED)
add_library(hexagon SHARED hexagon.cpp bfd_funcs.cpp dummy-scan.c)
target_compile_definitions(hexagon PUBLIC __IDP__)
if (OPT_LOGGING)
target_compile_definitions(hexagon PUBLIC TRACELOG)
endif()
target_link_libraries(hexagon idasdk32)
target_link_libraries(hexagon gnutools)
set_target_properties(hexagon PROPERTIES PREFIX "")
if (WIN32)
target_link_options(hexagon PUBLIC -export:LPH)
endif()
add_library(hexagon64 SHARED hexagon.cpp bfd_funcs.cpp dummy-scan.c)
target_compile_definitions(hexagon64 PUBLIC __IDP__)
if (OPT_LOGGING)
target_compile_definitions(hexagon64 PUBLIC TRACELOG)
endif()
target_link_libraries(hexagon64 idasdk64)
target_link_libraries(hexagon64 gnutools)
set_target_properties(hexagon64 PROPERTIES PREFIX "")
if (WIN32)
target_link_options(hexagon64 PUBLIC -export:LPH)
endif()