From: Dmitry Mikhirev Date: Thu, 23 Apr 2020 12:27:38 +0000 (+0300) Subject: Fix build with rpm headers in non-standard path X-Git-Tag: 0.7.15~19^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F376%2Fhead;p=thirdparty%2Flibsolv.git Fix build with rpm headers in non-standard path --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 347bb0de..5aee875c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,6 +209,12 @@ ENDIF (ENABLE_RPMDB) INCLUDE (CheckIncludeFile) IF (ENABLE_RPMDB OR ENABLE_RPMPKG_LIBRPM) + FIND_PATH (RPM_INCLUDE_DIR NAMES rpm/rpmio.h) + IF (RPM_INCLUDE_DIR) + INCLUDE_DIRECTORIES (${RPM_INCLUDE_DIR}) + SET (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${RPM_INCLUDE_DIR}) + ENDIF (RPM_INCLUDE_DIR) + FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb) IF (NOT RPMDB_LIBRARY)