Skip to content

Commit

Permalink
🐛 Fix enable icons
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierLDff committed Mar 27, 2024
1 parent b2c8867 commit 5383243
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ jobs:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
version: ['5.15.2']
include:
- os: ubuntu-latest
enable_icons: 'ON'
- os: ubuntu-latest
enable_icons: 'OFF'
- os: macOS-latest
enable_icons: 'ON'
- os: windows-latest
enable_icons: 'ON'

steps:
-
uses: actions/checkout@v2
Expand All @@ -41,6 +51,7 @@ jobs:
cmake -E make_directory build
cmake \
-DQATERIAL_ENABLE_TESTS=ON \
-DQATERIAL_ENABLE_ICONS=${{ matrix.enable_icons }} \
-DCMAKE_BUILD_TYPE="Release" \
-DCPM_SOURCE_CACHE=.cpm \
-B build \
Expand Down
11 changes: 9 additions & 2 deletions cmake/QaterialGenerateIcons.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ function(qaterial_generate_icons_class OUTPUT_FILE_HPP OUTPUT_FILE_CPP)
else()

# Generate fake Qaterial.Impl.Icons.Icons.qml
message(STATUS "Generate Fake ${OUTPUT_FILE}")
file(WRITE ${OUTPUT_FILE}
message(STATUS "Generate Fake ${OUTPUT_FILE_HPP}")
file(WRITE ${OUTPUT_FILE_HPP}
"// Dummy file generated with CMake to mock the absence of Mdi icons.\n"
"// Everything written here will be lost.\n\n"
"#ifndef __QATERIAL_ICONS_HPP__\n"
Expand All @@ -221,6 +221,13 @@ function(qaterial_generate_icons_class OUTPUT_FILE_HPP OUTPUT_FILE_CPP)
"#endif"
)

# Generate fake Qaterial.Impl.Icons.Icons.cpp
message(STATUS "Generate Fake ${OUTPUT_FILE_CPP}")
file(WRITE ${OUTPUT_FILE_CPP}
"// Dummy file generated with CMake to mock the absence of Mdi icons.\n"
"// Everything written here will be lost.\n\n"
)

endif()

endfunction()

0 comments on commit 5383243

Please sign in to comment.