From 74f2bcae34238464435bb30237e8a0ca8d605172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Mon, 7 Sep 2020 18:39:59 +0200 Subject: [PATCH] Get rid of one CMake dev warning --- CMakeLists.txt | 6 +++--- cmake/FindNcursesw.cmake | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bb97aa..e9b75b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,12 +89,12 @@ endif (WITH_X11) link_directories (${dependencies_LIBRARY_DIRS}) include_directories (${ZLIB_INCLUDE_DIRS} ${icu_INCLUDE_DIRS} - ${dependencies_INCLUDE_DIRS} ${NCURSESW_INCLUDE_DIRS} + ${dependencies_INCLUDE_DIRS} ${Ncursesw_INCLUDE_DIRS} ${Termo_INCLUDE_DIRS}) # Configuration include (CheckFunctionExists) -set (CMAKE_REQUIRED_LIBRARIES ${NCURSESW_LIBRARIES}) +set (CMAKE_REQUIRED_LIBRARIES ${Ncursesw_LIBRARIES}) CHECK_FUNCTION_EXISTS ("resizeterm" HAVE_RESIZETERM) # Localization @@ -145,7 +145,7 @@ set (project_common_headers # Project libraries set (project_common_libraries ${ZLIB_LIBRARIES} ${icu_LIBRARIES} - ${dependencies_LIBRARIES} ${NCURSESW_LIBRARIES} termo-static) + ${dependencies_LIBRARIES} ${Ncursesw_LIBRARIES} termo-static) # Create a common project library so that source files are only compiled once if (${CMAKE_VERSION} VERSION_GREATER "2.8.7") diff --git a/cmake/FindNcursesw.cmake b/cmake/FindNcursesw.cmake index 88c1d01..0536674 100644 --- a/cmake/FindNcursesw.cmake +++ b/cmake/FindNcursesw.cmake @@ -1,17 +1,17 @@ # Public Domain find_package (PkgConfig REQUIRED) -pkg_check_modules (NCURSESW QUIET ncursesw) +pkg_check_modules (Ncursesw QUIET ncursesw) # OpenBSD doesn't provide a pkg-config file -set (required_vars NCURSESW_LIBRARIES) -if (NOT NCURSESW_FOUND) - find_library (NCURSESW_LIBRARIES NAMES ncursesw) - find_path (NCURSESW_INCLUDE_DIRS ncurses.h) - list (APPEND required_vars NCURSESW_INCLUDE_DIRS) -endif (NOT NCURSESW_FOUND) +set (required_vars Ncursesw_LIBRARIES) +if (NOT Ncursesw_FOUND) + find_library (Ncursesw_LIBRARIES NAMES ncursesw) + find_path (Ncursesw_INCLUDE_DIRS ncurses.h) + list (APPEND required_vars Ncursesw_INCLUDE_DIRS) +endif (NOT Ncursesw_FOUND) include (FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS (NCURSESW DEFAULT_MSG ${required_vars}) +FIND_PACKAGE_HANDLE_STANDARD_ARGS (Ncursesw DEFAULT_MSG ${required_vars}) -mark_as_advanced (NCURSESW_LIBRARIES NCURSESW_INCLUDE_DIRS) +mark_as_advanced (Ncursesw_LIBRARIES Ncursesw_INCLUDE_DIRS)