diff options
| author | Tomáš Chvátal <scarabeus@gentoo.org> | 2009-05-23 20:03:18 +0200 |
|---|---|---|
| committer | Tomáš Chvátal <scarabeus@gentoo.org> | 2009-05-23 20:03:18 +0200 |
| commit | 1534d6c2118866f7f5838b621974e0ad3f7861b8 (patch) | |
| tree | 6f9f11b0443224deb6ecddf1c74e8013ea1f56a2 /CMakeLists.txt | |
| parent | a2509822de559d59e8e955b95b6809fde26fa017 (diff) | |
Enable doc compression by flag, disabled by default
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b0ab5eb..5be898b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,7 @@ OPTION (BUILD_SERVER "Build the server instead of client" OFF) OPTION (ENABLE_IPV6 "Build with the ipv6 support" ON) OPTION (WITH_AUDIO "Build with audio enabled" ON) OPTION (ENABLE_DEBUG "Build debug features" OFF) +OPTION (ENABLE_COMPRESSION "Compress documentation files" OFF) OPTION (DEVELOPER "Modify stuff to please tuxanci devs" OFF) OPTION (WITH_NLS "Build the translations" ON) OPTION (Apple "Build some apple quirks. USE ONLY ON MAC!" OFF) @@ -200,18 +201,23 @@ SET ( tuxanci_docs ${CMAKE_CURRENT_SOURCE_DIR}/AUTHORS ${CMAKE_CURRENT_SOURCE_DIR}/README ) -FOREACH ( doc ${tuxanci_docs} ) - GET_FILENAME_COMPONENT( _doc ${doc} NAME_WE ) - ADD_CUSTOM_COMMAND ( OUTPUT ${_doc}.gz - COMMAND ${GZIP_TOOL} -c ${doc} > ${_doc}.gz - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - DEPENDS ${doc} - ) - INSTALL ( FILES ${CMAKE_BINARY_DIR}/${_doc}.gz +IF ( ENABLE_COMPRESSION ) + FOREACH ( doc ${tuxanci_docs} ) + GET_FILENAME_COMPONENT( _doc ${doc} NAME_WE ) + ADD_CUSTOM_COMMAND ( OUTPUT ${_doc}.gz + COMMAND ${GZIP_TOOL} -c ${doc} > ${_doc}.gz + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + DEPENDS ${doc} + ) + INSTALL ( FILES ${CMAKE_BINARY_DIR}/${_doc}.gz + DESTINATION ${CMAKE_INSTALL_DOCDIR}/ ) + LIST(APPEND _docFiles ${_doc}.gz ) + ENDFOREACH ( doc ) + ADD_CUSTOM_TARGET(docs ALL DEPENDS ${_docFiles}) +ELSE ( ENABLE_COMPRESSION ) + INSTALL ( FILES ${tuxanci_docs} DESTINATION ${CMAKE_INSTALL_DOCDIR}/ ) - LIST(APPEND _docFiles ${_doc}.gz ) -ENDFOREACH ( doc ) -ADD_CUSTOM_TARGET(docs ALL DEPENDS ${_docFiles}) +ENDIF ( ENABLE_COMPRESSION ) ############################################################################### # GOODBYE INFORMATIONS (VARIABLES SETTINGS) ############################################################################### |