-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
32 lines (24 loc) · 922 Bytes
/
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
# CMakeList.txt: проект CMake для RuCLIP
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(RuCLIP)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
find_package(Torch REQUIRED)
find_package(OpenCV 4.6 REQUIRED)
include("CMakeLists.Files.txt")
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
source_group("Headers" FILES ${HEADERS})
set(SOURCES ${SOURCES} ${HEADERS})
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME} ${LIBS})
if (MSVC)
file(GLOB TORCH_DLLS "${TORCH_INSTALL_PREFIX}/lib/*.dll")
add_custom_command(TARGET RuCLIP
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${TORCH_DLLS}
$<TARGET_FILE_DIR:RuCLIP>)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /openmp")
endif (MSVC)