diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2024-08-22 12:55:49 -0600 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2024-10-21 13:56:55 -0400 |
| commit | d8e3001e535fad178c621ff07418f81f25123dc4 (patch) | |
| tree | 54c03cef2f0bdfd9a3b6df4334c81becb63e4993 /lang/rust/CMakeLists.txt | |
| parent | 0e281a30d73c0f31ef9442fef0346779164231ad (diff) | |
Allow multiple high level representations for display, add Pseudo Rust and a Pseudo Python example plugin
Diffstat (limited to 'lang/rust/CMakeLists.txt')
| -rw-r--r-- | lang/rust/CMakeLists.txt | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/lang/rust/CMakeLists.txt b/lang/rust/CMakeLists.txt new file mode 100644 index 00000000..e374d8e9 --- /dev/null +++ b/lang/rust/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.9 FATAL_ERROR) + +project(lang_pseudorust) + +if(NOT BN_INTERNAL_BUILD) + add_subdirectory(${PROJECT_SOURCE_DIR}/../.. ${PROJECT_BINARY_DIR}/api) +endif() + +file(GLOB SOURCES + *.cpp + *.h) + +if(DEMO) + add_library(lang_pseudorust STATIC ${SOURCES}) +else() + add_library(lang_pseudorust SHARED ${SOURCES}) +endif() + +target_include_directories(lang_pseudorust + PRIVATE ${PROJECT_SOURCE_DIR}) + +if(WIN32) + target_link_directories(lang_pseudorust + PRIVATE ${BN_INSTALL_DIR}) + target_link_libraries(lang_pseudorust binaryninjaapi binaryninjacore) +else() + target_link_libraries(lang_pseudorust binaryninjaapi) +endif() + +set_target_properties(lang_pseudorust 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(lang_pseudorust) + set_target_properties(lang_pseudorust PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR} + RUNTIME_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR}) +endif() |
