diff --git a/CMakeLists.txt b/CMakeLists.txt index 60ae35f7453..efd560116da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,20 @@ IF(NOT MSVC) endif(USE_CCACHE) endif(NOT MSVC) +IF (IOS) + SET (DEFAULT_FORCE_STATIC_LIBS TRUE) +ELSE (IOS) + SET (DEFAULT_FORCE_STATIC_LIBS FALSE) +ENDIF (IOS) +SET (FORCE_STATIC_LIBS ${DEFAULT_FORCE_STATIC_LIBS} CACHE BOOL "Determines whether libraries should be static only") +MARK_AS_ADVANCED(FORCE_STATIC_LIBS) + +IF(FORCE_STATIC_LIBS) + SET(LIBRARY_TYPE STATIC) +ELSE (FORCE_STATIC_LIBS) + SET(LIBRARY_TYPE SHARED) +ENDIF (FORCE_STATIC_LIBS) + # in generated makefiles use relative paths so the project dir is moveable # Note commented out since it cause problems but it would be nice to resolve these and enable # diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 516bc68837d..59852b353b3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,4 @@ -IF (NOT IOS) - ADD_SUBDIRECTORY(native) -ENDIF (NOT IOS) - +ADD_SUBDIRECTORY(native) ADD_SUBDIRECTORY(core) IF (NOT IOS) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 3f764ae513f..bf8b6113678 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1271,14 +1271,8 @@ ADD_DEFINITIONS(-DTEST_DATA_DIR="${TEST_DATA_DIR}") ############################################################# # qgis_core library -IF (IOS) - SET(LIBRARY_TYPE STATIC) -ELSE (IOS) - SET(LIBRARY_TYPE SHARED) -ENDIF (IOS) ADD_LIBRARY(qgis_core ${LIBRARY_TYPE} ${QGIS_CORE_SRCS} ${QGIS_CORE_MOC_SRCS} ${QGIS_CORE_HDRS} ${QGIS_CORE_MOC_HDRS}) - GENERATE_EXPORT_HEADER( qgis_core BASE_NAME CORE diff --git a/src/core/qgsmaprenderertask.h b/src/core/qgsmaprenderertask.h index 1f645e3bcf9..74a78e95ab8 100644 --- a/src/core/qgsmaprenderertask.h +++ b/src/core/qgsmaprenderertask.h @@ -46,16 +46,9 @@ class CORE_EXPORT QgsMapRendererTask : public QgsTask //! \brief Error type enum ErrorType { - //! Image allocation failure - ImageAllocationFail = 1, - //! Image save failure - ImageSaveFail, - - /** - * Format is unsupported on the platform - * \since QGIS 3.4 - */ - ImageUnsupportedFormat + ImageAllocationFail = 1, //!< Image allocation failure + ImageSaveFail, //!< Image save failure + ImageUnsupportedFormat //!< Format is unsupported on the platform \since QGIS 3.4 }; /** diff --git a/src/native/CMakeLists.txt b/src/native/CMakeLists.txt index b44a032930d..c68fa03daad 100644 --- a/src/native/CMakeLists.txt +++ b/src/native/CMakeLists.txt @@ -1,6 +1,12 @@ ############################################################# # locate native libs +IF (IOS) + # No native library for IOS + RETURN() +ENDIF(IOS) + + SET(NATIVE_LINK_LIBS) IF(UNIX AND NOT APPLE AND NOT ANDROID) diff --git a/src/quickgui/CMakeLists.txt b/src/quickgui/CMakeLists.txt index 6672d6ca713..d02299cff8b 100644 --- a/src/quickgui/CMakeLists.txt +++ b/src/quickgui/CMakeLists.txt @@ -99,11 +99,6 @@ ELSE(MSVC) SET_SOURCE_FILES_PROPERTIES(${QGIS_QUICK_GUI_MOC_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations" ) ENDIF(MSVC) -IF (IOS) - SET(LIBRARY_TYPE STATIC) -ELSE (IOS) - SET(LIBRARY_TYPE SHARED) -ENDIF (IOS) ADD_LIBRARY(qgis_quick ${LIBRARY_TYPE} ${QGIS_QUICK_GUI_IMAGE_RCC_SRCS} ${QGIS_QUICK_GUI_SRC} diff --git a/src/quickgui/plugin/CMakeLists.txt b/src/quickgui/plugin/CMakeLists.txt index 4e971a59dc0..1f09490d0ab 100644 --- a/src/quickgui/plugin/CMakeLists.txt +++ b/src/quickgui/plugin/CMakeLists.txt @@ -30,7 +30,6 @@ ELSE (IOS) SET(QGIS_QUICK_PLUGIN_RESOURCES ${QGIS_QUICK_PLUGIN_RESOURCES} qmldir) ENDIF (IOS) - INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} @@ -85,11 +84,6 @@ ENDIF(MSVC) SET(QGIS_QUICK_PLUGIN_RUNTIME_DIR ${QGIS_OUTPUT_DIRECTORY}/${QGIS_QML_SUBDIR}/QgsQuick) -IF (IOS) - SET(LIBRARY_TYPE STATIC) -ELSE (IOS) - SET(LIBRARY_TYPE MODULE) -ENDIF (IOS) ADD_LIBRARY(qgis_quick_plugin ${LIBRARY_TYPE} ${QGIS_QUICK_PLUGIN_SRC} ${QGIS_QUICK_PLUGIN_MOC_HDRS}