diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44a6a2fb1..dce9f49e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -243,3 +243,27 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./gen_docs destination_dir: docs + + use_rpp_as_package: + needs: [download_deps] + + timeout-minutes: 20 + runs-on: ubuntu-latest + name: Test RPP as package - ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install project and build + env: + CC: gcc-10 + CXX: g++-10 + run: | + cmake -B build + sudo cmake --build build --target install --parallel 2 --config Release + + cmake -B sample_build -S src/examples/package + cmake --build sample_build --parallel 2 --config Release + diff --git a/src/examples/basic/CMakeLists.txt b/src/examples/basic/CMakeLists.txt index 86640860e..d094456bc 100644 --- a/src/examples/basic/CMakeLists.txt +++ b/src/examples/basic/CMakeLists.txt @@ -2,5 +2,5 @@ add_executable(basic_sample basic.cpp ) -target_link_libraries(basic_sample PRIVATE rpp) +target_link_libraries(basic_sample PRIVATE RPP::rpp) set_target_properties(basic_sample PROPERTIES FOLDER Examples) diff --git a/src/examples/package/CMakeLists.txt b/src/examples/package/CMakeLists.txt new file mode 100644 index 000000000..b0eab544f --- /dev/null +++ b/src/examples/package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(RPP REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} ../basic/basic.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE RPP::rpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) \ No newline at end of file