mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +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}
|
install(TARGETS ${target}
|
||||||
RUNTIME DESTINATION ${INSTALL_MISC_DIR}/examples/${target} COMPONENT examples)
|
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
|
# install the example's resources as well
|
||||||
set(EXAMPLE_RESOURCES "${CMAKE_SOURCE_DIR}/examples/${target}/resources")
|
set(EXAMPLE_RESOURCES "${CMAKE_SOURCE_DIR}/examples/${target}/resources")
|
||||||
if(EXISTS ${EXAMPLE_RESOURCES})
|
if(EXISTS ${EXAMPLE_RESOURCES})
|
||||||
install(DIRECTORY ${EXAMPLE_RESOURCES}
|
install(DIRECTORY ${EXAMPLE_RESOURCES}
|
||||||
DESTINATION ${INSTALL_MISC_DIR}/examples/${target}
|
DESTINATION ${INSTALL_MISC_DIR}/examples/${target}
|
||||||
COMPONENT examples
|
COMPONENT examples)
|
||||||
PATTERN ".svn" EXCLUDE)
|
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
Loading…
Reference in New Issue
Block a user