caffe/tools/CMakeLists.txt

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

2014-07-01 11:56:20 +04:00
project( Tools )
# Find all source files
file(GLOB_RECURSE TOOLS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
2014-07-01 11:56:20 +04:00
2014-09-28 11:11:05 +04:00
set (CAFFE_WHOLE_LINK -Wl,--whole-archive caffe -Wl,--no-whole-archive)
2014-07-01 11:56:20 +04:00
# Build each source file independently
foreach(source ${TOOLS_SOURCES})
2014-07-01 11:56:20 +04:00
get_filename_component(name ${source} NAME_WE)
add_executable(${name}.bin ${source})
set_target_properties(${name}.bin PROPERTIES OUTPUT_NAME ${name})
2014-09-28 11:11:05 +04:00
target_link_libraries(${name}.bin ${CAFFE_WHOLE_LINK})
2014-07-01 11:56:20 +04:00
### Install #################################################################################
install(TARGETS ${name}.bin DESTINATION tools)
2014-07-01 11:56:20 +04:00
endforeach(source)