Files
onnx_mnist_example/CMakeLists.txt
T
2024-06-18 17:41:08 +01:00

33 lines
682 B
CMake

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
cmake_minimum_required(VERSION 3.13)
# Project
project(onnxruntime_samples C CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_compile_options("-Wall")
add_compile_options("-Wextra")
find_package(ONNXRUNTIME REQUIRED)
find_package(PNG REQUIRED)
include_directories(${ONNXRUNTIME_INCLUDE_DIR} ${PNG_PNG_INCLUDE_DIR})
add_executable(mnist_example
mnist_example_cxx.cpp
)
target_link_libraries(mnist_example
/opt/homebrew/lib/libonnxruntime.dylib
${PNG_LIBRARY_RELEASE}
)
include_directories(${PNG_INCLUDE_DIR})