Blame SOURCES/kdenetwork-4.10.0-kopete_system_iris.patch

74b83a
diff -up kdenetwork-4.10.0/kopete/protocols/jabber/CMakeLists.txt.kopete_system_iris kdenetwork-4.10.0/kopete/protocols/jabber/CMakeLists.txt
74b83a
--- kdenetwork-4.10.0/kopete/protocols/jabber/CMakeLists.txt.kopete_system_iris	2013-01-23 16:17:12.000000000 -0600
74b83a
+++ kdenetwork-4.10.0/kopete/protocols/jabber/CMakeLists.txt	2013-02-11 09:14:26.067395997 -0600
74b83a
@@ -1,19 +1,32 @@
74b83a
 add_definitions(-DQT3_SUPPORT -DQT3_SUPPORT_WARNINGS -DIRIS_XMPP_JID_DEPRECATED)
74b83a
 
74b83a
 add_subdirectory( icons ) 
74b83a
-add_subdirectory( libiris ) 
74b83a
 
74b83a
 #FIXME:glib : necessary ?
74b83a
 include_directories( 
74b83a
 ${KOPETE_INCLUDES} 
74b83a
 ${CMAKE_CURRENT_SOURCE_DIR}/ui/
74b83a
 ${CMAKE_CURRENT_SOURCE_DIR}/tasks/
74b83a
+)
74b83a
+
74b83a
+if(USE_SYSTEM_IRIS)
74b83a
+find_package(PkgConfig REQUIRED)
74b83a
+pkg_check_modules(IRIS REQUIRED iris irisnet)
74b83a
+include_directories( ${IRIS_INCLUDE_DIRS} )
74b83a
+link_directories( ${IRIS_LIBRARY_DIRS} )
74b83a
+else(USE_SYSTEM_IRIS)
74b83a
+add_subdirectory( libiris )
74b83a
+
74b83a
+include_directories(
74b83a
 ${CMAKE_CURRENT_SOURCE_DIR}/libiris/include/
74b83a
 ${CMAKE_CURRENT_SOURCE_DIR}/libiris/iris/
74b83a
 ${CMAKE_CURRENT_SOURCE_DIR}/libiris/iris/xmpp/jingle
74b83a
 ${QCA2_INCLUDE_DIR}
74b83a
 )
74b83a
 
74b83a
+link_directories( ${CMAKE_CURRENT_BINARY_DIR}/libiris/ )
74b83a
+endif(USE_SYSTEM_IRIS)
74b83a
+
74b83a
 if(BUILD_GOOGLETALK)
74b83a
   # We dont need other programs
74b83a
   set ( BUILD_libjingle_natserver false )
74b83a
@@ -43,9 +56,6 @@ IF(BUILD_JINGLE)
74b83a
   include_directories(${CMAKE_CURRENT_SOURCE_DIR}/jingle)
74b83a
 ENDIF(BUILD_JINGLE)
74b83a
 
74b83a
-#link_directories( ${CMAKE_CURRENT_BINARY_DIR}/libiris/ ${CMAKE_CURRENT_BINARY_DIR}/jingle/ )
74b83a
-link_directories( ${CMAKE_CURRENT_BINARY_DIR}/libiris/ )
74b83a
-
74b83a
 ########### next target ###############
74b83a
 
74b83a
 set(kopete_jabber_ui_SRCS 
74b83a
@@ -178,7 +188,12 @@ endif(BUILD_JINGLE)
74b83a
 kde4_add_plugin(kopete_jabber ${kopete_jabber_PART_SRCS})
74b83a
 
74b83a
 
74b83a
-target_link_libraries(kopete_jabber ${KDE4_KDE3SUPPORT_LIBS} ${QCA2_LIBRARIES} ${KDE4_SOLID_LIBS} kopete iris_kopete)
74b83a
+target_link_libraries(kopete_jabber ${KDE4_KDE3SUPPORT_LIBS} ${QCA2_LIBRARIES} ${KDE4_SOLID_LIBS} kopete)
74b83a
+if(USE_SYSTEM_IRIS)
74b83a
+target_link_libraries(kopete_jabber ${IRIS_LIBRARIES})
74b83a
+else(USE_SYSETM_IRIS)
74b83a
+target_link_libraries(kopete_jabber iris_kopete)
74b83a
+endif(USE_SYSTEM_IRIS)
74b83a
 if(BUILD_JINGLE)	
74b83a
   target_link_libraries(kopete_jabber ortp asound speex)
74b83a
 endif(BUILD_JINGLE)