build: new build option BUILD_X11 to control building of X11 backend
This commit is contained in:
parent
f45df39032
commit
4a67694676
7 changed files with 48 additions and 37 deletions
|
|
@ -156,6 +156,12 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
|
||||||
# Instead use Q_SIGNAL, Q_SLOT and Q_EMIT
|
# Instead use Q_SIGNAL, Q_SLOT and Q_EMIT
|
||||||
# prevents issues when used with glib for libportal
|
# prevents issues when used with glib for libportal
|
||||||
add_definitions(-DQT_NO_KEYWORDS)
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
|
|
||||||
|
#Options for Linux platform support
|
||||||
|
if(UNIX AND NOT APPLE)
|
||||||
|
option(BUILD_X11_SUPPORT "Build with x11 support" ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
include(cmake/Libraries.cmake)
|
include(cmake/Libraries.cmake)
|
||||||
configure_libs()
|
configure_libs()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,9 @@ macro(configure_unix_libs)
|
||||||
add_definitions(-DWINAPI_CARBON=1)
|
add_definitions(-DWINAPI_CARBON=1)
|
||||||
else()
|
else()
|
||||||
|
|
||||||
|
if (BUILD_X11_SUPPORT)
|
||||||
configure_xorg_libs()
|
configure_xorg_libs()
|
||||||
|
endif()
|
||||||
|
|
||||||
include(FindPkgConfig)
|
include(FindPkgConfig)
|
||||||
find_package(PkgConfig)
|
find_package(PkgConfig)
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ CMake options:
|
||||||
| BUILD_DEV_DOCS | Build development documentation | OFF | `Doxygen` |
|
| BUILD_DEV_DOCS | Build development documentation | OFF | `Doxygen` |
|
||||||
| BUILD_INSTALLER | Build installers/packages | ON | |
|
| BUILD_INSTALLER | Build installers/packages | ON | |
|
||||||
| BUILD_TESTS | Build unit tests and legacy tests | ON | `gtest`|
|
| BUILD_TESTS | Build unit tests and legacy tests | ON | `gtest`|
|
||||||
|
| BUILD_X11_SUPPORT | Build X11 backend (linux and bsd only) | ON | `x11 libs`|
|
||||||
| ENABLE_COVERAGE | Enable test coverage | OFF | `gcov` |
|
| ENABLE_COVERAGE | Enable test coverage | OFF | `gcov` |
|
||||||
| SKIP_BUILD_TESTS | Skip running of tests at build time | OFF | |
|
| SKIP_BUILD_TESTS | Skip running of tests at build time | OFF | |
|
||||||
| VCPKG_QT | Build Qt w/ vcpkg (windows only) | OFF | |
|
| VCPKG_QT | Build Qt w/ vcpkg (windows only) | OFF | |
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,6 @@
|
||||||
#elif WINAPI_CARBON
|
#elif WINAPI_CARBON
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
#include <platform/OSXAutoTypes.h>
|
#include <platform/OSXAutoTypes.h>
|
||||||
#else
|
|
||||||
#error Platform not supported.
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,9 @@ elseif(UNIX)
|
||||||
XDGPowerManager.h
|
XDGPowerManager.h
|
||||||
XDGKeyUtil.h
|
XDGKeyUtil.h
|
||||||
XDGKeyUtil.cpp
|
XDGKeyUtil.cpp
|
||||||
|
)
|
||||||
|
if (BUILD_X11_SUPPORT)
|
||||||
|
list(APPEND PLATFORM_SOURCES
|
||||||
XWindowsClipboard.cpp
|
XWindowsClipboard.cpp
|
||||||
XWindowsClipboard.h
|
XWindowsClipboard.h
|
||||||
XWindowsClipboardAnyBitmapConverter.cpp
|
XWindowsClipboardAnyBitmapConverter.cpp
|
||||||
|
|
@ -124,6 +127,7 @@ elseif(UNIX)
|
||||||
XWindowsUtil.cpp
|
XWindowsUtil.cpp
|
||||||
XWindowsUtil.h
|
XWindowsUtil.h
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(LIBEI_FOUND)
|
if(LIBEI_FOUND)
|
||||||
list(APPEND PLATFORM_SOURCES
|
list(APPEND PLATFORM_SOURCES
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,7 @@ create_test(
|
||||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src/lib/deskflow"
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src/lib/deskflow"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(BUILD_X11_SUPPORT)
|
||||||
if(UNIX AND NOT APPLE)
|
|
||||||
#this test does not work properly on windows / mac os
|
|
||||||
create_test(
|
create_test(
|
||||||
NAME X11LayoutParserTests
|
NAME X11LayoutParserTests
|
||||||
DEPENDS app
|
DEPENDS app
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ elseif(APPLE)
|
||||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src/lib/platform"
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src/lib/platform"
|
||||||
)
|
)
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
|
if (BUILD_X11_SUPPORT)
|
||||||
create_test(
|
create_test(
|
||||||
NAME XWindowsClipboardTests
|
NAME XWindowsClipboardTests
|
||||||
DEPENDS platform
|
DEPENDS platform
|
||||||
|
|
@ -33,3 +34,4 @@ elseif(UNIX)
|
||||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src/lib/platform"
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src/lib/platform"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue