caffe/tools/CMakeLists.txt

30 строки
791 B
CMake
Исходник Обычный вид История

2014-12-17 12:09:14 +03:00
# Collect source files
file(GLOB_RECURSE srcs ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
# Build each source file independently
foreach(source ${srcs})
get_filename_component(name ${source} NAME_WE)
# caffe target already exits
if(name MATCHES "caffe")
set(name ${name}.bin)
endif()
# target
add_executable(${name} ${source})
target_link_libraries(${name} ${Caffe_LINK})
caffe_default_properties(${name})
# set back RUNTIME_OUTPUT_DIRECTORY
caffe_set_runtime_directory(${name} "${PROJECT_BINARY_DIR}/tools")
2014-12-17 12:09:14 +03:00
caffe_set_solution_folder(${name} tools)
# restore output name without suffix
if(name MATCHES "caffe.bin")
set_target_properties(${name} PROPERTIES OUTPUT_NAME caffe)
endif()
# Install
install(TARGETS ${name} DESTINATION bin)
2014-07-01 11:56:20 +04:00
endforeach(source)