From 074b65760fa3fe7f9ea6a1b91b4cb16ea02a172d Mon Sep 17 00:00:00 2001 From: MistEO Date: Sun, 8 Dec 2024 11:54:45 +0800 Subject: [PATCH] ci: fix build error on linux --- source/MaaAdbControlUnit/CMakeLists.txt | 2 +- source/MaaDbgControlUnit/CMakeLists.txt | 5 ++++- source/MaaFramework/CMakeLists.txt | 6 +++++- source/MaaProjectInterface/CLI/CMakeLists.txt | 5 ++++- source/MaaToolkit/CMakeLists.txt | 6 +++++- source/MaaUtils/CMakeLists.txt | 5 ++++- source/MaaWin32ControlUnit/CMakeLists.txt | 5 ++++- source/binding/NodeJS/CMakeLists.txt | 2 +- test/dlopen/CMakeLists.txt | 5 ++++- test/pipeline/CMakeLists.txt | 5 ++++- 10 files changed, 36 insertions(+), 10 deletions(-) diff --git a/source/MaaAdbControlUnit/CMakeLists.txt b/source/MaaAdbControlUnit/CMakeLists.txt index 6f343375d..ea52b35ca 100644 --- a/source/MaaAdbControlUnit/CMakeLists.txt +++ b/source/MaaAdbControlUnit/CMakeLists.txt @@ -23,6 +23,6 @@ install( # ARCHIVE DESTINATION lib ) -install(FILES $ DESTINATION symbol OPTIONAL) +install(FILES $ DESTINATION symbol) source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_adb_control_unit_src}) diff --git a/source/MaaDbgControlUnit/CMakeLists.txt b/source/MaaDbgControlUnit/CMakeLists.txt index b19097b72..0ca7bf90f 100644 --- a/source/MaaDbgControlUnit/CMakeLists.txt +++ b/source/MaaDbgControlUnit/CMakeLists.txt @@ -19,6 +19,9 @@ install( # ARCHIVE DESTINATION lib ) -install(FILES $ DESTINATION symbol OPTIONAL) + +if(WIN32) + install(FILES $ DESTINATION symbol) +endif() source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_dbg_control_unit_src}) diff --git a/source/MaaFramework/CMakeLists.txt b/source/MaaFramework/CMakeLists.txt index f712ec8dc..27dbb5756 100644 --- a/source/MaaFramework/CMakeLists.txt +++ b/source/MaaFramework/CMakeLists.txt @@ -33,7 +33,11 @@ install( RUNTIME DESTINATION bin LIBRARY DESTINATION bin ARCHIVE DESTINATION lib) -install(FILES $ DESTINATION symbol OPTIONAL) + +if(WIN32) + install(FILES $ DESTINATION symbol) +endif() + install(DIRECTORY "${MAA_PUBLIC_INC}/MaaFramework" DESTINATION "include") source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_framework_src}) diff --git a/source/MaaProjectInterface/CLI/CMakeLists.txt b/source/MaaProjectInterface/CLI/CMakeLists.txt index 6d7caf87c..957846d61 100644 --- a/source/MaaProjectInterface/CLI/CMakeLists.txt +++ b/source/MaaProjectInterface/CLI/CMakeLists.txt @@ -16,4 +16,7 @@ install(TARGETS MaaPiCli RUNTIME DESTINATION bin LIBRARY DESTINATION bin ) -install(FILES $ DESTINATION symbol OPTIONAL) + +if(WIN32) + install(FILES $ DESTINATION symbol) +endif() \ No newline at end of file diff --git a/source/MaaToolkit/CMakeLists.txt b/source/MaaToolkit/CMakeLists.txt index aca981c70..e67b4fc2e 100644 --- a/source/MaaToolkit/CMakeLists.txt +++ b/source/MaaToolkit/CMakeLists.txt @@ -23,7 +23,11 @@ install( RUNTIME DESTINATION bin LIBRARY DESTINATION bin ARCHIVE DESTINATION lib) -install(FILES $ DESTINATION symbol OPTIONAL) + +if(WIN32) + install(FILES $ DESTINATION symbol) +endif() + install(DIRECTORY "${MAA_PUBLIC_INC}/MaaToolkit" DESTINATION "include") source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_toolkit_src}) diff --git a/source/MaaUtils/CMakeLists.txt b/source/MaaUtils/CMakeLists.txt index 624eaa9de..ada0c399d 100644 --- a/source/MaaUtils/CMakeLists.txt +++ b/source/MaaUtils/CMakeLists.txt @@ -18,6 +18,9 @@ install( RUNTIME DESTINATION bin LIBRARY DESTINATION bin # ARCHIVE DESTINATION lib ) -install(FILES $ DESTINATION symbol OPTIONAL) + +if(WIN32) + install(FILES $ DESTINATION symbol) +endif() source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_utils_src}) diff --git a/source/MaaWin32ControlUnit/CMakeLists.txt b/source/MaaWin32ControlUnit/CMakeLists.txt index 44ad09186..19b6a56b9 100644 --- a/source/MaaWin32ControlUnit/CMakeLists.txt +++ b/source/MaaWin32ControlUnit/CMakeLists.txt @@ -20,6 +20,9 @@ install( # ARCHIVE DESTINATION lib ) -install(FILES $ DESTINATION symbol OPTIONAL) + +if(WIN32) + install(FILES $ DESTINATION symbol) +endif() source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_win32_control_unit_src}) diff --git a/source/binding/NodeJS/CMakeLists.txt b/source/binding/NodeJS/CMakeLists.txt index 0554b4d3d..ae4bb5e35 100644 --- a/source/binding/NodeJS/CMakeLists.txt +++ b/source/binding/NodeJS/CMakeLists.txt @@ -66,7 +66,7 @@ install( RUNTIME DESTINATION bin LIBRARY DESTINATION bin ARCHIVE DESTINATION lib) -install(FILES $ DESTINATION symbol OPTIONAL) +install(FILES $ DESTINATION symbol) # if(WIN32) add_custom_command( TARGET MaaNode POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${MaaDlls} # $ COMMAND_EXPAND_LISTS) endif() diff --git a/test/dlopen/CMakeLists.txt b/test/dlopen/CMakeLists.txt index bd8bfee5c..bb1f5f4e1 100644 --- a/test/dlopen/CMakeLists.txt +++ b/test/dlopen/CMakeLists.txt @@ -29,4 +29,7 @@ add_dependencies(DlopenTesting LibraryHolder) set_target_properties(DlopenTesting PROPERTIES FOLDER Testing) install(TARGETS DlopenTesting RUNTIME DESTINATION bin) -install(FILES $ DESTINATION symbol OPTIONAL) + +if(WIN32) + install(FILES $ DESTINATION symbol) +endif() diff --git a/test/pipeline/CMakeLists.txt b/test/pipeline/CMakeLists.txt index 0b0261d54..8ed8d19ff 100644 --- a/test/pipeline/CMakeLists.txt +++ b/test/pipeline/CMakeLists.txt @@ -13,4 +13,7 @@ add_dependencies(PipelineTesting MaaFramework PipelineSmokingResource) set_target_properties(PipelineTesting PROPERTIES FOLDER Testing) install(TARGETS PipelineTesting RUNTIME DESTINATION bin) -install(FILES $ DESTINATION symbol OPTIONAL) + +if(WIN32) + install(FILES $ DESTINATION symbol) +endif()