-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: skip MaaAgentBinary if not found, and update "local build" of …
…docs
- Loading branch information
Showing
2 changed files
with
55 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
add_library(HeaderOnlyLibraries INTERFACE) | ||
target_include_directories(HeaderOnlyLibraries INTERFACE include) | ||
|
||
add_custom_command( | ||
OUTPUT ${CMAKE_BINARY_DIR}/MaaAgentBinary | ||
COMMAND | ||
${CMAKE_COMMAND} -E copy_directory | ||
${CMAKE_CURRENT_SOURCE_DIR}/MaaAgentBinary | ||
${CMAKE_BINARY_DIR}/MaaAgentBinary) | ||
add_custom_target(AgentBinary ALL | ||
DEPENDS ${CMAKE_BINARY_DIR}/MaaAgentBinary) | ||
set_property( | ||
TARGET AgentBinary | ||
APPEND | ||
PROPERTY ADDITIONAL_CLEAN_FILES ${CMAKE_BINARY_DIR}/MaaAgentBinary) | ||
set_target_properties(AgentBinary PROPERTIES FOLDER Assets) | ||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/MaaAgentBinary | ||
DESTINATION share) | ||
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/MaaAgentBinary/README.md) | ||
add_custom_command( | ||
OUTPUT ${CMAKE_BINARY_DIR}/MaaAgentBinary | ||
COMMAND | ||
${CMAKE_COMMAND} -E copy_directory | ||
${CMAKE_CURRENT_SOURCE_DIR}/MaaAgentBinary | ||
${CMAKE_BINARY_DIR}/MaaAgentBinary) | ||
add_custom_target(AgentBinary ALL | ||
DEPENDS ${CMAKE_BINARY_DIR}/MaaAgentBinary) | ||
set_property( | ||
TARGET AgentBinary | ||
APPEND | ||
PROPERTY ADDITIONAL_CLEAN_FILES ${CMAKE_BINARY_DIR}/MaaAgentBinary) | ||
set_target_properties(AgentBinary PROPERTIES FOLDER Assets) | ||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/MaaAgentBinary | ||
DESTINATION share) | ||
else() | ||
message(STATUS "MaaAgentBinary not found, skipping") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters