2019-10-29 15:57:18 +00:00
|
|
|
include_directories (${CMAKE_SOURCE_DIR}/src)
|
|
|
|
|
2019-11-26 09:56:37 +00:00
|
|
|
find_package(Qt5 COMPONENTS
|
|
|
|
Widgets
|
|
|
|
PrintSupport
|
|
|
|
REQUIRED
|
|
|
|
)
|
|
|
|
|
2019-10-29 15:57:18 +00:00
|
|
|
file(
|
|
|
|
GLOB
|
|
|
|
usage_examples
|
|
|
|
*.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
foreach(f ${usage_examples})
|
|
|
|
get_filename_component(exampleName ${f} NAME_WE)
|
|
|
|
add_executable(${exampleName} ${f})
|
2019-11-27 13:21:16 +00:00
|
|
|
target_link_libraries(${exampleName} ${OpenCV_LIBS})
|
2019-10-29 15:57:18 +00:00
|
|
|
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${exampleName}
|
|
|
|
DESTINATION bin
|
|
|
|
RENAME ${CMAKE_PROJECT_NAME}-${exampleName})
|
|
|
|
endforeach(f)
|
|
|
|
|