miniprojet/tests/examples/CMakeLists.txt

24 lines
575 B
CMake

include_directories (${CMAKE_SOURCE_DIR}/src)
find_package(Qt5 COMPONENTS
Widgets
PrintSupport
REQUIRED
)
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} fftw3 plotcpp qcustomplot Qt5::Widgets Qt5::PrintSupport)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${exampleName}
DESTINATION bin
RENAME ${CMAKE_PROJECT_NAME}-${exampleName})
endforeach(f)