Unverified Commit ff0e1996 authored by Andreas Sturmlechner's avatar Andreas Sturmlechner
Browse files

Add CMake option to build WITHOUT_X11



We want to be able to build without X11 support even if some of the
used libraries may not work w/o Qt5X11Extras themselves yet or need
to be built with X11 support for other reverse dependencies.

KONQ_HAVE_X11 already exists and is set automagically so far, but
using -DCMAKE_DISABLE_FIND_PACKAGE_Qt5X11Extras will break if any
dependencies list Qt5X11Extras as required in their cmake config.

Introducing this option means there is no behavior change by default,
cmake will just skip finding Qt5X11Extras or adding unwanted features
if the option is enabled.

Signed-off-by: default avatarAndreas Sturmlechner <asturm@gentoo.org>
parent 503557c5
Pipeline #212702 passed with stage
in 4 minutes and 38 seconds
......@@ -47,8 +47,11 @@ if(Qt5WebEngineWidgets_VERSION VERSION_LESS "5.14.0")
add_definitions(-DWEBENGINEDOWNLOADITEM_USE_PATH)
endif()
find_package(Qt5X11Extras)
set(KONQ_HAVE_X11 ${Qt5X11Extras_FOUND})
option(WITHOUT_X11 "Build without X11 integration (skips finding Qt5X11Extras)" OFF)
if(NOT WITHOUT_X11)
find_package(Qt5X11Extras)
set(KONQ_HAVE_X11 ${Qt5X11Extras_FOUND})
endif()
add_definitions(
-DQT_USE_QSTRINGBUILDER
......
......@@ -30,9 +30,9 @@ if (WIN32)
else (WIN32)
kf5_add_kdeinit_executable( kfmclient NOGUI ${kfmclient_SRCS})
target_link_libraries(kdeinit_kfmclient ${kfmclient_LIBS})
if(X11_FOUND)
if(KONQ_HAVE_X11)
target_link_libraries(kdeinit_kfmclient Qt5::X11Extras)
endif(X11_FOUND)
endif()
install(TARGETS kdeinit_kfmclient ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
endif (WIN32)
......
......@@ -33,9 +33,9 @@ target_link_libraries(konquerorprivate
KF5::KIOGui
)
if(X11_FOUND)
if(KONQ_HAVE_X11)
target_link_libraries(konquerorprivate Qt5::X11Extras)
endif(X11_FOUND)
endif()
set_target_properties(konquerorprivate PROPERTIES VERSION ${KONQUEROR_LIB_VERSION} SOVERSION "5" )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment