Skip to content

Commit

Permalink
do not build native if WITH_GUI=OFF
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik authored and nyalldawson committed Oct 11, 2022
1 parent 8f12403 commit 893dfcc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
@@ -1,4 +1,3 @@
add_subdirectory(native)
add_subdirectory(core)

if (WITH_AUTH)
Expand All @@ -12,6 +11,7 @@ endif()
if (WITH_GUI)
add_subdirectory(ui)
add_subdirectory(gui)
add_subdirectory(native)
endif()

add_subdirectory(providers)
Expand Down
4 changes: 0 additions & 4 deletions src/core/CMakeLists.txt
Expand Up @@ -2280,10 +2280,6 @@ if (APPLE)
target_link_libraries(qgis_core ${LIBTASN1_LIBRARY})
endif()

if (APPLE AND NOT IOS)
target_link_libraries(qgis_core qgis_native)
endif()

target_link_libraries(qgis_core
${QT_VERSION_BASE}::Core
${QT_VERSION_BASE}::Gui
Expand Down
6 changes: 3 additions & 3 deletions src/native/CMakeLists.txt
Expand Up @@ -63,7 +63,7 @@ if(APPLE)
)
endif()

if(MSVC AND NOT BUILD_WITH_QT6)
if(MSVC)
set(QGIS_NATIVE_SRCS ${QGIS_NATIVE_SRCS}
../../external/wintoast/src/wintoastlib.cpp
win/qgswinnative.cpp
Expand Down Expand Up @@ -96,7 +96,7 @@ target_include_directories(qgis_native PUBLIC
${CMAKE_CURRENT_BINARY_DIR}
)

if(MSVC AND NOT BUILD_WITH_QT6)
if(MSVC)
target_include_directories(qgis_native SYSTEM PUBLIC
../../external/wintoast/src
)
Expand Down Expand Up @@ -144,7 +144,7 @@ if (UNIX AND NOT APPLE AND NOT ANDROID)
target_link_libraries(qgis_native ${QT_VERSION_BASE}::DBus)
endif()

if (MSVC AND NOT BUILD_WITH_QT6)
if (MSVC)
find_package(${QT_VERSION_BASE}WinExtras)

target_link_libraries(qgis_native shell32)
Expand Down

0 comments on commit 893dfcc

Please sign in to comment.