From 86897a8347f8e6a1df56bc2a4062982539ab284f Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Sat, 6 Apr 2013 10:20:58 +0200 Subject: [PATCH] Changed the install rules so that examples' source code is included in the final distribution --- cmake/Macros.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 06ae101f2..072fe75c6 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -241,12 +241,16 @@ macro(sfml_add_example target) install(TARGETS ${target} RUNTIME DESTINATION ${INSTALL_MISC_DIR}/examples/${target} COMPONENT examples) + # install the example's source code + install(FILES ${THIS_SOURCES} + DESTINATION ${INSTALL_MISC_DIR}/examples/${target} + COMPONENT examples) + # install the example's resources as well set(EXAMPLE_RESOURCES "${CMAKE_SOURCE_DIR}/examples/${target}/resources") if(EXISTS ${EXAMPLE_RESOURCES}) install(DIRECTORY ${EXAMPLE_RESOURCES} DESTINATION ${INSTALL_MISC_DIR}/examples/${target} - COMPONENT examples - PATTERN ".svn" EXCLUDE) + COMPONENT examples) endif() endmacro()