infra : add window build (with loaders)
authorJunsuChoi <jsuya.choi@samsung.com>
Thu, 7 Oct 2021 03:55:13 +0000 (12:55 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 7 Oct 2021 06:10:38 +0000 (15:10 +0900)
.github/workflows/build_win.yml
src/loaders/external_png/meson.build

index 9584a00..a4f59c4 100644 (file)
@@ -11,16 +11,13 @@ jobs:
     steps:
     - uses: actions/checkout@v2
     - uses: ilammy/msvc-dev-cmd@v1
-      with:
-        submodules: true
     - name: Install Packages
       run: |
         pip install meson==0.58.0 ninja
     - name: Build
       run: |
-        meson --backend=ninja build --buildtype=release
+        meson --backend=ninja build
         where link
-        ninja -C build
         ninja -C build install
 
     - uses: actions/upload-artifact@v2
@@ -28,3 +25,23 @@ jobs:
         name: result
         path: build/src\thorvg*
 
+  build_with_loaders:
+    runs-on: windows-latest
+    steps:
+    - uses: actions/checkout@v2
+    - uses: ilammy/msvc-dev-cmd@v1
+    - name: Install Packages
+      run: |
+        pip install meson==0.58.0 ninja
+
+    - name: Install Packages(png, jpg)
+      run: |
+        vcpkg install libpng
+        vcpkg install libjpeg-turbo
+
+    - name: Build
+      run: |
+        meson --backend=ninja build -Dloaders="svg, tvg, png, jpg" -Dsavers="tvg" -Dbindings="capi"
+        where link
+        ninja -C build install
+
index 61a386f..ef28b4a 100644 (file)
@@ -3,7 +3,11 @@ source_file = [
    'tvgPngLoader.cpp',
 ]
 
-png_dep = meson.get_compiler('cpp').find_library('libpng')
+png_dep = dependency('libpng', required: false)
+
+if not png_dep.found()
+    png_dep = meson.get_compiler('cpp').find_library('libpng')
+endif
 
 if png_dep.found()
     subloader_dep += [declare_dependency(