From 287912d6fc7ab0ab0b5f69a4a5260b5bf53121ba Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 5 Nov 2020 00:14:32 +0100 Subject: Rename CMake find_package helpers to avoid developer warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit | CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message): | The package name passed to `find_package_handle_standard_args` (Berkeley) | does not match the name of the calling package (BerkeleyDB). This can lead | to problems in calling code that expects `find_package` result variables | (e.g., `_FOUND`) to follow a certain pattern. | Call Stack (most recent call first): | CMake/FindBerkeleyDB.cmake:57 (find_package_handle_standard_args) | CMakeLists.txt:83 (find_package) | This warning is for project developers. Use -Wno-dev to suppress it. And indeed, we checked for BERKLEY_DB_FOUND which was not defined so our HAVE_BDB was not set – just that it is never used, so it wasn't noticed. --- ftparchive/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ftparchive') diff --git a/ftparchive/CMakeLists.txt b/ftparchive/CMakeLists.txt index 9aa6606f1..4af250474 100644 --- a/ftparchive/CMakeLists.txt +++ b/ftparchive/CMakeLists.txt @@ -1,4 +1,4 @@ -include_directories(${BERKELEY_DB_INCLUDE_DIRS}) +include_directories(${BERKELEY_INCLUDE_DIRS}) # Definition of the C++ files used to build the program - note that this # is expanded at CMake time, so you have to rerun cmake if you add or remove # a file (you can just run cmake . in the build directory) @@ -6,8 +6,8 @@ file(GLOB_RECURSE source "*.cc") add_executable(apt-ftparchive ${source}) # Link the executables against the libraries -target_include_directories(apt-ftparchive PRIVATE ${BERKELEY_DB_INCLUDE_DIRS}) -target_link_libraries(apt-ftparchive apt-pkg apt-private ${BERKELEY_DB_LIBRARIES}) +target_include_directories(apt-ftparchive PRIVATE ${BERKELEY_INCLUDE_DIRS}) +target_link_libraries(apt-ftparchive apt-pkg apt-private ${BERKELEY_LIBRARIES}) # Install the executables install(TARGETS apt-ftparchive RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -- cgit v1.2.3