aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-06-21 03:48:46 +0200
committerGitHub <noreply@github.com>2019-06-21 03:48:46 +0200
commitaa090f98015c94bf7c3fa43726f2d18fac2ae085 (patch)
treef20c05ad3c1721679e364fa76e4baaff57e3d901
parente28a7a366d7c5179e2bb9f16f67ea5e848576273 (diff)
downloadrneovim-aa090f98015c94bf7c3fa43726f2d18fac2ae085.tar.gz
rneovim-aa090f98015c94bf7c3fa43726f2d18fac2ae085.tar.bz2
rneovim-aa090f98015c94bf7c3fa43726f2d18fac2ae085.zip
cmake: fix usage of find_package_handle_standard_args (#10288)
The package argument is case sensitive, which is important to handle X_FIND_REQUIRED properly, i.e. error out early if it is not found: CMake Error at /usr/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find Unibilium (missing: UNIBILIUM_LIBRARY UNIBILIUM_INCLUDE_DIR) Otherwise it would continue until: CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: UNIBILIUM_INCLUDE_DIR (ADVANCED) Quickly checked via `rg 'find_package_handle_standard|find_package.*REQUIRED' -I | sort`. Ref: https://gitlab.kitware.com/cmake/cmake/issues/19413
-rw-r--r--cmake/FindLibLUV.cmake2
-rw-r--r--cmake/FindUnibilium.cmake2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmake/FindLibLUV.cmake b/cmake/FindLibLUV.cmake
index d8ce9264c3..619f6dfcab 100644
--- a/cmake/FindLibLUV.cmake
+++ b/cmake/FindLibLUV.cmake
@@ -26,7 +26,7 @@ set(LIBLUV_INCLUDE_DIRS ${LIBLUV_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBLUV_FOUND to TRUE
# if all listed variables are TRUE
-find_package_handle_standard_args(libluv DEFAULT_MSG
+find_package_handle_standard_args(LibLUV DEFAULT_MSG
LIBLUV_LIBRARY LIBLUV_INCLUDE_DIR)
mark_as_advanced(LIBLUV_INCLUDE_DIR LIBLUV_LIBRARY)
diff --git a/cmake/FindUnibilium.cmake b/cmake/FindUnibilium.cmake
index cf0ccda877..4aa48a3d7d 100644
--- a/cmake/FindUnibilium.cmake
+++ b/cmake/FindUnibilium.cmake
@@ -41,7 +41,7 @@ set(UNIBILIUM_INCLUDE_DIRS ${UNIBILIUM_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set UNIBILIUM_FOUND to TRUE
# if all listed variables are TRUE
-find_package_handle_standard_args(unibilium DEFAULT_MSG
+find_package_handle_standard_args(Unibilium DEFAULT_MSG
UNIBILIUM_LIBRARY UNIBILIUM_INCLUDE_DIR)
mark_as_advanced(UNIBILIUM_INCLUDE_DIR UNIBILIUM_LIBRARY)