Files
hailort/hailort/libhailort/examples/CMakeLists.txt
HailoRT-Automation d61a3bc83f v4.10.0
v4.10.0
2022-09-28 22:49:02 +03:00

24 lines
775 B
CMake

cmake_minimum_required(VERSION 3.0.0)
project(hailort-examples)
find_package(Threads REQUIRED)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(HailoRT 4.10.0 EXACT REQUIRED)
add_library(example_base INTERFACE)
target_link_libraries(example_base INTERFACE HailoRT::libhailort Threads::Threads)
if(WIN32)
target_compile_options(example_base INTERFACE /W4 /WX /DWIN32_LEAN_AND_MEAN /DNOMINMAX /wd4201 /wd4251)
else()
target_compile_options(example_base INTERFACE -Werror -Wall -Wextra -Wconversion -O3 -DNDEBUG) # TODO support debug/release builds
endif()
add_subdirectory(cpp)
add_subdirectory(c)
set_target_properties(${EXAMPLES_CPP_TARGETS} PROPERTIES CXX_STANDARD 14)
add_custom_target(hailort_examples DEPENDS ${EXAMPLES_C_TARGETS} ${EXAMPLES_CPP_TARGETS})