diff options
Diffstat (limited to 'examples/workflows')
| -rw-r--r-- | examples/workflows/inliner/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | examples/workflows/objectivec/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | examples/workflows/tailcall/CMakeLists.txt | 11 |
3 files changed, 33 insertions, 0 deletions
diff --git a/examples/workflows/inliner/CMakeLists.txt b/examples/workflows/inliner/CMakeLists.txt index c42d580e..0a271d4b 100644 --- a/examples/workflows/inliner/CMakeLists.txt +++ b/examples/workflows/inliner/CMakeLists.txt @@ -9,6 +9,17 @@ file(GLOB SOURCES add_library(workflow_inliner SHARED ${SOURCES}) +if(NOT BN_API_BUILD_EXAMPLES) + # Out-of-tree build + find_path( + BN_API_DIR + NAMES binaryninjaapi.h + HINTS ../../.. binaryninjaapi $ENV{BN_API_DIR} + REQUIRED + ) + add_subdirectory(${BN_API_DIR} api) +endif() + target_link_libraries(workflow_inliner binaryninjaapi) set_target_properties(workflow_inliner PROPERTIES diff --git a/examples/workflows/objectivec/CMakeLists.txt b/examples/workflows/objectivec/CMakeLists.txt index f5f8ea5e..a4c0198a 100644 --- a/examples/workflows/objectivec/CMakeLists.txt +++ b/examples/workflows/objectivec/CMakeLists.txt @@ -9,6 +9,17 @@ file(GLOB SOURCES add_library(workflow_objectivec SHARED ${SOURCES}) +if(NOT BN_API_BUILD_EXAMPLES) + # Out-of-tree build + find_path( + BN_API_DIR + NAMES binaryninjaapi.h + HINTS ../../.. binaryninjaapi $ENV{BN_API_DIR} + REQUIRED + ) + add_subdirectory(${BN_API_DIR} api) +endif() + target_link_libraries(workflow_objectivec binaryninjaapi) set_target_properties(workflow_objectivec PROPERTIES diff --git a/examples/workflows/tailcall/CMakeLists.txt b/examples/workflows/tailcall/CMakeLists.txt index fa322684..6d7e5eb0 100644 --- a/examples/workflows/tailcall/CMakeLists.txt +++ b/examples/workflows/tailcall/CMakeLists.txt @@ -9,6 +9,17 @@ file(GLOB SOURCES add_library(workflow_tailcall SHARED ${SOURCES}) +if(NOT BN_API_BUILD_EXAMPLES) + # Out-of-tree build + find_path( + BN_API_DIR + NAMES binaryninjaapi.h + HINTS ../../.. binaryninjaapi $ENV{BN_API_DIR} + REQUIRED + ) + add_subdirectory(${BN_API_DIR} api) +endif() + target_link_libraries(workflow_tailcall binaryninjaapi) set_target_properties(workflow_tailcall PROPERTIES |
