diff options
author | dundargoc <gocdundar@gmail.com> | 2024-11-08 17:16:43 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-11-09 13:07:16 +0100 |
commit | 07b14c8e2ed288dfca382719aeb26d544573f51a (patch) | |
tree | b6ff6d8207952d078be1432a96023be61f50a741 /src | |
parent | 4b001f297ae29654b86eccd4dde72b2cc314ca01 (diff) | |
download | rneovim-07b14c8e2ed288dfca382719aeb26d544573f51a.tar.gz rneovim-07b14c8e2ed288dfca382719aeb26d544573f51a.tar.bz2 rneovim-07b14c8e2ed288dfca382719aeb26d544573f51a.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 0ba2eeb376..cb71144130 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -750,6 +750,7 @@ add_custom_target(nvim_runtime_deps) if(WIN32) # Copy DLLs and third-party tools to bin/ and install them along with nvim add_custom_command(TARGET nvim_runtime_deps + POST_BUILD COMMAND ${CMAKE_COMMAND} -E ${COPY_DIRECTORY} ${PROJECT_BINARY_DIR}/windows_runtime_deps/ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) install(DIRECTORY ${PROJECT_BINARY_DIR}/windows_runtime_deps/ @@ -791,7 +792,10 @@ file(MAKE_DIRECTORY ${BINARY_LIB_DIR}) # install treesitter parser if bundled 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() install(DIRECTORY ${BINARY_LIB_DIR} |