summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-11-07 10:54:38 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-11-08 18:02:38 +0200
commit8e99ae44dd5bf72bc8bd844251e9d670095804ac (patch)
tree38ddbf84fea7c9385de25f981d298fec9a99166a /platform
parentd0ac12309b470eb59690ece3f15773df73a127e1 (diff)
downloadqtlocation-mapboxgl-8e99ae44dd5bf72bc8bd844251e9d670095804ac.tar.gz
[build] Use mesa-13.0.0-glx in CI builds
Diffstat (limited to 'platform')
-rw-r--r--platform/linux/config.cmake46
1 files changed, 20 insertions, 26 deletions
diff --git a/platform/linux/config.cmake b/platform/linux/config.cmake
index 76be2dddc3..b4bc030064 100644
--- a/platform/linux/config.cmake
+++ b/platform/linux/config.cmake
@@ -1,5 +1,7 @@
mason_use(glfw VERSION 3.2.1)
-mason_use(mesa VERSION 13.0.0${MASON_CXXABI_SUFFIX})
+if (WITH_OSMESA OR IS_CI_BUILD)
+ mason_use(mesa VERSION 13.0.0${MASON_MESA_SUFFIX}${MASON_CXXABI_SUFFIX})
+endif()
mason_use(boost_libprogram_options VERSION 1.60.0)
mason_use(sqlite VERSION 3.14.2)
mason_use(libuv VERSION 1.9.1)
@@ -12,34 +14,26 @@ mason_use(benchmark VERSION 1.0.0)
include(cmake/loop-uv.cmake)
-macro(use_glx_backend _TARGET)
- target_sources(${_TARGET}
- PRIVATE platform/linux/src/headless_backend_glx.cpp
- PRIVATE platform/linux/src/headless_display_glx.cpp
- )
-
- target_link_libraries(${_TARGET}
- PUBLIC -lGL
- PUBLIC -lX11
- )
-endmacro()
-
-macro(use_osmesa_backend _TARGET)
- target_sources(${_TARGET}
- PRIVATE platform/default/headless_backend_osmesa.cpp
- PRIVATE platform/default/headless_display.cpp
- )
-
- target_add_mason_package(${_TARGET}
- PUBLIC mesa
- )
-endmacro()
-
macro(mbgl_platform_core)
if (WITH_OSMESA)
- use_osmesa_backend(mbgl-core)
+ target_sources(mbgl-core
+ PRIVATE platform/default/headless_backend_osmesa.cpp
+ PRIVATE platform/default/headless_display.cpp
+ )
+ target_add_mason_package(mbgl-core PUBLIC mesa)
else()
- use_glx_backend(mbgl-core)
+ target_sources(mbgl-core
+ PRIVATE platform/linux/src/headless_backend_glx.cpp
+ PRIVATE platform/linux/src/headless_display_glx.cpp
+ )
+ if (IS_CI_BUILD)
+ target_add_mason_package(mbgl-core PUBLIC mesa)
+ else()
+ target_link_libraries(mbgl-core
+ PUBLIC -lGL
+ PUBLIC -lX11
+ )
+ endif()
endif()
target_sources(mbgl-core