diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab908c08..55a99c5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Compile run: | sudo apt-get update - sudo apt-get install curl libcurl4-openssl-dev -y + sudo apt-get install curl libcurl4-openssl-dev libgd-dev -y cmake -B . cmake --build . -- -j 12 chmod +x blade/blade @@ -53,6 +53,7 @@ jobs: - uses: actions/checkout@v4 - name: Compile run: | + brew install gd cmake -B . -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl cmake --build . -- -j 12 chmod 755 blade/blade @@ -92,7 +93,7 @@ jobs: run: | ${{ env.VCPKG_ROOT }}/vcpkg update ${{ env.VCPKG_ROOT }}/vcpkg version - ${{ env.VCPKG_ROOT }}/vcpkg install curl:x64-windows libffi:x64-windows openssl:x64-windows libpng:x64-windows libjpeg-turbo:x64-windows + ${{ env.VCPKG_ROOT }}/vcpkg install curl:x64-windows libffi:x64-windows openssl:x64-windows libpng:x64-windows libjpeg-turbo:x64-windows libgd:x64-windows ${{ env.VCPKG_ROOT }}/vcpkg list - name: Save vcpkg dependencies cache id: vcpkg-cache-save diff --git a/packages/imagine/CMakeLists.txt b/packages/imagine/CMakeLists.txt index f2cb3829..8e329457 100644 --- a/packages/imagine/CMakeLists.txt +++ b/packages/imagine/CMakeLists.txt @@ -23,22 +23,10 @@ add_library(imagine SHARED imagine.c) target_link_libraries(imagine libblade) add_dependencies(imagine blade) -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - -set(CMAKE_FIND_FRAMEWORK LAST) -set(ENABLE_CPP OFF CACHE INTERNAL "Disabled CPP") -set(ENABLE_PNG ON CACHE INTERNAL "Enabled PNG") -set(ENABLE_JPEG ON CACHE INTERNAL "Enabled JPEG") -set(BUILD_TEST OFF CACHE INTERNAL "Disabled building tests") -include(FetchContent) -FetchContent_Declare(LibGD - URL https://github.com/blade-lang/libgd/archive/refs/heads/master.zip - URL_HASH SHA256=9f79756057ecff898c1e33749245435cdfd6121e8ec1e1140b00de531010e825 - ) -FetchContent_MakeAvailable(LibGD) -target_include_directories(imagine PRIVATE "${libgd_SOURCE_DIR}/src") -target_link_libraries(imagine gd_static) +include(FindGD.cmake) +target_include_directories(imagine PRIVATE ${GD_INCLUDE_DIR}) +target_link_libraries(imagine ${GD_LIBRARIES}) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")