mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
cmake option for forcing static libs
This commit is contained in:
parent
79b4b48f8a
commit
9f645c6bd2
@ -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
|
||||
#
|
||||
|
@ -1,7 +1,4 @@
|
||||
IF (NOT IOS)
|
||||
ADD_SUBDIRECTORY(native)
|
||||
ENDIF (NOT IOS)
|
||||
|
||||
ADD_SUBDIRECTORY(native)
|
||||
ADD_SUBDIRECTORY(core)
|
||||
|
||||
IF (NOT IOS)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -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)
|
||||
|
@ -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}
|
||||
|
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user