[qt] Build improvements and better handling of map settings (#197)
* QMapboxGLSettings functions for changing default options and getting default styles
* [qt] allow to build without widgets and other cmake improvements
* [qt] Install include/mbgl for development
* [qt] library static/shared install+export
* [qt] Add missing mbgl-compiler-options dependency for 'qmapboxgl'
* [qt] Raise CMAKE_OSX_DEPLOYMENT_TARGET from 10.13 to 13.0
* [qt] Add Qt::Sql dependency also to the final library. Build qmapboxgl as OBJECT lib inside QtLocation plugin.
* Remove Qt::Sql dependency from 'qmapboxgl'. Not really needed.
* Set CMake config files path back to ${CMAKE_INSTALL_LIBDIR}/cmake/QMapboxGL/
* [qt] Set CMAKE_OSX_DEPLOYMENT_TARGET only if it is not yet set
* [qt] Support CMake v3.11 and earlier versions
* [qt] Comment out 'iOS_static' from CI until it is fixed.
Co-authored-by: Rinigus <rinigus.git@gmail.com>
This commit is contained in:
@@ -3,14 +3,15 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
|
||||
option(MBGL_WITH_CORE_ONLY "Build only the core bits, no platform code" OFF)
|
||||
option(MBGL_WITH_COVERAGE "Enable code coverage collection" OFF)
|
||||
option(MBGL_WITH_QT "Build Mapbox GL Qt bindings" OFF)
|
||||
option(MBGL_QT_STATIC "Build Mapbox GL Qt bindings staticly" OFF)
|
||||
option(MBGL_WITH_SANITIZER "Use [address|thread|undefined] here" OFF)
|
||||
option(MBGL_WITH_RTTI "Compile with runtime type information" OFF)
|
||||
option(MBGL_WITH_OPENGL "Build with OpenGL renderer" ON)
|
||||
option(MBGL_WITH_EGL "Build with EGL renderer" OFF)
|
||||
option(MBGL_WITH_WERROR "Make all compilation warnings errors" ON)
|
||||
|
||||
if (MBGL_WITH_QT)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13)
|
||||
if (MBGL_WITH_QT AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 13.0)
|
||||
endif()
|
||||
|
||||
project("Mapbox GL Native" LANGUAGES CXX C)
|
||||
@@ -97,8 +98,13 @@ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_MINSIZEREL ON)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||
|
||||
add_library(
|
||||
mbgl-core STATIC
|
||||
if(MBGL_QT_STATIC)
|
||||
add_library(mbgl-core OBJECT)
|
||||
else()
|
||||
add_library(mbgl-core STATIC)
|
||||
endif()
|
||||
target_sources(
|
||||
mbgl-core PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/include/mbgl/actor/actor.hpp
|
||||
${PROJECT_SOURCE_DIR}/include/mbgl/actor/actor_ref.hpp
|
||||
${PROJECT_SOURCE_DIR}/include/mbgl/actor/aspiring_actor.hpp
|
||||
|
||||
Reference in New Issue
Block a user