mastodonpp/examples/CMakeLists.txt
2020-01-08 21:49:48 +01:00

16 lines
414 B
CMake

include(GNUInstallDirs)
find_package(Threads REQUIRED)
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} Threads::Threads)
endforeach()
if(WITH_DOC)
install(FILES ${sources_examples}
DESTINATION "${CMAKE_INSTALL_DOCDIR}/${PROJECT_NAME}/examples")
endif()