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