Warning, /office/kexi/src/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
0002 
0003 check_function_exists("uname" HAVE_UNAME)
0004 
0005 simple_option(KEXI_SHOW_UNFINISHED "Show unfinished features in Kexi. Thus is useful for testing but may confuse end-user." OFF)
0006 simple_option(KEXI_SHOW_UNIMPLEMENTED "Forces to show menu entries and dialogs just to give impression about development plans for Kexi. Only recommended for test/development versions." OFF)
0007 
0008 # Extra GUI features
0009 if(NOT KEXI_MOBILE)
0010     simple_option(KEXI_AUTORISE_TABBED_TOOLBAR "Experimental: Autorise the main tabbed toolbar in Kexi" OFF)
0011     if(WIN32 OR APPLE)
0012         set(_KEXI_USE_KFILEWIDGET_DEFAULT OFF)
0013     else()
0014         set(_KEXI_USE_KFILEWIDGET_DEFAULT ON)
0015     endif()
0016     simple_option(KEXI_USE_KFILEWIDGET "Use KFileWidget-based inline file browser in Kexi. If OFF, a simple \
0017 replacement file widget with native file dialogs is used. ON by default on UNIX, OFF by default on Windows \
0018 and macOS. \
0019 Note: Non-plasma Linux desktops still default to the simple replacement at runtime."
0020            ${_KEXI_USE_KFILEWIDGET_DEFAULT}
0021     )
0022 endif(NOT KEXI_MOBILE)
0023 
0024 # Experimental:
0025 simple_option(KEXI_SCRIPTS_SUPPORT "Experimental: Enable scripting in Kexi" OFF)
0026 if(KEXI_SCRIPTS_SUPPORT)
0027     set(REQUIRED_QTQML_VERSION 5.8.0) # >= 5.8 because of QJSEngine::newQMetaObject()
0028     find_package(Qt5Qml ${REQUIRED_QTQML_VERSION} REQUIRED)
0029     set_package_properties(Qt5Qml PROPERTIES
0030                         DESCRIPTION "A framework for developing applications and libraries with the QML and JavaScript language."
0031                         URL "https://qt.io"
0032                         TYPE REQUIRED PURPOSE "Required by Kexi scripting (JavaScript)"
0033     )
0034 endif()
0035 
0036 # Broken:
0037 simple_option(KEXI_FORM_CURSOR_PROPERTY_SUPPORT "Broken: Enable \"cursor\" property in the form designer" OFF)
0038 simple_option(KEXI_SHOW_CONTEXT_HELP "Broken: Enable context help in Kexi main window" OFF)
0039 simple_option(KEXI_QUICK_PRINTING_SUPPORT "Broken: Enable print/print preview/print setup for tables/queries in the project navigator" OFF)
0040 simple_option(KEXI_AUTOFIELD_FORM_WIDGET_SUPPORT "Broken: Enable \"auto field\" form widget in the form designer" OFF)
0041 # OFF because we need to replace it with QTreeWidget which uses very different API compared to Q3ListView. Re-add QTreeWidget?
0042 simple_option(KEXI_LIST_FORM_WIDGET_SUPPORT "Broken: Enable \"list\" form widget in the form designer" OFF)
0043 simple_option(KEXI_PIXMAP_COLLECTIONS_SUPPORT "Broken: Enable support for pixmap collections" OFF)
0044 
0045 # Not available:
0046 simple_option(KEXI_MACROS_SUPPORT "Experimental: Enable macros in Kexi" OFF)
0047 if(KEXI_MACROS_SUPPORT) # temp.
0048     message(FATAL_ERROR "Macros are not yet available.")
0049 endif()
0050 simple_option(KEXI_TABLE_PRINT_SUPPORT "Experimental: Enable printing of tabular view in Kexi" OFF) # broken since Kexi 2
0051 if(KEXI_TABLE_PRINT_SUPPORT) # temp.
0052     message(FATAL_ERROR "Table printing is not yet available.")
0053 endif()
0054 simple_option(KEXI_PROJECT_TEMPLATES "Experimental: Enable support for project templates in Kexi" OFF) # broken since Kexi 2
0055 if(KEXI_PROJECT_TEMPLATES) # temp.
0056     message(FATAL_ERROR "Project templates are not yet available.")
0057 endif()
0058 
0059 #See commit 1e433a54cd9, left here for reference
0060 #option(KEXI_SQLITE_MIGRATION "If defined, SQLite3 migration to some newer format is possible. Users can see a suitable question on app's startup." OFF)
0061 
0062 add_definitions(-DTRANSLATION_DOMAIN=\"kexi\")
0063 
0064 #no default: add_definitions(-DKDE_DEFAULT_DEBUG_AREA=44010)
0065 
0066 macro_bool_to_01(SHOULD_BUILD_KEXI_DESKTOP_APP KEXI_DESKTOP)
0067 macro_bool_to_01(SHOULD_BUILD_KEXI_MOBILE_APP KEXI_MOBILE)
0068 configure_file(config-kexi.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kexi.h )
0069 configure_file(KexiVersion.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/KexiVersion.h)
0070 
0071 include_directories(
0072   ${CMAKE_CURRENT_SOURCE_DIR}
0073   ${CMAKE_CURRENT_BINARY_DIR}
0074   ${CMAKE_CURRENT_BINARY_DIR}/core
0075 )
0076 
0077 add_subdirectory( kexiutils )
0078 add_subdirectory( core )
0079 
0080 if(SHOULD_BUILD_KEXI_DESKTOP_APP)
0081     add_subdirectory( widget )
0082     add_subdirectory( main )
0083     add_subdirectory( formeditor )
0084     add_subdirectory( migration )
0085 endif()
0086 
0087 add_subdirectory( data )
0088 add_subdirectory( plugins )
0089 
0090 if (BUILD_TESTING)
0091 #TODO KEXI3 add_subdirectory( tests )
0092 endif()
0093 
0094 ########### next target ###############
0095 
0096 if(SHOULD_BUILD_KEXI_DESKTOP_APP)
0097     set(kexi_SRCS
0098         main.cpp
0099         Messages.sh
0100 
0101         # non-source:
0102         ${CMAKE_SOURCE_DIR}/kundo2_aware_xgettext.sh
0103         Mainpage.dox
0104         Messages.sh
0105     )
0106     kexi_add_app_metadata_files(kexi_SRCS)
0107     kexi_add_executable(kexi ${kexi_SRCS})
0108     kexi_add_app_icons()
0109     target_link_libraries(kexi
0110         PRIVATE
0111             keximain
0112     )
0113     install(TARGETS kexi ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0114 
0115     add_subdirectory( pics )
0116 endif()
0117 
0118 if(SHOULD_BUILD_KEXI_MOBILE_APP)
0119 #  add_subdirectory( mobile )
0120 endif()
0121 
0122 if(BUILD_EXAMPLES)
0123     add_subdirectory(examples)
0124 endif()