mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 07:41:05 +08:00
Changed the install rules so that examples' source code is included in the final distribution
This commit is contained in:
parent
f550501f37
commit
86897a8347
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user