summaryrefslogtreecommitdiff
path: root/plugins/msvc_rtti/CMakeLists.txt
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2024-10-23 22:10:17 -0400
committerMason Reed <mason@vector35.com>2024-10-24 10:53:22 -0400
commit93e0a64e77169c29960a1cbd9bdedadfeb4a5f7e (patch)
treed2bad13887e0d7f45287690e02236ddffed9a336 /plugins/msvc_rtti/CMakeLists.txt
parent21488f76c5d33485323bccda36ef714453e1aac7 (diff)
Add MSVC RTTI plugin
Adds two commands that must be run manually "MSVC\\Find RTTI" and "MSVC\\Find VFTs" both of which will apply their respective data to the view AND store metadata for scripts to use under the "msvc" key.
Diffstat (limited to 'plugins/msvc_rtti/CMakeLists.txt')
-rw-r--r--plugins/msvc_rtti/CMakeLists.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/plugins/msvc_rtti/CMakeLists.txt b/plugins/msvc_rtti/CMakeLists.txt
new file mode 100644
index 00000000..085f13a3
--- /dev/null
+++ b/plugins/msvc_rtti/CMakeLists.txt
@@ -0,0 +1,46 @@
+cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
+
+project(msvc_rtti)
+
+file(GLOB SOURCES
+ *.cpp
+ *.c
+ *.h)
+
+if(DEMO)
+ add_library(${PROJECT_NAME} STATIC ${SOURCES})
+else()
+ add_library(${PROJECT_NAME} SHARED ${SOURCES})
+endif()
+
+if(NOT BN_INTERNAL_BUILD)
+ # Out-of-tree build
+ find_path(
+ BN_API_PATH
+ NAMES binaryninjaapi.h
+ HINTS ../../.. binaryninjaapi $ENV{BN_API_PATH}
+ REQUIRED
+ )
+ add_subdirectory(${BN_API_PATH} api)
+endif()
+
+target_link_libraries(${PROJECT_NAME} binaryninjaapi)
+
+set_target_properties(${PROJECT_NAME} 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(${PROJECT_NAME})
+ set_target_properties(${PROJECT_NAME} PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR}
+ RUNTIME_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR})
+else()
+ bn_install_plugin(${PROJECT_NAME})
+endif()