Skip to content

Commit

Permalink
Fix building background_task example plugin on headless
Browse files Browse the repository at this point in the history
  • Loading branch information
emesare committed May 23, 2024
1 parent 304969e commit 7e1e001
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions examples/background_task/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ 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})
add_library(background_task SHARED
src/backgroundtask.cpp)

if(NOT BN_API_BUILD_EXAMPLES AND NOT BN_INTERNAL_BUILD)
# Out-of-tree build
Expand All @@ -19,7 +16,8 @@ if(NOT BN_API_BUILD_EXAMPLES AND NOT BN_INTERNAL_BUILD)
add_subdirectory(${BN_API_PATH} api)
endif()

target_link_libraries(background_task binaryninjaui)
target_link_libraries(${PROJECT_NAME}
binaryninjaapi)

set_target_properties(background_task PROPERTIES
CXX_STANDARD 17
Expand All @@ -29,8 +27,4 @@ set_target_properties(background_task PROPERTIES
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})

0 comments on commit 7e1e001

Please sign in to comment.