summaryrefslogtreecommitdiff
path: root/cmake/muxsources.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/muxsources.cmake')
-rw-r--r--cmake/muxsources.cmake30
1 files changed, 29 insertions, 1 deletions
diff --git a/cmake/muxsources.cmake b/cmake/muxsources.cmake
index cf60af6..40c42bd 100644
--- a/cmake/muxsources.cmake
+++ b/cmake/muxsources.cmake
@@ -5,12 +5,14 @@
#
# Written by Greg Hellings
SET(sword_SOURCES ${sword_base_SOURCES})
+
+MESSAGE(STATUS "\n-- CONFIGURING SOURCE LIST")
+
# Check for if we've found ZLIB
# This one is a bit more unique, since we still allow compilation without
# a ZLIB at all, and allowing a user to disable it does not bring about use
# of some internal fall-back but just leaves the ability to read ZLIB files
# out of the library altogether
-MESSAGE(STATUS "\n-- CONFIGURING SOURCE LIST")
IF(SWORD_NO_ZLIB STREQUAL "Yes")
MESSAGE(STATUS "ZLib: excluded by use option")
ADD_DEFINITIONS(-DEXCLUDEZLIB)
@@ -27,6 +29,32 @@ ELSE(SWORD_NO_ZLIB STREQUAL "Yes")
ENDIF(NOT ZLIB_FOUND OR SWORD_USE_INTERNAL_ZLIB STREQUAL "Yes")
ENDIF(SWORD_NO_ZLIB STREQUAL "Yes")
+# Check for if we've found bzip2 (libbz2)
+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)
+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(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)
+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")
MESSAGE(STATUS "cURL: system ${CURL_LIBRARY} and ${CURL_INCLUDE_DIRS}")