CMakeLists.txt 718 字节
Newer Older
H
hypox64 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# project(example)
# add_executable("${PROJECT_NAME}" deepmosaic.cpp)
# target_link_libraries(  "${PROJECT_NAME}" 
#                         "${TORCH_LIBRARIES}" 
#                         "${OpenCV_LIBS}"
#                         utils)

file(GLOB_RECURSE srcs RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
foreach(sourcefile IN LISTS srcs)
    string( REPLACE ".cpp" "" binname ${sourcefile})
    add_executable( ${binname} ${sourcefile} )
    target_link_libraries(  ${binname} 
                            "${TORCH_LIBRARIES}" 
                            "${OpenCV_LIBS}"
                            utils)
    # set_property(TARGET ${binname} PROPERTY CXX_STANDARD 14)
endforeach()