Skip to content

Commit

Permalink
ci: 将maay安装移至cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Nov 29, 2023
1 parent f46ac92 commit 7eee8a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ jobs:
shell: bash
run: |
cmake --install build --prefix install
cp -r assets/.maay install
- uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -163,7 +162,6 @@ jobs:
shell: bash
run: |
cmake --install build --prefix install
cp -r assets/.maay install
- uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -221,7 +219,6 @@ jobs:
shell: bash
run: |
cmake --install build --prefix install
cp -r assets/.maay install
- uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.21)
cmake_minimum_required(VERSION 3.24)
project(M9A)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
Expand Down
9 changes: 6 additions & 3 deletions cmake/assets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ add_custom_command(OUTPUT ${maa_assets_target}/resource
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/assets/resource ${maa_assets_target}/resource
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/assets/MaaCommonAssets/OCR/ppocr_v4/zh_cn ${maa_assets_target}/resource/model/ocr
)
add_custom_target(AssetsResource ALL DEPENDS ${maa_assets_target}/resource)
set_property(TARGET AssetsResource APPEND PROPERTY ADDITIONAL_CLEAN_FILES ${maa_assets_target}/resource)
add_custom_command(OUTPUT ${maa_assets_target}/.maay
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/assets/.maay ${maa_assets_target}/.maay
)
add_custom_target(AssetsResource ALL DEPENDS ${maa_assets_target}/resource ${maa_assets_target}/.maay)
set_property(TARGET AssetsResource APPEND PROPERTY ADDITIONAL_CLEAN_FILES ${maa_assets_target}/resource ${maa_assets_target}/.maay)
set_target_properties(AssetsResource PROPERTIES FOLDER Assets)
install(DIRECTORY ${maa_assets_target}/resource DESTINATION .)
install(DIRECTORY ${maa_assets_target}/resource ${maa_assets_target}/.maay DESTINATION .)

0 comments on commit 7eee8a6

Please sign in to comment.