Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > media > main-testing-src > by-pkgid > 357e0466909645e33fa8bfa6e2222a8a > files > 7

kdebase4-runtime-4.4.5-0.1mdv2010.2.src.rpm

Index: runtime/cmake/modules/FindUpnp.cmake
===================================================================
--- runtime/cmake/modules/FindUpnp.cmake	(revision 0)
+++ runtime/cmake/modules/FindUpnp.cmake	(revision 1079845)
@@ -0,0 +1,29 @@
+# - Try to find Upnp
+# Once done this will define
+#
+#  UPNP_FOUND - system has Upnp
+#  UPNP_INCLUDE_DIR - the Upnp include directory
+#  UPNP_LIBRARIES - Link these to use Upnp
+#  UPNP_DEFINITIONS - Compiler switches required for using Upnp
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+
+if ( UPNP_INCLUDE_DIR AND UPNP_LIBRARIES )
+   # in cache already
+   SET(Upnp_FIND_QUIETLY TRUE)
+endif ( UPNP_INCLUDE_DIR AND UPNP_LIBRARIES )
+
+FIND_PATH(UPNP_INCLUDE_DIR NAMES upnp/device.h
+)
+
+FIND_LIBRARY(UPNP_LIBRARIES NAMES upnp
+)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Upnp DEFAULT_MSG UPNP_INCLUDE_DIR UPNP_LIBRARIES )
+
+# show the UPNP_INCLUDE_DIR and UPNP_LIBRARIES variables only in the advanced view
+MARK_AS_ADVANCED(UPNP_INCLUDE_DIR UPNP_LIBRARIES )
+
Index: runtime/kioslave/network/CMakeLists.txt
===================================================================
--- runtime/kioslave/network/CMakeLists.txt	(revision 1079844)
+++ runtime/kioslave/network/CMakeLists.txt	(revision 1079845)
@@ -1,5 +1,8 @@
-add_subdirectory( network )
-add_subdirectory( ioslave )
-add_subdirectory( kded )
-add_subdirectory( mimetypes )
-add_subdirectory( kupnp )
+macro_optional_find_package(Upnp)
+if(FOUND_UPNP)
+ add_subdirectory( network )
+ add_subdirectory( ioslave )
+ add_subdirectory( kded )
+ add_subdirectory( mimetypes )
+ add_subdirectory( kupnp )
+endif(FOUND_UPNP)