[cmake] Use MLN prefix instead of MBGL (#1054)

Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
Tadej Novak
2023-04-28 00:34:38 +02:00
committed by GitHub
parent e4501c789d
commit 95c7e3818d
43 changed files with 247 additions and 246 deletions

View File

@@ -1,5 +1,5 @@
option(MBGL_WITH_X11 "Build with X11 Support" ON)
option(MBGL_WITH_WAYLAND "Build with Wayland Support" OFF)
option(MLN_WITH_X11 "Build with X11 Support" ON)
option(MLN_WITH_WAYLAND "Build with Wayland Support" OFF)
find_package(CURL REQUIRED)
find_package(ICU OPTIONAL_COMPONENTS i18n)
@@ -7,7 +7,7 @@ find_package(ICU OPTIONAL_COMPONENTS uc)
find_package(JPEG REQUIRED)
find_package(PNG REQUIRED)
find_package(PkgConfig REQUIRED)
if (MBGL_WITH_X11)
if (MLN_WITH_X11)
find_package(X11 REQUIRED)
endif ()
find_package(Threads REQUIRED)
@@ -57,7 +57,7 @@ target_sources(
${PROJECT_SOURCE_DIR}/platform/linux/src/gl_functions.cpp
)
if(MBGL_WITH_EGL)
if(MLN_WITH_EGL)
find_package(OpenGL REQUIRED EGL)
target_sources(
mbgl-core
@@ -69,7 +69,7 @@ if(MBGL_WITH_EGL)
PRIVATE
OpenGL::EGL
)
if (MBGL_WITH_WAYLAND)
if (MLN_WITH_WAYLAND)
target_compile_definitions(mbgl-core PUBLIC
EGL_NO_X11
MESA_EGL_NO_X11_HEADERS
@@ -107,7 +107,7 @@ include(${PROJECT_SOURCE_DIR}/vendor/sqlite.cmake)
if(NOT ${ICU_FOUND} OR "${ICU_VERSION}" VERSION_LESS 62.0)
message(STATUS "ICU not found or too old, using builtin.")
set(MBGL_USE_BUILTIN_ICU TRUE)
set(MLN_USE_BUILTIN_ICU TRUE)
include(${PROJECT_SOURCE_DIR}/vendor/icu.cmake)
set_source_files_properties(
@@ -126,9 +126,9 @@ target_link_libraries(
${LIBUV_LIBRARIES}
${X11_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
$<$<NOT:$<BOOL:${MBGL_USE_BUILTIN_ICU}>>:ICU::i18n>
$<$<NOT:$<BOOL:${MBGL_USE_BUILTIN_ICU}>>:ICU::uc>
$<$<BOOL:${MBGL_USE_BUILTIN_ICU}>:mbgl-vendor-icu>
$<$<NOT:$<BOOL:${MLN_USE_BUILTIN_ICU}>>:ICU::i18n>
$<$<NOT:$<BOOL:${MLN_USE_BUILTIN_ICU}>>:ICU::uc>
$<$<BOOL:${MLN_USE_BUILTIN_ICU}>:mbgl-vendor-icu>
PNG::PNG
mbgl-vendor-nunicode
mbgl-vendor-sqlite