Skip to content

Commit

Permalink
Add new lib for http
Browse files Browse the repository at this point in the history
  • Loading branch information
Saverio976 committed Nov 27, 2024
1 parent f457eb3 commit eeabec8
Show file tree
Hide file tree
Showing 6 changed files with 367 additions and 6 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
RAYLIB_CPP_TAG: "v5.0.2"
ENET_TAG: "v2.3.10"
ZSTD_TAG: "v1.5.5"
HTTPLIB_TAG: "v0.18.1"

jobs:
release-create:
Expand Down Expand Up @@ -109,6 +110,43 @@ jobs:
run: |
gh release upload ${{ needs.release-create.outputs.release }} ./date.tar
# - name: Upload To Artifact
# if: github.ref != 'refs/heads/main'
# uses: actions/upload-artifact@v3
# with:
# name: date.tar
# path: ./date.tar

httplib-to-tar:
runs-on: ubuntu-latest
needs: release-create

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install deps
run: sudo apt-get update && sudo apt-get install -y tar git

- name: Get Httplib
run: |
git clone https://github.com/yhirose/cpp-httplib.git httplib-repo
cd httplib-repo || exit 14
git checkout ${{ env.HTTPLIB_TAG }}
rm -rf .git
cd ..
- name: To Tar
run: |
tar -cvf httplib.tar httplib-repo
- name: Upload To Release
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ needs.release-create.outputs.release }} ./httplib.tar
# - name: Upload To Artifact
# if: github.ref != 'refs/heads/main'
# uses: actions/upload-artifact@v3
Expand Down
24 changes: 24 additions & 0 deletions client/deps/httplib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 3.15)

include(FetchContent)

FetchContent_Declare(
httplib
CMAKE_ARGS "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_CONFIGURATION_TYPES=\"Release;Release\"" "-DCONFIG=Release"
URL "https://github.com/X-R-G-B/Colomb/releases/latest/download/httplib.tar"
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)

FetchContent_MakeAvailable(httplib)

target_link_libraries(
${PROJECT_NAME}
PRIVATE
${HTTPLIB_LIBRARY}
)

target_include_directories(
${PROJECT_NAME}
PRIVATE
${HTTPLIB_INCLUDE_DIR}
)
1 change: 1 addition & 0 deletions client/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ target_sources(

add_subdirectory(utils)
add_subdirectory(menu)
add_subdirectory(uiconf)
13 changes: 13 additions & 0 deletions client/src/uiconf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.15)

target_include_directories(
${PROJECT_NAME}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)

target_sources(
${PROJECT_NAME}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/UIConf.cpp
)
Loading

0 comments on commit eeabec8

Please sign in to comment.