Skip to content

Commit

Permalink
CMake: use CMakeDependentOption
Browse files Browse the repository at this point in the history
  • Loading branch information
rilian-la-te committed Jun 8, 2017
1 parent a0c8735 commit 9dc5de9
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions applets/wnck/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
option(ENABLE_WNCK "Enables wnck-related plugins, like taskbar and pager" ON)

if (ENABLE_WNCK)
pkg_check_modules(WNCK libwnck-3.0)
if (NOT(WNCK_FOUND))
set(ENABLE_WNCK OFF)
endif()
endif()
include(CMakeDependentOption)
pkg_check_modules(WNCK libwnck-3.0)
pkg_check_modules(X11 x11 xcomposite xdamage xfixes gdk-x11-3.0)
cmake_dependent_option(ENABLE_X11 "Enables X11 system tray" ON
"X11_FOUND" OFF)
cmake_dependent_option(ENABLE_WNCK "Enables wnck-related plugins, like taskbar and pager" ON
"WNCK_FOUND;ENABLE_X11" OFF)

if (ENABLE_WNCK)
add_subdirectory(tasklist)
Expand All @@ -17,15 +16,6 @@ if (ENABLE_WNCK)
add_subdirectory(buttons)
endif()

option(ENABLE_X11 "Enables X11 system tray" ON)

if (ENABLE_X11)
pkg_check_modules(X11 x11 xcomposite xdamage xfixes gdk-x11-3.0)
if (NOT(X11_FOUND))
set(ENABLE_X11 OFF)
endif()
endif()

if (ENABLE_X11)
add_subdirectory(xembed)
endif()

0 comments on commit 9dc5de9

Please sign in to comment.