~ubuntu-branches/ubuntu/utopic/cairo-dock-plug-ins/utopic

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2013-03-26 00:17:44 UTC
  • mfrom: (36.1.3 cairo-dock-plug-ins)
  • Revision ID: package-import@ubuntu.com-20130326001744-10z2kb7sa66c6c6q
Tags: 3.2.0-0ubuntu1
* New upstream release.
* Upstream ChangeLog:
  - Clock: iCal: don't add a new task if the uid is NULL
  - DBus interfaces: install python interfaces for both python2 and 3
  - Dock rendering: fixed the drawing of the 3D and Curve views when the
    alignment  is not centered
  - Fixed a few compilation errors and warning for FreeBSD
  - GMenu: init: load all menus and submenus in a separated thread and
    not in the mainloop to avoid tiny freezes at startup
  - GMenu: split the applet in two directories: one if libgnome-menu-3 is
    available and another one (GMenu-old) if libgnome-menu is available.
  - GMenu: if the user wants to show the menu before it's loaded, set a
    pending event
  - gvfs integration: hidden files were not correctly handled
  - po: Imported translations from Launchpad
  - Shortcuts: Disk usage: some sentenses was not translatable
  - Shortcuts: for a bookmark that points to a volume mount it before
  - Shortcuts: if the user wants to show the menu before it's loaded, set
    a pending event
  - ShowDesktop: Gnome-Shell workaround: add a small delay before
    triggering the desktop Exposé or Gnome-Shell will not respond
  - Sound-control: ignore alsa callbacks that are not 'value changed'
  - Status-Notifier: don't reset the icon if not in compact mode
* debian/control:
  - Used the newer version of libgnome-menu (libgnome-menu-3-dev)
  - Bumped Cairo-Dock versions
  - Build-Depends: Added python3 in order to install both python 2 and 3
    interfaces

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
########### project ###############
12
12
 
13
13
project ("cairo-dock-plugins")
14
 
set (VERSION "3.1.99.rc2")
 
14
set (VERSION "3.2.0")
15
15
 
16
16
add_definitions (-std=c99 -Wall) # -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration -Wstrict-prototypes -Wreturn-type -Wparentheses -Warray-bounds) # removed for stable versions: -Wstrict-prototypes #-Wunreachable-code -Wno-unused-parameter -Wall
17
17
if (NOT ${CMAKE_BUILD_TYPE})
465
465
enable_if_not_defined (enable-python-interface)
466
466
if (enable-python-interface)
467
467
        message (STATUS " * Python:")
468
 
        find_program (PYTHON_EXECUTABLE python2)  # if python v3 is the default python interpreter (e.g. on ArchLinux), python2 program should exist and we have to use it...
469
 
        if (NOT PYTHON_EXECUTABLE OR NOT EXISTS ${PYTHON_EXECUTABLE})
 
468
        # find python executables
 
469
        find_program (PYTHON2_EXECUTABLE python2)  # if both python2&3 are installed, usually we will have 'python2' and 'python3' available (one of them being a link to 'python')
 
470
        if (PYTHON2_EXECUTABLE AND EXISTS ${PYTHON2_EXECUTABLE})
 
471
                set (PYTHON2_FOUND TRUE)
 
472
        endif()
 
473
        find_program (PYTHON3_EXECUTABLE python3)
 
474
        if (PYTHON3_EXECUTABLE AND EXISTS ${PYTHON3_EXECUTABLE})
 
475
                set (PYTHON3_FOUND TRUE)
 
476
        endif()
 
477
        if (NOT PYTHON2_FOUND OR NOT PYTHON3_FOUND)  # if we didn't find one of them, 
470
478
                find_program (PYTHON_EXECUTABLE python)
 
479
                EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print sys.version" OUTPUT_VARIABLE PYTHON_VERSION)
 
480
                STRING (REGEX REPLACE "\\..*" "" PYTHON_VERSION ${PYTHON_VERSION})
 
481
                message (STATUS "   Python Version: ${PYTHON_VERSION}")
 
482
                if ("${PYTHON_VERSION}" STREQUAL "2")
 
483
                        set (PYTHON2_EXECUTABLE ${PYTHON_EXECUTABLE})
 
484
                        set (PYTHON2_FOUND TRUE)
 
485
                else()
 
486
                        set (PYTHON3_EXECUTABLE ${PYTHON_EXECUTABLE})
 
487
                        set (PYTHON3_FOUND TRUE)
 
488
                endif()
471
489
        endif()
472
 
        EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print sys.version" OUTPUT_VARIABLE PYTHON_VERSION)
473
 
        if ("${PYTHON_VERSION}" STREQUAL "")
 
490
        
 
491
        # see if we found anything
 
492
        if (NOT PYTHON2_FOUND AND NOT PYTHON3_FOUND)
474
493
                message (STATUS "Could not find Python, won't install Python interface.")
475
494
                message (WARNING "This program is required to compile DBus applet with Python interface: python (version 2)")
476
495
                set (PROGRAMS_MISSING "${PROGRAMS_MISSING} python")
477
496
                set (with_python no)
478
497
        else()
479
 
                STRING (REGEX REPLACE "\n" "" PYTHON_VERSION ${PYTHON_VERSION})
480
 
                message (STATUS "   Python Version: ${PYTHON_VERSION}")
481
 
                message (STATUS "   Python executable program: ${PYTHON_EXECUTABLE}")
 
498
                message (STATUS "   Python executable program(s): ${PYTHON2_EXECUTABLE} ; ${PYTHON3_EXECUTABLE}")
482
499
                GET_FILENAME_COMPONENT(DEBIAN_VERSION /etc/debian_version ABSOLUTE)
483
500
                if (EXISTS ${DEBIAN_VERSION})
484
501
                        message (STATUS "   will use '--install-layout deb' with 'python setup.py install'")
485
502
                        set (DEBIAN_INSTALL_LAYOUT "--install-layout deb")
486
503
                endif()
487
 
                set (PYTHON_FOUND TRUE)
488
504
                set (with_python yes)
489
505
        endif()
490
506
endif()
700
716
set (with_gmenu no)
701
717
enable_if_not_defined (enable-gmenu)
702
718
if (enable-gmenu)
703
 
        if (gtkversion EQUAL 2)
704
 
                set (GMENU_MODULE libgnome-menu)
705
 
        else()
706
 
                set (GMENU_MODULE libgnome-menu)
707
 
                # set (GMENU_MODULE libgnome-menu-3.0) # TODO
708
 
        endif()
 
719
        set (GMENU_MODULE "libgnome-menu-3.0")
 
720
        set (GMENU_MODULE_OLD "libgnome-menu")
709
721
        pkg_check_modules (GMENU_PACKAGE ${GMENU_MODULE})
710
722
        if (NOT GMENU_PACKAGE_FOUND)
711
 
                message (STATUS "Could not find ${GMENU_MODULE}; Cairo-Dock won't be built with GMenu applet.")
712
 
                message (WARNING "This module is required to compile GMenu applet: ${GMENU_MODULE}")
 
723
                message (STATUS "Could not find ${GMENU_MODULE}; trying with an old version...")
 
724
                pkg_check_modules (GMENU_PACKAGE ${GMENU_MODULE_OLD})
 
725
                set(GMENU_OLD 1)
 
726
        endif()
 
727
        if (NOT GMENU_PACKAGE_FOUND)
 
728
                message (STATUS "Could not find ${GMENU_MODULE} nor ${GMENU_MODULE_OLD}; Cairo-Dock won't be built with GMenu applet.")
 
729
                message (WARNING "This module is required to compile GMenu applet: ${GMENU_MODULE} (or ${GMENU_MODULE_OLD})")
713
730
                set (MODULES_MISSING "${MODULES_MISSING} ${GMENU_MODULE}")
714
731
        else()
715
732
                set (GETTEXT_GMENU ${GETTEXT_PLUGINS})
716
 
                set (VERSION_GMENU "1.1.11")
 
733
                if (GMENU_OLD)
 
734
                        set (VERSION_GMENU "1.1.11")
 
735
                        set(GMENU_SRC "GMenu-old")
 
736
                        set (with_gmenu "yes (old version)")
 
737
                else()
 
738
                        set (VERSION_GMENU "2.0.0")
 
739
                        set(GMENU_SRC "GMenu")
 
740
                        set (with_gmenu "yes (new version)")
 
741
                endif()
717
742
                set (PACKAGE_GMENU "cd-GMenu")
718
 
                set (with_gmenu yes)
719
743
                set (gmenudatadir "${pluginsdatadir}/GMenu")
720
 
                configure_file (${CMAKE_CURRENT_SOURCE_DIR}/GMenu/data/GMenu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/GMenu/data/GMenu.conf)
721
 
                add_subdirectory ("GMenu")
 
744
                configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${GMENU_SRC}/data/GMenu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/${GMENU_SRC}/data/GMenu.conf)
 
745
                add_subdirectory (${GMENU_SRC})
722
746
        endif()
723
747
endif()
724
748