Commit d1bdfc12 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Make marble, ICU and SQLite optional

Once the textshape starts using calligradb,
it'll have to be disabled if we cannot build
calligradb because of a missing icu, but there
is no reason to stop people from building the
other parts of calligra.

The previous way of disabling was done with a
IF(CREATIVEONLY) block, but that hides the variables
and makes everything fail in creativeonly mode.
parent af4b56f9
......@@ -62,7 +62,7 @@ ELSEIF (CREATIVEONLY)
set(SHOULD_BUILD_FLOW FALSE)
set(SHOULD_BUILD_PLAN FALSE)
set(SHOULD_BUILD_KDGANTT FALSE)
set(SHOULD_BUILD_SCRIPTING TRUE)
set(SHOULD_BUILD_SCRIPTING FALSE)
set(SHOULD_BUILD_KOREPORT FALSE)
set(SHOULD_BUILD_BRAINDUMP FALSE)
set(SHOULD_BUILD_CALLIGRA FALSE)
......@@ -107,8 +107,8 @@ else (QT3SUPPORT)
find_package(Qt4 4.6.0 REQUIRED QtCore QtGui QtXml QtScript QtSvg QtTest QtWebKit QtDBus QtOpenGL)
endif (QT3SUPPORT)
include(KDE4Defaults)
include(MacroLibrary)
include (KDE4Defaults)
include (MacroLibrary)
include (MacroAdditionalCleanFiles)
include (MacroAddFileDependencies)
......@@ -161,43 +161,40 @@ if (APPLE)
find_package(Carbon REQUIRED)
endif (APPLE)
###########################
############################
## Optional dependencies ##
############################
###########################
##
## Test for sqlite
##
set(SQLITE_MIN_VERSION 3.6.16)
set(SQLITE_RECOMMENDED_VERSION 3.7.12)
set(SQLITE_LOAD_EXTENSION_REQUIRED ON)
find_package(CalligraSqlite 3.6.16 REQUIRED)
macro_optional_find_package(CalligraSqlite 3.6.16)
macro_bool_to_01(SQLITE_FOUND HAVE_SQLITE)
macro_log_feature(SQLITE_FOUND "SQLite" "Embedded SQL database engine with enabled extensions loading"
"http://www.sqlite.org" FALSE "${SQLITE_MIN_VERSION}"
"Required by Calligra's default database handler.")
if (NOT CREATIVEONLY)
"Required by Calligra's default database handler for Kexi and Words.")
##
## Test for ICU
##
find_package(ICU REQUIRED)
macro_optional_find_package(ICU)
macro_bool_to_01(ICU_FOUND HAVE_ICU)
macro_log_feature(ICU_FOUND "ICU" "International Components for Unicode (ICU) Library"
"http://icu-project.org" FALSE ""
"Required by Calligra's default database handler.")
endif (NOT CREATIVEONLY)
################################
#################################
## Check for OpenEXR ##
#################################
################################
"Required by Calligra's default database handler for Kexi and Words.")
##
## Check for OpenEXR
##
macro_optional_find_package(OpenEXR)
macro_bool_to_01(OPENEXR_FOUND HAVE_OPENEXR)
###########################
############################
## Optional dependencies ##
############################
###########################
##
## Look for OpenGL
##
......@@ -246,7 +243,6 @@ set(EXIV2_MIN_VERSION "0.16")
macro_optional_find_package(Exiv2)
macro_log_feature(EXIV2_FOUND "Exiv2" "Image metadata library and tools" "http://www.exiv2.org" FALSE "0.16" "Required by Krita")
if (NOT CREATIVEONLY)
##
## Test for soprano
##
......@@ -290,10 +286,6 @@ if( MARBLE_FOUND )
endif( MARBLECONTROLBOX_H )
endif( MARBLE_FOUND )
endif (NOT CREATIVEONLY)
##
## Test for lcms
##
......
......@@ -8,18 +8,22 @@ add_subdirectory( pigment )
add_subdirectory( main )
add_subdirectory( kundo2 )
if (NOT CREATIVEONLY)
if (SHOULD_BUILD_SCRIPTING)
add_subdirectory( kokross )
endif (SHOULD_BUILD_SCRIPTING)
add_subdirectory( kopageapp )
if (NOT CREATIVEONLY)
add_subdirectory( kopageapp )
endif (NOT CREATIVEONLY)
if(NOT TINY)
add_subdirectory( koproperty ) # TODO move to independent place like kdesupport
add_subdirectory( db ) # used by Kexi and Word's Biblio; TODO: remove when Predicate lib arrives
if (HAVE_ICU AND HAVE_SQLITE)
add_subdirectory( db ) # used by Kexi and Word's Biblio; TODO: remove when Predicate lib arrives
endif ()
endif(NOT TINY)
# only build koreport if possible
if (SHOULD_BUILD_KOREPORT)
add_subdirectory( koreport )
endif (SHOULD_BUILD_KOREPORT)
endif (NOT CREATIVEONLY)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment