summaryrefslogtreecommitdiff
path: root/libproxy/cmake/modules/config_gnome.cmk
blob: 432697222d0c7a8ce03cd448a8754416a7049061 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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()