miniprojet/tests/examples/CMakeLists.txt

18 lines
458 B
Text
Raw Normal View History

include_directories (${CMAKE_SOURCE_DIR}/src)
2019-12-09 18:35:45 +00:00
file(
GLOB
usage_examples
*.cpp
)
foreach(f ${usage_examples})
get_filename_component(exampleName ${f} NAME_WE)
add_executable(${exampleName} ${f})
target_link_libraries(${exampleName} ${OpenCV_LIBS} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${exampleName}
DESTINATION bin
RENAME ${CMAKE_PROJECT_NAME}-${exampleName})
endforeach(f)