summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt35
1 files changed, 26 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 23982a0..9274447 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,14 +2,14 @@ PROJECT(bibletime CXX C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0)
#Version
-ADD_DEFINITIONS(-DBT_VERSION=\\\"2.0.beta2\\\")
+ADD_DEFINITIONS(-DBT_VERSION=\\\"2.0\\\")
#Non-English locales to be processed and installed for UI, handbook and howto
LIST(APPEND MESSAGE_LOCALE_LANGS af bg cs da de en_GB es et fi fr hu it ko nl nn_NO no pl pt_br ro ru sk sv ua vi zh_CN zh_TW)
#WARNING: If you modify HANDBOOK_LOCALE_LANGS or HOWTO_LOCALE_LANGS,
#also modify the po4a conf files in cmake/docs/ to make sure all languages are processed.
LIST(APPEND HANDBOOK_LOCALE_LANGS cs de fi fr hu nl)
-LIST(APPEND HOWTO_LOCALE_LANGS bg cs de fi fr it ko nl pt-br ru)
+LIST(APPEND HOWTO_LOCALE_LANGS bg cs de fi fr it hu ko nl pt-br ru)
######################################################
# Find required packages
@@ -36,6 +36,14 @@ FIND_PACKAGE(Boost REQUIRED)
#
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
FIND_PACKAGE(CLucene REQUIRED)
+
+# optional: Try to detect CURL and add it to the linker flags if found, maybe Sword needs it
+FIND_PACKAGE(CURL)
+# optional: Try to detect ICU and add it to the linker flags if found, maybe Sword needs it
+FIND_PACKAGE(ICU)
+# optional: Try to detect ZLib and add it to the linker flags if found, maybe Sword needs it
+FIND_PACKAGE(ZLIB)
+
FIND_PACKAGE(Sword REQUIRED)
######################################################
@@ -70,6 +78,7 @@ QT4_WRAP_UI(bibletime_UIS_H ${bibletime_UIS})
#This must come before the target definition!
LINK_DIRECTORIES(
${CLUCENE_LIBRARY_DIR}
+ ${SWORD_LIBRARY_DIR}
)
IF(APPLE)
@@ -91,7 +100,11 @@ IF (CMAKE_BUILD_TYPE STREQUAL "Release")
TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME}
${QT_LIBRARIES}
${CLUCENE_LIBRARY}
- ${SWORD_LIBS}
+ ${CURL_LIBRARIES} # optional, empty if not found
+ ${ICU_LIBRARIES} # optional, empty if not found
+ ${ICU_I18N_LIBRARIES} # optional, empty if not found
+ ${ZLIB_LIBRARIES} # optional, empty if not found
+ ${SWORD_LIBRARY}
)
ELSE (CMAKE_BUILD_TYPE STREQUAL "Release")
# this will run moc on source files
@@ -110,7 +123,10 @@ ELSE (CMAKE_BUILD_TYPE STREQUAL "Release")
${QT_LIBRARIES}
${QT_LIBRARIES_DEBUG}
${CLUCENE_LIBRARY}
- ${SWORD_LIBS}
+ ${CURL_LIBRARIES} # optional, empty if not found
+ ${ICU_LIBRARIES} # optional, empty if not found
+ ${ICU_I18N_LIBRARIES} # optional, empty if not found
+ ${SWORD_LIBRARY}
)
# Unit Tests
ADD_CUSTOM_TARGET(test
@@ -246,7 +262,7 @@ ADD_CUSTOM_TARGET("handbook_translations"
FOREACH(HANDBOOK_LOCALE_LANG ${HANDBOOK_LOCALE_LANGS} "en")
ADD_CUSTOM_TARGET("handbook_${HANDBOOK_LOCALE_LANG}"
- COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/cmake/docs/docs.xsl" "../docbook/index.docbook"
+ COMMAND xsltproc --stringparam l10n.gentext.default.language ${HANDBOOK_LOCALE_LANG} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/docs/docs.xsl ../docbook/index.docbook
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/docs/handbook/${HANDBOOK_LOCALE_LANG}/html/")
ADD_DEPENDENCIES("handbook_${HANDBOOK_LOCALE_LANG}" "handbook_translations")
ADD_DEPENDENCIES("handbook" "handbook_${HANDBOOK_LOCALE_LANG}")
@@ -291,7 +307,7 @@ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "BibleTime for Windows Beta")
SET(CPACK_PACKAGE_VENDOR "http://www.bibletime.info")
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
SET(CPACK_PACKAGE_VERSION_MINOR "0")
-SET(CPACK_PACKAGE_VERSION_PATCH "0beta2")
+SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "BibleTime")
######################################################
@@ -363,9 +379,10 @@ ELSEIF(APPLE)
ENDFOREACH(QT_FRAME ${QT_FRAMEWORKS_USED})
# Other libraries I need
INSTALL(FILES "${CLUCENE_LIBRARY}" "${CLUCENE_LIBRARY_DIR}/libclucene.0.0.0.dylib" "${CLUCENE_LIBRARY_DIR}/libclucene.0.dylib" "/opt/local/lib/libcurl.4.dylib"
- "/opt/local/lib/libssl.0.9.8.dylib" "/opt/local/lib/libcrypto.0.9.8.dylib" "/opt/local/lib/libicui18n.40.dylib" "/opt/local/lib/libicui18n.40.0.dylib"
- "/opt/local/lib/libicuuc.40.dylib" "/opt/local/lib/libicuuc.40.0.dylib" "/opt/local/lib/libicuio.40.dylib" "/opt/local/lib/libicuio.40.0.dylib"
- "/opt/local/lib/libicudata.40.dylib" "/opt/local/lib/libicudata.40.0.dylib" "/opt/local/lib/libpng12.0.dylib"
+ "/opt/local/lib/libssl.0.9.8.dylib" "/opt/local/lib/libcrypto.0.9.8.dylib" #"/opt/local/lib/libicui18n.40.dylib" "/opt/local/lib/libicui18n.40.0.dylib"
+ #"/opt/local/lib/libicuuc.40.dylib" "/opt/local/lib/libicuuc.40.0.dylib" "/opt/local/lib/libicuio.40.dylib" "/opt/local/lib/libicuio.40.0.dylib"
+ #"/opt/local/lib/libicudata.40.dylib" "/opt/local/lib/libicudata.40.0.dylib"
+ "/opt/local/lib/libpng12.0.dylib"
DESTINATION "${BT_DESTINATION}/../Library")
# Qt Plugins