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

« back to all changes in this revision

Viewing changes to src/CMakeLists.txt

  • 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
# Builds the three main targets
 
2
 
 
3
add_subdirectory(common)
 
4
include_directories(common)
 
5
if(WANT_CORE OR WANT_MONO)
 
6
  add_subdirectory(core)
 
7
  include_directories(core)
 
8
endif(WANT_CORE OR WANT_MONO)
 
9
if(WANT_QTCLIENT OR WANT_MONO)
 
10
  add_subdirectory(client)
 
11
  add_subdirectory(uisupport)
 
12
  add_subdirectory(qtui)
 
13
  include_directories(client)
 
14
  include_directories(uisupport)
 
15
  include_directories(qtui)
 
16
endif(WANT_QTCLIENT OR WANT_MONO)
 
17
 
 
18
include_directories(${CMAKE_CURRENT_BINARY_DIR}) # for version.gen
 
19
 
 
20
# We always add stuff in :/pics
 
21
qt4_add_resources(CLIENT_DEPS ../pics/pics.qrc)
 
22
 
 
23
if(QUASSEL_ICONS MATCHES "Builtin")
 
24
  set(CLIENT_DEPS ${CLIENT_DEPS} ../icons/qrc_hicolor.cxx)
 
25
  set_source_files_properties(../icons/qrc_hicolor.cxx PROPERTIES GENERATED true)
 
26
endif(QUASSEL_ICONS MATCHES "Builtin")
 
27
 
 
28
if(OXYGEN_ICONS MATCHES "Builtin")
 
29
  set(CLIENT_DEPS ${CLIENT_DEPS} ../icons/qrc_oxygen.cxx)
 
30
  set_source_files_properties(../icons/qrc_oxygen.cxx PROPERTIES GENERATED true)
 
31
endif(OXYGEN_ICONS MATCHES "Builtin")
 
32
 
 
33
if(WANT_CORE)
 
34
  setup_qt4_variables(NETWORK SCRIPT SQL)
 
35
  add_executable(quasselcore common/main.cpp ${COMMON_DEPS} ${CORE_DEPS})
 
36
  add_dependencies(quasselcore genversion_run)
 
37
  set_target_properties(quasselcore PROPERTIES
 
38
                                    COMPILE_FLAGS "-DQT_NETWORK_LIB -DQT_SCRIPT_LIB -DQT_SQL_LIB -DBUILD_CORE"
 
39
                                    OUTPUT_NAME ../quasselcore)
 
40
  target_link_libraries(quasselcore mod_core mod_common
 
41
                                    ${QUASSEL_QT_LIBRARIES} ${QUASSEL_SSL_LIBRARIES})
 
42
  install(TARGETS quasselcore RUNTIME DESTINATION ${BIN_INSTALL_DIR})
 
43
endif(WANT_CORE)
 
44
 
 
45
if(WANT_QTCLIENT)
 
46
  setup_qt4_variables(${LINK_DBUS} GUI NETWORK ${LINK_WEBKIT})
 
47
  add_executable(quasselclient WIN32 common/main.cpp ${COMMON_DEPS} ${CLIENT_DEPS})
 
48
  add_dependencies(quasselclient icons genversion_run)
 
49
  set_target_properties(quasselclient PROPERTIES
 
50
                                      COMPILE_FLAGS "-DQT_GUI_LIB -DQT_NETWORK_LIB -DBUILD_QTUI"
 
51
                                      OUTPUT_NAME ../quasselclient)
 
52
  target_link_libraries(quasselclient mod_qtui mod_uisupport mod_client mod_common
 
53
                                      ${QUASSEL_QT_LIBRARIES} ${QUASSEL_SSL_LIBRARIES})
 
54
  install(TARGETS quasselclient RUNTIME DESTINATION ${BIN_INSTALL_DIR})
 
55
endif(WANT_QTCLIENT)
 
56
 
 
57
if(WANT_MONO)
 
58
  setup_qt4_variables(${LINK_DBUS} GUI NETWORK SCRIPT SQL ${LINK_WEBKIT})
 
59
  qt4_wrap_cpp(MOC qtui/monoapplication.h)
 
60
  add_executable(quassel WIN32 common/main.cpp qtui/monoapplication.cpp ${MOC} ${COMMON_DEPS} ${CLIENT_DEPS} ${CORE_DEPS})
 
61
  add_dependencies(quassel icons genversion_run)
 
62
  set_target_properties(quassel PROPERTIES
 
63
                                COMPILE_FLAGS "-DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SCRIPT_LIB -DQT_SQL_LIB -DBUILD_MONO"
 
64
                                OUTPUT_NAME ../quassel)
 
65
  target_link_libraries(quassel mod_qtui mod_uisupport mod_client mod_core mod_common
 
66
                                ${QUASSEL_QT_LIBRARIES} ${QUASSEL_SSL_LIBRARIES})
 
67
  install(TARGETS quassel RUNTIME DESTINATION ${BIN_INSTALL_DIR})
 
68
endif(WANT_MONO)
 
69
 
 
70
# Build bundles for MacOSX
 
71
if(APPLE)
 
72
  add_custom_command(TARGET quasselclient POST_BUILD
 
73
                     COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makebundle.py
 
74
                             ${CMAKE_SOURCE_DIR} "Quassel Client" ../quasselclient)
 
75
  add_custom_command(TARGET quassel POST_BUILD
 
76
                     COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makebundle.py
 
77
                             ${CMAKE_SOURCE_DIR} "Quassel" ../quassel)
 
78
  if(DEPLOY)
 
79
    add_custom_command(TARGET quasselclient POST_BUILD
 
80
                       COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makePackage.sh Client ..)
 
81
    add_custom_command(TARGET quasselcore POST_BUILD
 
82
                       COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makePackage.sh Core ..)
 
83
  endif(DEPLOY)
 
84
endif(APPLE)