diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index daed0a9..ba0efdc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,10 @@ jobs: working-directory: ${{github.workspace}}/build run: ctest -C ${{matrix.build_type}} + - name: Package + working-directory: ${{github.workspace}}/build + run: cpack -C ${{matrix.build_type}} + macos: runs-on: macos-latest steps: @@ -45,3 +49,7 @@ jobs: - name: Test working-directory: ${{github.workspace}}/build run: ctest + + - name: Package + working-directory: ${{github.workspace}}/build + run: cpack diff --git a/CMakeLists.txt b/CMakeLists.txt index aaec389..bb37bd0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.20) include(CheckCCompilerFlag) enable_testing() @@ -141,7 +141,7 @@ add_self_test(timeout 1 tests/timeout.c) add_self_test(xmlreport 1 tests/xmlreport.c tests/tested.c) -install(TARGETS pcut DESTINATION lib) -install(TARGETS pcutpp DESTINATION bin) +install(TARGETS pcut DESTINATION lib ARCHIVE) +install(TARGETS pcutpp DESTINATION bin RUNTIME) install(DIRECTORY include/pcut DESTINATION include) - +include(CPack)