2020-01-03 10:22:34 +01:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
2020-01-08 21:49:48 +01:00
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
|
2020-01-03 10:22:34 +01:00
|
|
|
file(GLOB sources_examples *.cpp)
|
|
|
|
foreach(src ${sources_examples})
|
|
|
|
get_filename_component(bin ${src} NAME_WE)
|
|
|
|
add_executable(${bin} ${src})
|
2020-01-08 21:49:48 +01:00
|
|
|
target_link_libraries(${bin} PRIVATE ${PROJECT_NAME} Threads::Threads)
|
2020-01-03 10:22:34 +01:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
if(WITH_DOC)
|
|
|
|
install(FILES ${sources_examples}
|
|
|
|
DESTINATION "${CMAKE_INSTALL_DOCDIR}/${PROJECT_NAME}/examples")
|
|
|
|
endif()
|