-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
52 lines (40 loc) · 1.16 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.27)
project(server)
find_library(COMMONLIB common)
if(NOT ${COMMONLIB})
set(FETCHCONTENT_QUIET OFF)
include(FetchContent)
FetchContent_Declare(
common
GIT_REPOSITORY https://github.com/mc-nv/common.git
GIT_TAG main
)
FetchContent_MakeAvailable(common)
install(TARGETS common DESTINATION ${CMAKE_BINARY_DIR})
endif(NOT ${COMMONLIB})
# find_package(gRPC)
# if(NOT gRPC_FOUND)
# set(FETCHCONTENT_QUIET OFF)
# include(FetchContent)
# FetchContent_Declare(
# gRPC
# GIT_REPOSITORY https://github.com/grpc/grpc.git
# GIT_TAG v1.52.0
# )
# FetchContent_MakeAvailable(gRPC)
# install(TARGETS grpc DESTINATION ${CMAKE_BINARY_DIR})
# endif(NOT gRPC_FOUND)
set(TESTH "test.h")
function(message_func)
message("This is a message from the server")
message("TESTH: ${TESTH}")
endfunction()
find_library(ONNXRUNTIME_LIB onnxruntime)
if(NOT ${ONNXRUNTIME_LIB})
# Download onnxruntime
include(download_onnxruntime.cmake)
endif(NOT ${ONNXRUNTIME_LIB})
message_func()
add_executable(server server.cpp)
target_link_libraries(server common)
install(TARGETS server DESTINATION ${CMAKE_BINARY_DIR})