summaryrefslogtreecommitdiff
path: root/examples/background_task/CMakeLists.txt
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2024-05-22 20:06:24 -0400
committerMason Reed <mason@vector35.com>2024-05-22 20:22:44 -0400
commitdff192e3bd6d5737633a740988c31e4ecba92998 (patch)
tree39dfd844e8c35c0af37e917f97abeabf568c8d72 /examples/background_task/CMakeLists.txt
parent331d226464fb043a12eada4f4c752d8ef20c5efb (diff)
Add background task example plugin
Clarify BackgroundTask functionality (skip-note, skip-ci) Providing clear documentation so it is understood that background tasks do not manage the execution of said the task. Add background_task plugin to examples section
Diffstat (limited to 'examples/background_task/CMakeLists.txt')
-rw-r--r--examples/background_task/CMakeLists.txt36
1 files changed, 36 insertions, 0 deletions
diff --git a/examples/background_task/CMakeLists.txt b/examples/background_task/CMakeLists.txt
new file mode 100644
index 00000000..36e012b0
--- /dev/null
+++ b/examples/background_task/CMakeLists.txt
@@ -0,0 +1,36 @@
+cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
+
+project(background_task CXX C)
+
+file(GLOB SOURCES
+ src/*.cpp
+ src/*.h)
+
+add_library(background_task SHARED ${SOURCES})
+
+if(NOT BN_API_BUILD_EXAMPLES AND 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(background_task binaryninjaui)
+
+set_target_properties(background_task PROPERTIES
+ CXX_STANDARD 17
+ CXX_VISIBILITY_PRESET hidden
+ CXX_STANDARD_REQUIRED ON
+ VISIBILITY_INLINES_HIDDEN ON
+ POSITION_INDEPENDENT_CODE ON
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/bin)
+
+if(BN_INTERNAL_BUILD)
+ ui_plugin_rpath(background_task)
+endif()
+
+bn_install_plugin(${PROJECT_NAME})