diff options
| author | Glenn Smith <glenn@vector35.com> | 2022-02-01 16:34:18 -0500 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2022-02-02 19:22:08 -0500 |
| commit | b8af211f9a3647687c7e45c0fd04b0768df87ffe (patch) | |
| tree | 64f13fe262399189d70aadf33e1c6e33f0a74c3e /examples/triage | |
| parent | 5f5785fd2b1cee6bc9a082e1209de00b1497d410 (diff) | |
Fancier CMake: find scripts, out-of-tree example builds
Diffstat (limited to 'examples/triage')
| -rw-r--r-- | examples/triage/CMakeLists.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/examples/triage/CMakeLists.txt b/examples/triage/CMakeLists.txt index 05dd03ce..ca47f8f9 100644 --- a/examples/triage/CMakeLists.txt +++ b/examples/triage/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.9 FATAL_ERROR) option(QT6 "Target Qt 6" OFF) -project(triage) +project(triage CXX C) if(NOT QT6) set(CMAKE_OSX_ARCHITECTURES x86_64) @@ -18,6 +18,17 @@ else() add_library(triage SHARED ${SOURCES}) endif() +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(triage binaryninjaapi binaryninjaui) set_target_properties(triage PROPERTIES |
