forked from Vector35/platform-mac
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
39 lines (32 loc) · 1005 Bytes
/
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
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
project(platform_mac)
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
${PROJECT_SOURCE_DIR}/*.cpp
${PROJECT_SOURCE_DIR}/*.h)
if(DEMO)
add_library(platform_mac STATIC ${SOURCES})
else()
add_library(platform_mac SHARED ${SOURCES})
endif()
target_link_libraries(platform_mac binaryninjaapi)
set_target_properties(platform_mac PROPERTIES
CXX_STANDARD 17
CXX_VISIBILITY_PRESET hidden
CXX_STANDARD_REQUIRED ON
VISIBILITY_INLINES_HIDDEN ON
POSITION_INDEPENDENT_CODE ON)
if(BN_INTERNAL_BUILD)
plugin_rpath(platform_mac)
set_target_properties(platform_mac PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR}
RUNTIME_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR})
endif()