main/mapbox-gl-native: drop, upstreamed to Alpine
This commit is contained in:
parent
ded44ff3a1
commit
886a03f0e0
3 changed files with 0 additions and 244 deletions
|
@ -1,113 +0,0 @@
|
|||
From e18467d755f470b26f61f6893eddd76ecf0816e6 Mon Sep 17 00:00:00 2001
|
||||
From: Rinigus <rinigus.git@gmail.com>
|
||||
Date: Sun, 22 Nov 2020 18:47:41 +0200
|
||||
Subject: [PATCH] [build][qt] Add support for qmapboxgl installation
|
||||
|
||||
Adds install target for Qt version of the library. Allows to
|
||||
select which parts of Qt platform are built
|
||||
---
|
||||
platform/qt/qt.cmake | 58 +++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 54 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/platform/qt/qt.cmake b/platform/qt/qt.cmake
|
||||
index 8184d5079c5..858833a85a5 100644
|
||||
--- a/platform/qt/qt.cmake
|
||||
+++ b/platform/qt/qt.cmake
|
||||
@@ -1,9 +1,16 @@
|
||||
# Note: Using Sqlite instead of QSqlDatabase for better compatibility.
|
||||
|
||||
+option(MBGL_WITH_QT_LIB_ONLY "Build only qmapboxgl library" OFF)
|
||||
+option(MBGL_WITH_QT_HEADLESS "Build Mapbox GL Qt with headless support" ON)
|
||||
+
|
||||
+include(GNUInstallDirs)
|
||||
find_package(Qt5Gui REQUIRED)
|
||||
find_package(Qt5Network REQUIRED)
|
||||
-find_package(Qt5OpenGL REQUIRED)
|
||||
-find_package(Qt5Widgets REQUIRED)
|
||||
+
|
||||
+if(MBGL_WITH_QT_HEADLESS OR NOT MBGL_WITH_QT_LIB_ONLY)
|
||||
+ find_package(Qt5OpenGL REQUIRED)
|
||||
+ find_package(Qt5Widgets REQUIRED)
|
||||
+endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
add_definitions("-DQT_COMPILING_QIMAGE_COMPAT_CPP")
|
||||
@@ -50,7 +57,6 @@ target_sources(
|
||||
${PROJECT_SOURCE_DIR}/platform/qt/src/async_task_impl.hpp
|
||||
${PROJECT_SOURCE_DIR}/platform/qt/src/number_format.cpp
|
||||
${PROJECT_SOURCE_DIR}/platform/qt/src/gl_functions.cpp
|
||||
- ${PROJECT_SOURCE_DIR}/platform/qt/src/headless_backend_qt.cpp
|
||||
$<$<BOOL:${MBGL_PUBLIC_BUILD}>:${PROJECT_SOURCE_DIR}/platform/qt/src/http_file_source.cpp>
|
||||
$<$<BOOL:${MBGL_PUBLIC_BUILD}>:${PROJECT_SOURCE_DIR}/platform/qt/src/http_file_source.hpp>
|
||||
$<$<BOOL:${MBGL_PUBLIC_BUILD}>:${PROJECT_SOURCE_DIR}/platform/qt/src/http_request.cpp>
|
||||
@@ -68,6 +74,15 @@ target_sources(
|
||||
${PROJECT_SOURCE_DIR}/platform/qt/src/utf.cpp
|
||||
)
|
||||
|
||||
+if(MBGL_WITH_QT_HEADLESS OR NOT MBGL_WITH_QT_LIB_ONLY)
|
||||
+ target_sources(
|
||||
+ mbgl-core
|
||||
+ PRIVATE
|
||||
+ ${PROJECT_SOURCE_DIR}/platform/qt/src/headless_backend_qt.cpp
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
+
|
||||
target_compile_definitions(
|
||||
mbgl-core
|
||||
PRIVATE QT_IMAGE_DECODERS
|
||||
@@ -91,11 +106,18 @@ target_link_libraries(
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Network
|
||||
- Qt5::OpenGL
|
||||
mbgl-vendor-nunicode
|
||||
mbgl-vendor-sqlite
|
||||
)
|
||||
|
||||
+if(MBGL_WITH_QT_HEADLESS)
|
||||
+ target_link_libraries(
|
||||
+ mbgl-core
|
||||
+ PRIVATE
|
||||
+ Qt5::OpenGL
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
add_library(
|
||||
qmapboxgl SHARED
|
||||
${PROJECT_SOURCE_DIR}/platform/qt/include/qmapbox.hpp
|
||||
@@ -141,6 +163,34 @@ target_link_libraries(
|
||||
mbgl-core
|
||||
)
|
||||
|
||||
+# install library and headers
|
||||
+install(
|
||||
+ DIRECTORY include/mbgl
|
||||
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
+ COMPONENT development
|
||||
+)
|
||||
+
|
||||
+install(
|
||||
+ TARGETS qmapboxgl
|
||||
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shared NAMELINK_SKIP
|
||||
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT development
|
||||
+)
|
||||
+
|
||||
+install(
|
||||
+ FILES
|
||||
+ platform/qt/include/QMapbox
|
||||
+ platform/qt/include/QMapboxGL
|
||||
+ platform/qt/include/qmapbox.hpp
|
||||
+ platform/qt/include/qmapboxgl.hpp
|
||||
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/qt5"
|
||||
+ COMPONENT development
|
||||
+)
|
||||
+
|
||||
+# stop here if only library is requested
|
||||
+if(MBGL_WITH_QT_LIB_ONLY)
|
||||
+ return()
|
||||
+endif()
|
||||
+
|
||||
add_executable(
|
||||
mbgl-qt
|
||||
${PROJECT_SOURCE_DIR}/platform/qt/app/main.cpp
|
|
@ -1,91 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ad989ba83..8f6f143ad 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
|
||||
-project("Mapbox GL Native" LANGUAGES CXX C)
|
||||
+project("Mapbox GL Native" LANGUAGES CXX C VERSION 1.6.0)
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER Core)
|
||||
diff --git a/platform/qt/QMapboxGLConfig.cmake.in b/platform/qt/QMapboxGLConfig.cmake.in
|
||||
new file mode 100644
|
||||
index 000000000..ecd3127a5
|
||||
--- /dev/null
|
||||
+++ b/platform/qt/QMapboxGLConfig.cmake.in
|
||||
@@ -0,0 +1,13 @@
|
||||
+@PACKAGE_INIT@
|
||||
+
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(Qt5Gui @REQUIRED_QT_VERSION@)
|
||||
+find_dependency(Qt5Network @REQUIRED_QT_VERSION@)
|
||||
+
|
||||
+if(MBGL_WITH_QT_HEADLESS OR NOT MBGL_WITH_QT_LIB_ONLY)
|
||||
+ find_dependency(Qt5OpenGL @REQUIRED_QT_VERSION@)
|
||||
+ find_dependency(Qt5Network @REQUIRED_QT_VERSION@)
|
||||
+endif()
|
||||
+
|
||||
+include("${CMAKE_CURRENT_LIST_DIR}/QMapboxGLTargets.cmake")
|
||||
+@PACKAGE_INCLUDE_QCHTARGETS@
|
||||
diff --git a/platform/qt/qt.cmake b/platform/qt/qt.cmake
|
||||
index 858833a85..fbf9ce6ee 100644
|
||||
--- a/platform/qt/qt.cmake
|
||||
+++ b/platform/qt/qt.cmake
|
||||
@@ -145,8 +145,9 @@ target_include_directories(
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
- qmapboxgl
|
||||
- PUBLIC ${PROJECT_SOURCE_DIR}/platform/qt/include
|
||||
+ qmapboxgl PUBLIC
|
||||
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/platform/qt/include>
|
||||
+ $<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
target_compile_definitions(
|
||||
@@ -172,7 +173,8 @@ install(
|
||||
|
||||
install(
|
||||
TARGETS qmapboxgl
|
||||
- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shared NAMELINK_SKIP
|
||||
+ EXPORT QMapboxGLTargets
|
||||
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shared
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT development
|
||||
)
|
||||
|
||||
@@ -186,6 +188,34 @@ install(
|
||||
COMPONENT development
|
||||
)
|
||||
|
||||
+set_target_properties(qmapboxgl PROPERTIES
|
||||
+ EXPORT_NAME QMapboxGL
|
||||
+ SOVERSION ${PROJECT_VERSION_MAJOR}
|
||||
+ VERSION ${PROJECT_VERSION})
|
||||
+
|
||||
+include(CMakePackageConfigHelpers)
|
||||
+set(CMAKECONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/qmapboxgl/)
|
||||
+
|
||||
+configure_package_config_file(
|
||||
+ "platform/qt/QMapboxGLConfig.cmake.in"
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/QMapboxGLConfig.cmake"
|
||||
+ INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
|
||||
+ PATH_VARS CMAKE_INSTALL_PREFIX CMAKE_INSTALL_INCLUDEDIR
|
||||
+ CMAKE_INSTALL_LIBDIR NO_CHECK_REQUIRED_COMPONENTS_MACRO)
|
||||
+write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/QMapboxGLConfigVersion.cmake
|
||||
+ VERSION ${qmapboxgl_VERSION}
|
||||
+ COMPATIBILITY AnyNewerVersion)
|
||||
+
|
||||
+install(EXPORT QMapboxGLTargets
|
||||
+ DESTINATION ${CMAKECONFIG_INSTALL_DIR}
|
||||
+ COMPONENT development)
|
||||
+
|
||||
+install(FILES
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/QMapboxGLConfig.cmake"
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/QMapboxGLConfigVersion.cmake"
|
||||
+ DESTINATION ${CMAKECONFIG_INSTALL_DIR}
|
||||
+ COMPONENT development)
|
||||
+
|
||||
# stop here if only library is requested
|
||||
if(MBGL_WITH_QT_LIB_ONLY)
|
||||
return()
|
|
@ -1,40 +0,0 @@
|
|||
# Contributor: Bart Ribbers <bribbers@disroot.org>
|
||||
# Maintainer: Bart Ribbers <bribbers@disroot.org>
|
||||
pkgname=mapbox-gl-native
|
||||
pkgver=1.6.0
|
||||
pkgrel=0
|
||||
pkgdesc="Mapbox GL Native"
|
||||
url="https://github.com/mapbox/mapbox-gl-native"
|
||||
arch="all !armhf"
|
||||
license="BSD-2-Clause"
|
||||
makedepends="
|
||||
cmake
|
||||
qt5-qtbase-dev
|
||||
icu-dev
|
||||
"
|
||||
source="https://github.com/pmsourcedump/tarballs/raw/master/mapbox-gl-native-vendored-1.6.0.tar.bz2
|
||||
0001-add-support-for-qmapboxgl-installation.patch
|
||||
0002-versioned-libraries.patch
|
||||
"
|
||||
options="!check" # No tests
|
||||
subpackages="$pkgname-dev"
|
||||
|
||||
build() {
|
||||
cmake -B build \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DMBGL_WITH_WERROR=OFF \
|
||||
-DMBGL_WITH_QT=ON \
|
||||
-DMBGL_WITH_QT_LIB_ONLY=ON \
|
||||
-DMBGL_WITH_QT_HEADLESS=OFF
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
}
|
||||
|
||||
sha512sums="c4698c5d36f3f629f18d3b546f9a2aee4209723ccec0c552dbe3e6f44c84462f1a87e862ea012309a04caf85a1d59ba85c18814de79b577a3d1a45a3f9d50909 mapbox-gl-native-vendored-1.6.0.tar.bz2
|
||||
8383f99c49b26f66c72080864e05a4216f3f2e03045a2ad3aca1ff9ed9c16f214236ef3fcd71f85ade071da000eca07cec75d4411400d5d5112f1e45d3a2a769 0001-add-support-for-qmapboxgl-installation.patch
|
||||
433c0a8bc6fc34cc86184e2c979fb6bd5a88dbbf69ed383eccb38d99dcbb6d67c5f9ccb615a8b347680a48bd74a4d387172fffd9cf12d089f6ffa27420587cf5 0002-versioned-libraries.patch"
|
Loading…
Reference in a new issue