From b7820c09cd5bf39f0861f5f44dbdbec05b5fac9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Mon, 25 Jan 2016 10:59:39 +0100 Subject: [PATCH] Add docs to CPack-generated packages Includes licence, contributors, readme, etc. --- .travis.yml | 3 ++- CMakeLists.txt | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5fee191a3b..782cf05a9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,8 @@ matrix: after_success: - cd build - make install - - mv OpenRCT2/bin/openrct2 OpenRCT2/ && mv OpenRCT2/share/openrct2 OpenRCT2/data + - mv OpenRCT2/bin/openrct2 OpenRCT2/ && mv OpenRCT2/share/openrct2 OpenRCT2/data && mv OpenRCT2/share/doc/openrct2 OpenRCT2/doc + - rm -rf OpenRCT2/bin OpenRCT2/share # remove empty dirs - tar cvzf openrct2-linux.tar.gz OpenRCT2/ - if [[ "z$OPENRCT2_ORG_TOKEN" != "z" ]] ; then curl -o - -v --form "key=$OPENRCT2_ORG_TOKEN" --form "fileName=OpenRCT2-${OPENRCT2_VERSION}-linux-${TRAVIS_COMMIT:0:7}.tar.gz" --form "version=${OPENRCT2_VERSION}" --form "gitHash=$TRAVIS_COMMIT" --form "gitBranch=$TRAVIS_BRANCH" --form "flavourId=4" --form "file=@openrct2-linux.tar.gz" "https://openrct2.org/altapi/?command=push-build"; fi - os: linux diff --git a/CMakeLists.txt b/CMakeLists.txt index 6509c2ab1e..fd2eba5f94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -212,6 +212,9 @@ if (APPLE OR STATIC) TARGET_LINK_LIBRARIES(${PROJECT} ${ICONV_LIBRARIES}) endif (APPLE OR STATIC) +# Don't recurse, grab all *.txt and *.md files +file(GLOB DOC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/distribution/*.txt") +list(APPEND DOC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/contributors.md" "${CMAKE_CURRENT_SOURCE_DIR}/licence.txt") # CMake does not allow specifying a dependency chain which includes built-in # targets, like `install`, so we have to trick it and execute dependency ourselves. @@ -219,6 +222,7 @@ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_CUR install(TARGETS ${PROJECT} RUNTIME DESTINATION bin) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/g2.dat" DESTINATION share/${PROJECT}) install(DIRECTORY data/ DESTINATION share/${PROJECT}) +install(FILES ${DOC_FILES} DESTINATION share/doc/${PROJECT}) set(CPACK_PACKAGE_VERSION_MAJOR 0) set(CPACK_PACKAGE_VERSION_MINOR 0)