From 7eee8a6d3a2e17ba70004a240d9dcd3e9de48c12 Mon Sep 17 00:00:00 2001 From: MistEO Date: Wed, 29 Nov 2023 10:40:14 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E5=B0=86maay=E5=AE=89=E8=A3=85=E7=A7=BB?= =?UTF-8?q?=E8=87=B3cmake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 3 --- CMakeLists.txt | 2 +- cmake/assets.cmake | 9 ++++++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a94b9c0..f3acc76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,7 +93,6 @@ jobs: shell: bash run: | cmake --install build --prefix install - cp -r assets/.maay install - uses: actions/upload-artifact@v3 with: @@ -163,7 +162,6 @@ jobs: shell: bash run: | cmake --install build --prefix install - cp -r assets/.maay install - uses: actions/upload-artifact@v3 with: @@ -221,7 +219,6 @@ jobs: shell: bash run: | cmake --install build --prefix install - cp -r assets/.maay install - uses: actions/upload-artifact@v3 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 5302eaf..243ff06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/assets.cmake b/cmake/assets.cmake index d7387a2..97c04ac 100644 --- a/cmake/assets.cmake +++ b/cmake/assets.cmake @@ -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 .) \ No newline at end of file