]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Fix build with rpm headers in non-standard path 376/head
authorDmitry Mikhirev <mikhirev@users.noreply.github.com>
Thu, 23 Apr 2020 12:27:38 +0000 (15:27 +0300)
committerGitHub <noreply@github.com>
Thu, 23 Apr 2020 12:27:38 +0000 (15:27 +0300)
CMakeLists.txt

index 347bb0de315334dfdc2e5d22446f9ca24811d0eb..5aee875cd125c158ae787af9bb780ae985959523 100644 (file)
@@ -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)