~ubuntu-branches/ubuntu/jaunty/quassel/jaunty-backports

« back to all changes in this revision

Viewing changes to cmake/modules/QuasselMacros.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2008-11-17 15:22:46 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20081117152246-3lwlpnr4r08910kv
Tags: 0.3.1-0ubuntu1
* New upstream release (LP: #271403)
* Drop all patches originated from upstream (quassel_*)
* Compile with non-builtin quassel icons
  + Introduce new quassel-data package
  + quassel and quassel-client depend on quassel-data
  + Don't manually enforce icon installation for desktop files in debian/rules
  + Add quassel_01_fix_iconloader.patch
* Drop perl build dependency, I have no clue why it was added in the first
  place. Neither changelog nor Bazaar knows, and since quassel compiles just
  fine without it, removing it should be save.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This macro sets variables for additional Qt modules.
 
2
# We need this because targets need different Qt4 modules, i.e. different libs
 
3
# and defines. We can't simply include UseQt4 several times, since definitions add up.
 
4
# We workaround this by using our own macro to figure out what to add.
 
5
 
 
6
macro(setup_qt4_variables)
 
7
  set(QUASSEL_QT_LIBRARIES )
 
8
  IF(WIN32)
 
9
    set(MAIN MAIN)
 
10
  ENDIF(WIN32)
 
11
  foreach(qtmod CORE ${ARGV} ${MAIN})
 
12
    set(QUASSEL_QT_LIBRARIES ${QUASSEL_QT_LIBRARIES} ${QT_QT${qtmod}_LIBRARY})
 
13
    if(STATIC)
 
14
      set(QUASSEL_QT_LIBRARIES ${QUASSEL_QT_LIBRARIES} ${QT_${qtmod}_LIB_DEPENDENCIES})
 
15
    endif(STATIC)
 
16
  endforeach(qtmod ${ARGV})
 
17
  set(QUASSEL_QT_LIBRARIES ${QUASSEL_QT_LIBRARIES} ${QT_LIBRARIES})
 
18
endmacro(setup_qt4_variables)
 
19
 
 
20
# This generates a .qm from a .ts file
 
21
macro(generate_qm outvar basename)
 
22
  set(input ${CMAKE_SOURCE_DIR}/i18n/${basename}.ts)
 
23
  set(output ${CMAKE_CURRENT_BINARY_DIR}/${basename}.qm)
 
24
  add_custom_command(OUTPUT ${output}
 
25
          COMMAND ${QT_LRELEASE_EXECUTABLE}
 
26
          ARGS ${input}
 
27
               -qm ${output}
 
28
               -silent -compress
 
29
          DEPENDS ${basename}.ts)
 
30
  set(${outvar} ${output})
 
31
endmacro(generate_qm outvar basename)