Gentoo Archives: gentoo-commits

From: "Thomas Sachau (tommy)" <tommy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-p2p/fms/files: fms-use-system-libs.patch
Date: Wed, 08 Apr 2009 14:07:28
Message-Id: E1LrYR3-0002Gt-OB@stork.gentoo.org
tommy       09/04/08 14:07:25

  Added:                fms-use-system-libs.patch
  Log:
  Version bump
  (Portage version: 2.2_rc28/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  net-p2p/fms/files/fms-use-system-libs.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-p2p/fms/files/fms-use-system-libs.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-p2p/fms/files/fms-use-system-libs.patch?rev=1.1&content-type=text/plain

Index: fms-use-system-libs.patch
===================================================================
--- CMakeLists.txt	2009-04-04 16:20:16.000000000 +0200
+++ CMakeLists.txt.new	2009-04-08 15:42:06.000000000 +0200
@@ -294,10 +294,15 @@
 		INCLUDE_DIRECTORIES(libs/libtommath)
 	ENDIF(TOMMATH_LIBRARY)
 	
-	# Force use of bundled tomcrypt, as the system library may have been compiled without the features we need
-	ADD_SUBDIRECTORY(libs/libtomcrypt)
-	TARGET_LINK_LIBRARIES(fms tomcrypt)
-	INCLUDE_DIRECTORIES(libs/libtomcrypt/headers)
+	FIND_LIBRARY(TOMCRYPT_LIBRARY NAMES tomcrypt libtomcrypt)
+	
+	IF(TOMCRYPT_LIBRARY)
+		TARGET_LINK_LIBRARIES(fms ${TOMCRYPT_LIBRARY})
+	ELSE(TOMCRYPT_LIBRARY)
+		ADD_SUBDIRECTORY(libs/libtomcrypt)
+		TARGET_LINK_LIBRARIES(fms tomcrypt)
+		INCLUDE_DIRECTORIES(libs/libtomcrypt/headers)
+	ENDIF(TOMCRYPT_LIBRARY)
 
 	
 	ADD_DEFINITIONS(-DFROST_SUPPORT)