[sword-svn] r3116 - trunk/cmake

chrislit at crosswire.org chrislit at crosswire.org
Wed Mar 12 21:40:54 MST 2014


Author: chrislit
Date: 2014-03-12 21:40:53 -0700 (Wed, 12 Mar 2014)
New Revision: 3116

Modified:
   trunk/cmake/muxsources.cmake
Log:
fixed cmake detection of libbz2 & liblzma


Modified: trunk/cmake/muxsources.cmake
===================================================================
--- trunk/cmake/muxsources.cmake	2014-03-13 03:11:14 UTC (rev 3115)
+++ trunk/cmake/muxsources.cmake	2014-03-13 04:40:53 UTC (rev 3116)
@@ -30,30 +30,30 @@
 ENDIF(SWORD_NO_ZLIB STREQUAL "Yes")
 
 # Check for if we've found bzip2 (libbz2)
-IF(SWORD_NO_BZIP2 STREQUAL "Yes")
-	MESSAGE(STATUS "bzip2: excluded by use option")
-	ADD_DEFINITIONS(-DEXCLUDEBZIP2)
-	SET(WITH_BZIP2 0)
-ELSE(SWORD_NO_BZIP2 STREQUAL "Yes")
+IF(BZIP2_FOUND AND NOT SWORD_NO_BZIP2 STREQUAL "Yes")
 	SET(sword_SOURCES ${sword_SOURCES} ${sword_bzip2_used_SOURCES})
 	IF(BZIP2_FOUND)
 		MESSAGE(STATUS "bzip2: system ${BZIP2_LIBRARY}")
 		SET(WITH_BZIP2 1)
 	ENDIF(BZIP2_FOUND)
-ENDIF(SWORD_NO_BZIP2 STREQUAL "Yes")
+ELSE(BZIP2_FOUND AND NOT SWORD_NO_BZIP2 STREQUAL "Yes")
+	MESSAGE(STATUS "bzip2: no")
+	ADD_DEFINITIONS(-DEXCLUDEBZIP2)
+	SET(WITH_BZIP2 0)
+ENDIF(BZIP2_FOUND AND NOT SWORD_NO_BZIP2 STREQUAL "Yes")
 
 # Check for if we've found xz (liblzma)
-IF(SWORD_NO_XZ STREQUAL "Yes")
-	MESSAGE(STATUS "xz: excluded by use option")
-	ADD_DEFINITIONS(-DEXCLUDEXZ)
-	SET(WITH_XZ 0)
-ELSE(SWORD_NO_XZ STREQUAL "Yes")
+IF(XZ_FOUND AND NOT SWORD_NO_XZ STREQUAL "Yes")
 	SET(sword_SOURCES ${sword_SOURCES} ${sword_xz_used_SOURCES})
 	IF(XZ_FOUND)
 		MESSAGE(STATUS "xz: system ${XZ_LIBRARY}")
 		SET(WITH_XZ 1)
 	ENDIF(XZ_FOUND)
-ENDIF(SWORD_NO_XZ STREQUAL "Yes")
+ELSE(XZ_FOUND AND NOT SWORD_NO_XZ STREQUAL "Yes")
+	MESSAGE(STATUS "xz: no")
+	ADD_DEFINITIONS(-DEXCLUDEXZ)
+	SET(WITH_XZ 0)
+ENDIF(XZ_FOUND AND NOT SWORD_NO_XZ STREQUAL "Yes")
 
 # Check for if we've found cURL
 IF(CURL_FOUND AND NOT SWORD_NO_CURL STREQUAL "Yes")




More information about the sword-cvs mailing list