Fix cmake for windows
This commit is contained in:
parent
e7e9d8a48e
commit
5ce6e4fce4
@ -7,11 +7,20 @@ project(
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
option("ENABLE_CUDA" "Enable CUDA support" OFF)
|
||||
|
||||
include("cmake/third_party.cmake")
|
||||
|
||||
set(CHECTUS_SRC src/main.cpp)
|
||||
|
||||
add_executable(chectus_engine ${CHECTUS_SRC})
|
||||
target_link_libraries(chectus_engine PRIVATE fmt simdjson "${TORCH_LIBRARIES}")
|
||||
target_compile_features(chectus_engine PRIVATE cxx_std_20)
|
||||
|
||||
if (MSVC)
|
||||
file(GLOB TORCH_DLLS "${TORCH_INSTALL_PREFIX}/lib/*.dll")
|
||||
add_custom_command(
|
||||
TARGET chectus_engine
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${TORCH_DLLS}
|
||||
$<TARGET_FILE_DIR:chectus_engine>)
|
||||
endif (MSVC)
|
||||
|
Loading…
x
Reference in New Issue
Block a user