mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-06 12:34:24 +00:00
committed by
Konstantin Pastbin
parent
c9cbb64f12
commit
76ffc99abd
28
libs/platform/location_service/CMakeLists.txt
Normal file
28
libs/platform/location_service/CMakeLists.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
project(location_service)
|
||||
|
||||
if (NOT SKIP_QT_GUI AND PLATFORM_DESKTOP AND PLATFORM_LINUX)
|
||||
message("Building with Qt Positioning")
|
||||
find_package(Qt6 REQUIRED COMPONENTS Positioning)
|
||||
set(QT_LOCATION_SERVICE true)
|
||||
elseif(NOT SKIP_QT_GUI AND PLATFORM_DESKTOP AND PLATFORM_MAC)
|
||||
set(APPLE_LOCATION_SERVICE true)
|
||||
endif()
|
||||
|
||||
set(SRC
|
||||
location_service.cpp
|
||||
location_service.hpp
|
||||
$<$<BOOL:${APPLE_LOCATION_SERVICE}>:apple_location_service.mm>
|
||||
$<$<BOOL:${QT_LOCATION_SERVICE}>:qt_location_service.hpp>
|
||||
$<$<BOOL:${QT_LOCATION_SERVICE}>:qt_location_service.cpp>
|
||||
)
|
||||
|
||||
omim_add_library(${PROJECT_NAME} ${SRC})
|
||||
|
||||
if (QT_LOCATION_SERVICE)
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE "QT_LOCATION_SERVICE")
|
||||
target_link_libraries(${PROJECT_NAME} Qt6::Positioning)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC ON)
|
||||
elseif(APPLE_LOCATION_SERVICE)
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE "APPLE_LOCATION_SERVICE")
|
||||
target_link_libraries(${PROJECT_NAME} -framework\ CoreLocation)
|
||||
endif()
|
||||
Reference in New Issue
Block a user