if (NOT WIN32 AND NOT APPLE)
  option(WITH_GNOME2 "Target a GNOME 2 system (gconf)" OFF)
  option(WITH_GNOME3 "Target a GNOME 3 system (gsettings)" ON)
  if(WITH_GNOME3)
    px_check_modules(GNOME3 gio-2.0>=2.26 gobject-2.0)
  else(WITH_GNOME3)
    px_check_modules(GNOME2 gconf-2.0 gobject-2.0)
  endif(WITH_GNOME3)
  
  # GNOME (gconf) helper
  if(GNOME2_FOUND OR GNOME3_FOUND)
    if(WITH_GNOME3)
      add_executable(pxgsettings modules/pxgsettings.cpp)
      target_link_libraries(pxgsettings ${GNOME3_LIBRARIES})
      install(TARGETS pxgsettings RUNTIME DESTINATION ${LIBEXEC_INSTALL_DIR})
    else(WITH_GNOME3)
      add_executable(pxgconf modules/pxgconf.cpp)
      target_link_libraries(pxgconf ${GNOME2_LIBRARIES})
      install(TARGETS pxgconf RUNTIME DESTINATION ${LIBEXEC_INSTALL_DIR})
    endif(WITH_GNOME3)
  endif()
endif()
