Add CMake options to install examples and documentation separately.

This commit is contained in:
Lukas Dürrenberger 2015-03-26 11:36:31 +01:00
parent 20f213bfac
commit a328e24536
4 changed files with 47 additions and 29 deletions

View file

@ -63,9 +63,21 @@ else()
set(SFML_BUILD_EXAMPLES FALSE)
endif()
# add options for installing the examples
if(SFML_BUILD_EXAMPLES)
sfml_set_option(SFML_INSTALL_EXAMPLES FALSE BOOL "TRUE to install the SFML examples, FALSE to leave them in the build directory")
sfml_set_option(SFML_INSTALL_EXAMPLES_PREFIX ${INSTALL_MISC_DIR} PATH "Install path prefix, prepended onto example install directory")
endif()
# add an option for building the API documentation
sfml_set_option(SFML_BUILD_DOC FALSE BOOL "TRUE to generate the API documentation, FALSE to ignore it")
# add option for installing the API documentation
if(SFML_BUILD_DOC)
sfml_set_option(SFML_INSTALL_DOC FALSE BOOL "TRUE to install the SFML API documentation, FALSE to leave them in the build directory")
sfml_set_option(SFML_INSTALL_DOC_PREFIX ${INSTALL_MISC_DIR} PATH "Install path prefix, prepended onto the documentation install directory")
endif()
# add an option for choosing the OpenGL implementation
sfml_set_option(SFML_OPENGL_ES ${OPENGL_ES} BOOL "TRUE to use an OpenGL ES implementation, FALSE to use a desktop OpenGL implementation")
@ -275,8 +287,8 @@ else()
COMPONENT devel)
endif()
install(FILES license.txt DESTINATION ${INSTALL_MISC_DIR})
install(FILES readme.txt DESTINATION ${INSTALL_MISC_DIR})
install(FILES license.txt DESTINATION ./)
install(FILES readme.txt DESTINATION ./)
if(NOT SFML_OS_ANDROID)
install(FILES cmake/Modules/FindSFML.cmake DESTINATION ${INSTALL_MISC_DIR}/cmake/Modules)
endif()