summaryrefslogtreecommitdiffstats
path: root/examples/CMakeLists.txt
blob: 4be6be0e137fa7399813b453cc331424c49480e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
include(GNUInstallDirs)

file(GLOB sources_examples *.cpp)
foreach(src ${sources_examples})
  get_filename_component(bin ${src} NAME_WE)
  add_executable(${bin} ${src})
  target_link_libraries(${bin} PRIVATE ${PROJECT_NAME})
endforeach()

if(WITH_DOC)
  install(FILES ${sources_examples}
    DESTINATION "${CMAKE_INSTALL_DOCDIR}/${PROJECT_NAME}/examples")
endif()