Skip to content

Commit

Permalink
Static libs maybe?
Browse files Browse the repository at this point in the history
  • Loading branch information
SenpaiSimon committed May 20, 2024
1 parent 3bd4e8c commit 816591f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
curllibCommand: >
curl -o curl.zip https://curl.se/windows/dl-8.7.1_7/curl-8.7.1_7-win64-mingw.zip &&
mkdir curlLib && tar -xf curl.zip -C curlLib --strip-components=1 &&
mv curlLib\lib 'C:\Program Files\' &&
mv curlLib\include 'C:\Program Files\' &&
ls 'C:\Program Files\lib' &&
ls 'C:\Program Files\include'
mv curlLib\lib\* 'C:\mingw64\lib\' &&
mv curlLib\include\* 'C:\mingw64\include\' &&
ls 'C:\mingw64\lib\' &&
ls 'C:\mingw64\include\'
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
Expand All @@ -60,19 +60,11 @@ jobs:
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
# - name: Install MinGW
# uses: egor-tensin/setup-mingw@v2.2.0
# with:
# platform: x64

- name: Install Deps
run: ${{ matrix.curllibCommand }}

- name: Init Submodules
run: git submodule update --init --recursive

- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v4

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
Expand All @@ -85,8 +77,7 @@ jobs:
-S ${{ github.workspace }} -G"${{ matrix.makeFileType }}"
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --target all

- name: Upload Artifacts
uses: actions/upload-artifact@v3
Expand Down
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,9 @@ set_property(TARGET ${PROJECT_NAME}
PROPERTY CXX_STANDARD 17
)

if(MSVC)
add_compile_definitions(_WIN32)
# add_compile_definitions(CURL_STATICLIB)
endif()

if(WIN32)
add_compile_definitions(_WIN32)
# add_compile_definitions(CURL_STATICLIB)
add_compile_definitions(CURL_STATICLIB)
else()
add_compile_definitions(__linux__)
endif()
Expand Down

0 comments on commit 816591f

Please sign in to comment.