• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1cmake_minimum_required(VERSION 3.14.1)
2project(testlenet)
3set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -fPIC -std=c++17")
4
5set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare")
6
7set(MS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mindspore-lite-1.5.0-linux-x64/runtime")
8set(LITECV_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mindspore-lite-1.5.0-linux-x64/runtime/include/dataset")
9
10include_directories(${MS_DIR} ${LITECV_DIR})
11
12
13add_executable(testlenet
14        ${CMAKE_CURRENT_SOURCE_DIR}/testlenet.cpp
15        )
16
17target_link_libraries(testlenet
18        ${MS_DIR}/lib/libminddata-lite.so
19        ${MS_DIR}/third_party/libjpeg-turbo/lib/libjpeg.so.62
20        ${MS_DIR}/third_party/libjpeg-turbo/lib/libturbojpeg.so.0
21        ${MS_DIR}/lib/libmindspore-lite.so
22        pthread)
23
24add_executable(testresize
25        ${CMAKE_CURRENT_SOURCE_DIR}/testresize.cpp
26        )
27
28target_link_libraries(testresize
29        ${MS_DIR}/lib/libminddata-lite.so
30        ${MS_DIR}/third_party/libjpeg-turbo/lib/libjpeg.so.62
31        ${MS_DIR}/third_party/libjpeg-turbo/lib/libturbojpeg.so.0
32        ${MS_DIR}/lib/libmindspore-lite.so
33        pthread)
34
35add_executable(testlitecv
36        ${CMAKE_CURRENT_SOURCE_DIR}/testlitecv.cpp
37        )
38
39target_link_libraries(testlitecv
40        ${MS_DIR}/lib/libminddata-lite.so
41        ${MS_DIR}/third_party/libjpeg-turbo/lib/libjpeg.so.62
42        ${MS_DIR}/third_party/libjpeg-turbo/lib/libturbojpeg.so.0
43        pthread)