Skip to content

Commit

Permalink
update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Simplxss committed Apr 23, 2024
1 parent cfea24e commit 50f0d8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
arch: [x64, x64_x86]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Install latest CMake.
- uses: lukka/get-cmake@latest
Expand Down Expand Up @@ -69,7 +69,7 @@
# the project files. This configuration leverages the vcpkg.cmake toolchain file to
# run vcpkg and install all dependencies specified in vcpkg.json.
configurePreset: 'msvc-vcpkg-static-${{ matrix.arch }}'
configurePresetAdditionalArgs: "['-DMDF_BUILD_SHARED_LIB_NET=ON']"
configurePresetAdditionalArgs: "['-DMDF_BUILD_SHARED_LIB_NET=ON', '-DMDF_BUILD_TOOL=ON']"

# This is the name of the CMakePresets.json's configuration to build the project.
buildPreset: 'msvc-vcpkg-static-${{ matrix.arch }}-release'
Expand All @@ -86,7 +86,7 @@
# the project files. This configuration leverages the vcpkg.cmake toolchain file to
# run vcpkg and install all dependencies specified in vcpkg.json.
configurePreset: 'msvc-vcpkg-${{ matrix.arch }}'
configurePresetAdditionalArgs: "['-DMDF_BUILD_SHARED_LIB_NET=ON', '-DMDF_BUILD_TEST=ON', '-DMDF_BUILD_SHARED_LIB_EXAMPLE=ON', '-DMDF_BUILD_TOOL=ON']"
configurePresetAdditionalArgs: "['-DMDF_BUILD_SHARED_LIB_NET=ON', '-DMDF_BUILD_TEST=ON', '-DMDF_BUILD_SHARED_LIB_EXAMPLE=ON']"

# This is the name of the CMakePresets.json's configuration to build the project.
buildPreset: 'msvc-vcpkg-${{ matrix.arch }}-debug'
Expand All @@ -95,7 +95,7 @@
testPreset: 'msvc-vcpkg-${{ matrix.arch }}'

- name: Upload build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mdflibs-${{ matrix.os }}-static-${{ matrix.arch }}
path: install/msvc-vcpkg-static-${{ matrix.arch }}/
Expand All @@ -108,7 +108,7 @@
arch: [x64]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Install latest CMake.
- uses: lukka/get-cmake@latest
Expand Down Expand Up @@ -154,7 +154,7 @@
# the project files. This configuration leverages the vcpkg.cmake toolchain file to
# run vcpkg and install all dependencies specified in vcpkg.json.
configurePreset: 'ninja-vcpkg-${{ matrix.arch }}'
configurePresetAdditionalArgs: "['-DMDF_BUILD_TEST=ON', '-DMDF_BUILD_SHARED_LIB_EXAMPLE=ON']"
configurePresetAdditionalArgs: "['-DMDF_BUILD_TEST=ON', '-DMDF_BUILD_SHARED_LIB_EXAMPLE=ON', '-DMDF_BUILD_TOOL=ON']"

# This is the name of the CMakePresets.json's configuration to build the project.
buildPreset: 'ninja-vcpkg-${{ matrix.arch }}-release'
Expand All @@ -163,7 +163,7 @@
testPreset: 'ninja-vcpkg-${{ matrix.arch }}'

- name: Upload build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mdflibs-${{ matrix.os }}-${{ matrix.arch }}
path: install/ninja-vcpkg-${{ matrix.arch }}/
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ endif()
option(BUILD_SHARED_LIBS "Build static library as default." OFF)
option(MDF_BUILD_SHARED_LIB "Build shared library." ON)
option(MDF_BUILD_SHARED_LIB_NET "Build shared library with .NET." OFF) # Only for MSVC 19.36+
option(MDF_BUILD_SHARED_LIB_NET "Build shared library with .NET." OFF)
option(MDF_BUILD_SHARED_LIB_EXAMPLE "Build shared library example." OFF)
option(MDF_BUILD_DOC "Build documentation. Requires Doxygen and Release mode." OFF)
option(MDF_BUILD_TOOL "Build tools like the MDF Viewer. Requires WxWidgets." OFF)
Expand Down

0 comments on commit 50f0d8c

Please sign in to comment.