diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 9faf1f116..af64e97eb 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -112,11 +112,16 @@ jobs: name: coveralls.json path: coveralls.json + - name: Package + working-directory: ${{github.workspace}}/build + run: cmake --build . --target package - #- name: Package + - uses: actions/upload-artifact@v4 + if: matrix.os == 'ubuntu-24.04' + with: + name: packages + path: ${{github.workspace}}/build/Crow-* + + #- name: Source package # working-directory: ${{github.workspace}}/build - # run: | - # cmake --build . --target ALL_BUILD && \ - # cmake --build . --target doc && \ - # cmake --build . --target package && \ - # cpack --config CPackSourceConfig.cmake + # run: cpack --config CPackSourceConfig.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 64d03d531..80923ed3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -205,7 +205,16 @@ if(CROW_INSTALL) ) endif() -set(CPACK_GENERATOR "ZIP") +if(WIN32 AND NOT CYGWIN) + set(CPACK_GENERATOR NSIS ZIP) +endif(WIN32 AND NOT CYGWIN) +if(APPLE) + set(CPACK_GENERATOR DragNDrop TGZ) +endif(APPLE) +if (UNIX AND NOT APPLE AND NOT WIN32) + set(CPACK_GENERATOR DEB TGZ) +endif (UNIX AND NOT APPLE AND NOT WIN32) + set(CPACK_PACKAGE_NAME "Crow") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "CrowCpp") set(CPACK_PACKAGE_VENDOR "CrowCpp")