Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/CMakeLists.txt b/CMakeLists.txt
- index 6295de6f..9d941026 100644
- --- a/CMakeLists.txt
- +++ b/CMakeLists.txt
- @@ -199,6 +199,8 @@ if(UNIX AND NOT (APPLE OR HAIKU))
- if(USE_X11)
- add_definitions( -DHAVE_X11 )
- message(STATUS "X11 features support - ENABLED")
- + elseif(NOT LIMIT_X11_USAGE)
- + set(USE_XSS OFF)
- endif()
- if(LIMIT_X11_USAGE)
- add_definitions( -DLIMIT_X11_USAGE )
- diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
- index 5f56f15b..d53f36e9 100644
- --- a/plugins/CMakeLists.txt
- +++ b/plugins/CMakeLists.txt
- @@ -56,6 +56,10 @@ endif()
- option( BUILD_DEV_PLUGINS "Build plugins from dev directory" OFF )
- set(MAIN_PROGRAM_NAME "psi" CACHE STRING "Main program name: psi or psi-plus")
- +if(NOT (DEFINED USE_X11))
- + option( USE_X11 "Enable X11 features support" ON )
- +endif()
- +
- if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/generic")
- set(GENERIC_PLUGINS_FOUND ON)
- diff --git a/plugins/generic/CMakeLists.txt b/plugins/generic/CMakeLists.txt
- index cf07f9b3..ff9c8b59 100644
- --- a/plugins/generic/CMakeLists.txt
- +++ b/plugins/generic/CMakeLists.txt
- @@ -31,14 +31,14 @@ set( plugins_list
- watcherplugin
- )
- -if(NOT HAIKU)
- +if((WIN32 OR APPLE) OR USE_X11 AND (NOT HAIKU))
- # qxt library is buildable only in Linux, *BSD, Windows and macOS
- list(APPEND plugins_list
- screenshotplugin
- )
- endif()
- -if(NOT APPLE AND (NOT HAIKU))
- +if(NOT APPLE AND (NOT HAIKU) AND (WIN32 OR USE_X11))
- list(APPEND plugins_list
- videostatusplugin
- )
- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
- index 2cf168c7..493fcff2 100644
- --- a/src/CMakeLists.txt
- +++ b/src/CMakeLists.txt
- @@ -53,12 +53,14 @@ if(LINUX)
- if(USE_DBUS)
- find_package(Qt5 COMPONENTS DBus REQUIRED)
- endif()
- - find_package(XCB REQUIRED)
- - set(EXTRA_LIBS
- - ${XCB_LIBRARY}
- - )
- - include_directories(${LIBXCB_INCLUDE_DIR})
- - add_definitions(${LIBXCB_DEFINITIONS})
- + if(USE_X11 OR LIMIT_X11_USAGE)
- + find_package(XCB REQUIRED)
- + set(EXTRA_LIBS
- + ${XCB_LIBRARY}
- + )
- + include_directories(${LIBXCB_INCLUDE_DIR})
- + add_definitions(${LIBXCB_DEFINITIONS})
- + endif()
- endif()
- if(APPLE)
- @@ -109,7 +111,7 @@ else()
- endif()
- endif()
- -if(LINUX)
- +if(LINUX AND (USE_X11 OR LIMIT_X11_USAGE))
- find_package(X11 REQUIRED)
- include_directories(${X11_INCLUDE_DIR})
- endif()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement