summarylogtreecommitdiffstats
path: root/make-ZyppCommon-cmake-module-includable.patch
blob: a33473d68c59700f15ea2a0a4d7d70080272e654 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,18 @@
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
 #
 
+IF (DEFINED ZYPP_PREFIX)
+  SET( CMAKE_MODULE_PATH
+    ${ZYPP_PREFIX}/${LIB}/cmake/Zypp/                                                                                        
+    ${CMAKE_MODULE_PATH}
+  )
+ELSE (DEFINED ZYPP_PREFIX)
+  SET( CMAKE_MODULE_PATH
+    ${CMAKE_INSTALL_PREFIX}/${LIB}/cmake/Zypp/
+    ${CMAKE_MODULE_PATH}
+  )
+ENDIF (DEFINED ZYPP_PREFIX)
+
 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
 SET(CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Modules ${CMAKE_MODULE_PATH})