Skip to content

Commit

Permalink
fix: fix cmake conflict in yaml-cpp 0.8.0
Browse files Browse the repository at this point in the history
CMake Error at librime/CMakeLists.txt:187 (add_custom_target):
  add_custom_target cannot create target "uninstall" because another target
  with the same name already exists.  The existing target is a custom target
  created in source directory
  "github/trime/app/src/main/jni/librime/deps/yaml-cpp".  See
  documentation for policy CMP0002 for more details.
  • Loading branch information
Bambooin committed Sep 4, 2023
1 parent acbcb10 commit 5060ce9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,12 @@ if(NOT DEFINED BIN_INSTALL_DIR)
endif()
# }

# uninstall target
# remove target
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
add_custom_target(remove
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)

if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|DragonFly|GNU" OR MINGW)
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ install-debug:
cmake --build $(build) --target install

uninstall:
cmake --build $(build) --target uninstall
cmake --build $(build) --target remove

uninstall-debug:
cmake --build $(build) --target uninstall
cmake --build $(build) --target remove

test: release
(cd $(build)/test; ./rime_test)
Expand Down

0 comments on commit 5060ce9

Please sign in to comment.