Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/VPUXCompilerL0/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,23 @@ endif()
target_include_directories(${FUNCTIONAL_TARGET}
PUBLIC
"${CMAKE_SOURCE_DIR}/src/core/include"
PRIVATE
$<TARGET_PROPERTY:IE::nlohmann_json,INTERFACE_INCLUDE_DIRECTORIES>
)

if(TARGET IE::nlohmann_json)
target_include_directories(${FUNCTIONAL_TARGET}
PRIVATE
$<TARGET_PROPERTY:IE::nlohmann_json,INTERFACE_INCLUDE_DIRECTORIES>)
else()
find_package(nlohmann_json 3.9.0 QUIET)
if(nlohmann_json_FOUND)
target_include_directories(${FUNCTIONAL_TARGET}
PRIVATE
$<TARGET_PROPERTY:nlohmann_json::nlohmann_json,INTERFACE_INCLUDE_DIRECTORIES>)
else()
message(FATAL_ERROR "Failed to find system nlohmann_json in OpenVINO Developer Package and system libraries")
endif()
endif()

link_system_libraries(${FUNCTIONAL_TARGET}
PUBLIC
IE::ngraph
Expand Down
16 changes: 15 additions & 1 deletion src/vpux_compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,23 @@ target_include_directories(${OBJ_TARGET_NAME}
PRIVATE
${BITCOMPACTOR_INCLUDES}
$<TARGET_PROPERTY:huffman_codec,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:IE::nlohmann_json,INTERFACE_INCLUDE_DIRECTORIES>
)

if(TARGET IE::nlohmann_json)
target_include_directories(${OBJ_TARGET_NAME}
PRIVATE
$<TARGET_PROPERTY:IE::nlohmann_json,INTERFACE_INCLUDE_DIRECTORIES>)
else()
find_package(nlohmann_json 3.9.0 QUIET)
if(nlohmann_json_FOUND)
target_include_directories(${OBJ_TARGET_NAME}
PRIVATE
$<TARGET_PROPERTY:nlohmann_json::nlohmann_json,INTERFACE_INCLUDE_DIRECTORIES>)
else()
message(FATAL_ERROR "Failed to find system nlohmann_json in OpenVINO Developer Package and system libraries")
endif()
endif()

target_include_directories(${OBJ_TARGET_NAME}
SYSTEM PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
Expand Down