Warning, /education/marble/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # before add_subdirectory() ! 0002 if(MSVC) 0003 add_definitions(-D_USE_MATH_DEFINES=1) 0004 endif(MSVC) 0005 0006 if(NOT MARBLE_NO_DBUS) 0007 add_definitions(-DMARBLE_DBUS) 0008 endif() 0009 0010 # disabled for now: 0011 # no public Marble QML plugins are installed, libmarbledeclarative is only a shared lib 0012 if (FALSE) 0013 if( Qt5Quick_FOUND ) 0014 OPTION(IGNORE_CMAKE_INSTALL_PREFIX_FOR_DECLARATIVE_PLUGINS "Install Marble Qt Declarative plugins to QT_IMPORTS_DIR even if that is out of the CMAKE_INSTALL_PREFIX") 0015 IF(QT_IMPORTS_DIR) 0016 SET(MARBLE_QT_IMPORTS_DIR ${QT_IMPORTS_DIR}) 0017 ELSE() 0018 # Fallback when FindQt.cmake (part of cmake) does not define QT_IMPORTS_DIR. Get it from qmake instead. 0019 EXEC_PROGRAM( qmake ARGS "-query QT_INSTALL_QML" OUTPUT_VARIABLE MARBLE_QT_IMPORTS_DIR ) 0020 ENDIF() 0021 STRING(LENGTH "${CMAKE_INSTALL_PREFIX}" _MARBLE_CMAKE_INSTALL_PREFIX_LEN) 0022 STRING(LENGTH "${MARBLE_QT_IMPORTS_DIR}" _MARBLE_QT_IMPORTS_DIR_LEN) 0023 IF(NOT ${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) 0024 IF(NOT ${_MARBLE_QT_IMPORTS_DIR_LEN} LESS ${_MARBLE_CMAKE_INSTALL_PREFIX_LEN}) 0025 STRING(SUBSTRING ${MARBLE_QT_IMPORTS_DIR} 0 ${_MARBLE_CMAKE_INSTALL_PREFIX_LEN} _MARBLE_QT_IMPORTS_DIR_START) 0026 IF(NOT ${CMAKE_INSTALL_PREFIX} STREQUAL ${_MARBLE_QT_IMPORTS_DIR_START}) 0027 IF(NOT ${IGNORE_CMAKE_INSTALL_PREFIX_FOR_DECLARATIVE_PLUGINS}) 0028 MESSAGE(STATUS "Please include ${MARBLE_PLUGIN_INSTALL_PATH} in the QML_IMPORT_PATH environment variable to use Marble's Qt declarative plugins.") 0029 MESSAGE(STATUS "Note: Marble Desktop does not make use of declarative plugins. Ignore the message above if you only intend to use the Desktop version.") 0030 SET(MARBLE_QT_IMPORTS_DIR ${MARBLE_PLUGIN_INSTALL_PATH}) 0031 ENDIF() 0032 ENDIF() 0033 ELSE() 0034 IF(NOT ${IGNORE_CMAKE_INSTALL_PREFIX_FOR_DECLARATIVE_PLUGINS}) 0035 MESSAGE(STATUS "Please include ${MARBLE_PLUGIN_INSTALL_PATH} in the QML_IMPORT_PATH environment variable to use Marble's Qt declarative plugins.") 0036 MESSAGE(STATUS "Note: Marble Desktop does not make use of declarative plugins. Ignore the message above if you only intend to use the Desktop version.") 0037 SET(MARBLE_QT_IMPORTS_DIR ${MARBLE_PLUGIN_INSTALL_PATH}) 0038 ENDIF() 0039 ENDIF() 0040 ENDIF() 0041 ENDIF() 0042 endif() 0043 0044 macro_optional_find_package(ZLIB QUIET) 0045 marble_set_package_properties(ZLIB PROPERTIES DESCRIPTION "general-purpose lossless data-compression library") 0046 marble_set_package_properties(ZLIB PROPERTIES URL "https://www.zlib.net/") 0047 marble_set_package_properties(ZLIB PROPERTIES TYPE OPTIONAL PURPOSE "When found, system zlib is used. When not found, a Marble internal zlib is used.") 0048 if(NOT ZLIB_FOUND) 0049 add_subdirectory( 3rdparty/zlib ) 0050 set(ZLIB_LIBRARIES zlibstatic) 0051 set(ZLIB_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/zlib" "${CMAKE_CURRENT_BINARY_DIR}/3rdparty/zlib") 0052 endif() 0053 0054 add_subdirectory( 3rdparty/o5mreader ) 0055 add_subdirectory( 3rdparty/sgp4 ) 0056 add_subdirectory( lib/marble ) 0057 add_subdirectory( lib/astro ) 0058 add_subdirectory( lib/marble/declarative ) 0059 0060 add_subdirectory( plugins ) 0061 0062 option(BUILD_MARBLE_APPS "Build Marble Desktop/Mobile applications" ON) 0063 add_feature_info("Marble Desktop/Mobile applications" BUILD_MARBLE_APPS "Build Marble Desktop/Mobile applications. Toggle with BUILD_MARBLE_APPS=YES/NO.") 0064 if(BUILD_MARBLE_APPS) 0065 add_subdirectory( apps ) 0066 endif() 0067 0068 add_subdirectory( bindings ) 0069 0070 configure_file( 0071 ${CMAKE_CURRENT_SOURCE_DIR}/config-marble.h.cmake 0072 ${CMAKE_CURRENT_BINARY_DIR}/config-marble.h 0073 ) 0074 0075 if(APPLE) 0076 add_subdirectory( mac ) 0077 endif(APPLE) 0078 0079 add_subdirectory( plasma ) 0080 add_subdirectory( plasmarunner ) 0081 add_subdirectory( thumbnailer ) 0082 0083 if(ECM_FOUND) 0084 # Default logging for where no specific category is set 0085 ecm_qt_export_logging_category( 0086 IDENTIFIER "MARBLE_DEFAULT" 0087 CATEGORY_NAME "marble_default" 0088 EXPORT marble 0089 DESCRIPTION "Marble (default)") 0090 0091 ecm_qt_install_logging_categories( 0092 EXPORT marble 0093 DESTINATION "${KDE_INSTALL_LOGGINGCATEGORIESDIR}") 0094 endif()