Skip to content

Commit 2abf282

Browse files
committed
chore: 整理cmake及release包结构
1 parent 21cbddd commit 2abf282

16 files changed

+19
-13
lines changed

3rdparty/CMakeLists.txt

+4-10
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,12 @@ add_library(HeaderOnlyLibraries INTERFACE)
22
target_include_directories(HeaderOnlyLibraries INTERFACE include)
33

44
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/MaaAgentBinary/README.md)
5-
add_custom_command(
6-
OUTPUT ${CMAKE_BINARY_DIR}/MaaAgentBinary
7-
COMMAND
8-
${CMAKE_COMMAND} -E copy_directory
9-
${CMAKE_CURRENT_SOURCE_DIR}/MaaAgentBinary
10-
${CMAKE_BINARY_DIR}/MaaAgentBinary)
115
add_custom_target(AgentBinary ALL
12-
DEPENDS ${CMAKE_BINARY_DIR}/MaaAgentBinary)
6+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/MaaAgentBinary)
137
set_property(
14-
TARGET AgentBinary
15-
APPEND
16-
PROPERTY ADDITIONAL_CLEAN_FILES ${CMAKE_BINARY_DIR}/MaaAgentBinary)
8+
TARGET AgentBinary
9+
APPEND
10+
PROPERTY ADDITIONAL_CLEAN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/MaaAgentBinary)
1711
set_target_properties(AgentBinary PROPERTIES FOLDER Assets)
1812
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/MaaAgentBinary
1913
DESTINATION share)

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ endif()
7676

7777
add_subdirectory(3rdparty)
7878
add_subdirectory(source)
79+
add_subdirectory(tools)
7980

8081
if(BUILD_SAMPLE)
8182
add_subdirectory(sample/cpp)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

source/MaaFramework/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ install(
3838
LIBRARY DESTINATION bin
3939
ARCHIVE DESTINATION lib)
4040
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../include/MaaFramework" DESTINATION "include")
41-
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../include/Interface" DESTINATION "share")
4241

4342
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_framework_src})
4443

source/MaaRpc/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
generate_grpc_lib(
22
RpcProto
3-
${CMAKE_SOURCE_DIR}/include/Interface/proto
3+
${CMAKE_SOURCE_DIR}/include/MaaRpc/proto
44
${CMAKE_CURRENT_BINARY_DIR}/generated
55
maa_rpc_proto_src)
66

source/MaaThriftControlUnit/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
generate_thrift_lib(
22
ThriftControlUnitThrift
3-
${PROJECT_SOURCE_DIR}/include/Interface/ThriftController.thrift
3+
${PROJECT_SOURCE_DIR}/include/MaaFramework/Instance/ThriftController.thrift
44
${CMAKE_CURRENT_BINARY_DIR}/generated
55
maa_thrift_controlunit_thrift_src)
66

tools/CMakeLists.txt

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
add_custom_target(tools ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR})
2+
set_property(
3+
TARGET tools
4+
APPEND
5+
PROPERTY ADDITIONAL_CLEAN_FILES ${CMAKE_CURRENT_SOURCE_DIR})
6+
set_target_properties(tools PROPERTIES FOLDER Assets)
7+
install(
8+
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ImageCropper
9+
DESTINATION tools)
10+
install(
11+
FILES ${CMAKE_CURRENT_SOURCE_DIR}/pipeline.schema.json
12+
DESTINATION tools)

0 commit comments

Comments
 (0)