forked from Vector35/arch-armv7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (43 loc) · 1.22 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
51
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
project(arch_armv7)
if((NOT BN_API_PATH) AND (NOT BN_INTERNAL_BUILD))
set(BN_API_PATH $ENV{BN_API_PATH})
if(NOT BN_API_PATH)
message(FATAL_ERROR "Provide path to Binary Ninja API source in BN_API_PATH")
endif()
endif()
if(NOT BN_INTERNAL_BUILD)
add_subdirectory(${BN_API_PATH} ${PROJECT_BINARY_DIR}/api)
endif()
file(GLOB SOURCES
*.cpp
*.h
armv7_disasm/*.c
armv7_disasm/*.h
thumb2_disasm/*.cpp
thumb2_disasm/*.h)
if(DEMO)
add_library(arch_armv7 STATIC ${SOURCES})
else()
add_library(arch_armv7 SHARED ${SOURCES})
endif()
target_include_directories(arch_armv7
PRIVATE ${PROJECT_SOURCE_DIR}
PRIVATE ${PROJECT_SOURCE_DIR}/armv7_disasm
PRIVATE ${PROJECT_SOURCE_DIR}/thumb2_disasm)
target_link_libraries(arch_armv7 binaryninjaapi)
set_target_properties(arch_armv7 PROPERTIES
CXX_STANDARD 17
CXX_VISIBILITY_PRESET hidden
CXX_STANDARD_REQUIRED ON
C_STANDARD 99
C_STANDARD_REQUIRED ON
C_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON
POSITION_INDEPENDENT_CODE ON)
if(BN_INTERNAL_BUILD)
plugin_rpath(arch_armv7)
set_target_properties(arch_armv7 PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR}
RUNTIME_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR})
endif()