mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
build: specify POST_BUILD when using add_custom_command
This is needed specifically for the second signature of add_custom_command, which appends an operation to an existing target. This will prevent the cmake warning CMP0175. Reference: https://cmake.org/cmake/help/latest/policy/CMP0175.html
This commit is contained in:
@ -61,6 +61,7 @@ function(add_glob_target)
|
|||||||
if(NOT ARG_COMMAND)
|
if(NOT ARG_COMMAND)
|
||||||
add_custom_target(${ARG_TARGET})
|
add_custom_target(${ARG_TARGET})
|
||||||
add_custom_command(TARGET ${ARG_TARGET}
|
add_custom_command(TARGET ${ARG_TARGET}
|
||||||
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "${ARG_TARGET} SKIP: ${ARG_COMMAND} not found")
|
COMMAND ${CMAKE_COMMAND} -E echo "${ARG_TARGET} SKIP: ${ARG_COMMAND} not found")
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
@ -750,6 +750,7 @@ add_custom_target(nvim_runtime_deps)
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
# Copy DLLs and third-party tools to bin/ and install them along with nvim
|
# Copy DLLs and third-party tools to bin/ and install them along with nvim
|
||||||
add_custom_command(TARGET nvim_runtime_deps
|
add_custom_command(TARGET nvim_runtime_deps
|
||||||
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E ${COPY_DIRECTORY} ${PROJECT_BINARY_DIR}/windows_runtime_deps/
|
COMMAND ${CMAKE_COMMAND} -E ${COPY_DIRECTORY} ${PROJECT_BINARY_DIR}/windows_runtime_deps/
|
||||||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
install(DIRECTORY ${PROJECT_BINARY_DIR}/windows_runtime_deps/
|
install(DIRECTORY ${PROJECT_BINARY_DIR}/windows_runtime_deps/
|
||||||
@ -791,7 +792,10 @@ file(MAKE_DIRECTORY ${BINARY_LIB_DIR})
|
|||||||
|
|
||||||
# install treesitter parser if bundled
|
# install treesitter parser if bundled
|
||||||
if(EXISTS ${DEPS_PREFIX}/lib/nvim/parser)
|
if(EXISTS ${DEPS_PREFIX}/lib/nvim/parser)
|
||||||
add_custom_command(TARGET nvim_runtime_deps COMMAND ${CMAKE_COMMAND} -E ${COPY_DIRECTORY} ${DEPS_PREFIX}/lib/nvim/parser ${BINARY_LIB_DIR}/parser)
|
add_custom_command(
|
||||||
|
TARGET nvim_runtime_deps
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E ${COPY_DIRECTORY} ${DEPS_PREFIX}/lib/nvim/parser ${BINARY_LIB_DIR}/parser)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(DIRECTORY ${BINARY_LIB_DIR}
|
install(DIRECTORY ${BINARY_LIB_DIR}
|
||||||
|
Reference in New Issue
Block a user