- add_executable(quasselcore ${CMAKE_SOURCE_DIR}/src/common/main.cpp ${RES_SQL} ${RES_I18N})
- set_target_properties(quasselcore PROPERTIES COMPILE_FLAGS "${QUASSEL_QT_DEFINITIONS} -DBUILD_CORE")
- target_link_libraries(quasselcore mod_core mod_common ${QUASSEL_QT_LIBRARIES})
-endif(BUILD_CORE)
-
-if(BUILD_QTCLIENT)
- setup_qt4_variables(GUI NETWORK)
- add_executable(quasselclient ${CMAKE_SOURCE_DIR}/src/common/main.cpp ${RES_ICONS} ${RES_I18N})
- set_target_properties(quasselclient PROPERTIES COMPILE_FLAGS "${QUASSEL_QT_DEFINITIONS} -DBUILD_QTUI")
- target_link_libraries(quasselclient mod_qtui mod_uisupport mod_client mod_common ${QUASSEL_QT_LIBRARIES})
-endif(BUILD_QTCLIENT)
-
-if(BUILD_MONO)
- setup_qt4_variables(GUI NETWORK SCRIPT SQL)
- add_executable(quassel ${CMAKE_SOURCE_DIR}/src/common/main.cpp ${RES_ICONS} ${RES_SQL} ${RES_I18N})
- set_target_properties(quassel PROPERTIES COMPILE_FLAGS "${QUASSEL_QT_DEFINITIONS} -DBUILD_MONO")
- target_link_libraries(quassel mod_qtui mod_uisupport mod_client mod_core mod_common ${QUASSEL_QT_LIBRARIES})
-endif(BUILD_MONO)
+ add_executable(quasselcore ${CMAKE_SOURCE_DIR}/src/common/main.cpp
+ ${RC_SQL} ${RC_I18N} ${WIN32_RC})
+ set_target_properties(quasselcore PROPERTIES
+ COMPILE_FLAGS "-DQT_NETWORK_LIB -DQT_SCRIPT_LIB -DQT_SQL_LIB -DBUILD_CORE")
+ target_link_libraries(quasselcore mod_core mod_common
+ ${QUASSEL_QT_LIBRARIES} ${QUASSEL_SSL_LIBRARIES})
+endif(WANT_CORE)
+
+if(WANT_QTCLIENT)
+ setup_qt4_variables(${LINK_DBUS} GUI NETWORK)
+ add_executable(quasselclient WIN32 ${CMAKE_SOURCE_DIR}/src/common/main.cpp
+ ${RC_ICONS} ${RC_QUASSEL_ICONS} ${RC_I18N} ${WIN32_RC})
+ set_target_properties(quasselclient PROPERTIES
+ COMPILE_FLAGS "-DQT_GUI_LIB -DQT_NETWORK_LIB -DBUILD_QTUI")
+ target_link_libraries(quasselclient mod_qtui mod_uisupport mod_client mod_common
+ ${QUASSEL_QT_LIBRARIES} ${QUASSEL_SSL_LIBRARIES})
+endif(WANT_QTCLIENT)
+
+if(WANT_MONO)
+ setup_qt4_variables(${LINK_DBUS} GUI NETWORK SCRIPT SQL)
+ add_executable(quassel WIN32 ${CMAKE_SOURCE_DIR}/src/common/main.cpp
+ ${RC_ICONS} ${RC_QUASSEL_ICONS} ${RC_SQL} ${RC_I18N} ${WIN32_RC})
+ set_target_properties(quassel PROPERTIES
+ COMPILE_FLAGS "-DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SCRIPT_LIB -DQT_SQL_LIB -DBUILD_MONO")
+ target_link_libraries(quassel mod_qtui mod_uisupport mod_client mod_core mod_common
+ ${QUASSEL_QT_LIBRARIES} ${QUASSEL_SSL_LIBRARIES})
+endif(WANT_MONO)
+
+# Build bundles for MacOSX
+if(APPLE)
+ add_custom_command(TARGET quasselclient POST_BUILD
+ COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makebundle.py
+ ${CMAKE_SOURCE_DIR} "Quassel Client" quasselclient)
+ add_custom_command(TARGET quassel POST_BUILD
+ COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makebundle.py
+ ${CMAKE_SOURCE_DIR} "Quassel" quassel)
+ if(DEPLOY)
+ add_custom_command(TARGET quasselclient POST_BUILD
+ COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makePackage.sh Client)
+ add_custom_command(TARGET quasselcore POST_BUILD
+ COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makePackage.sh Core)
+ endif(DEPLOY)
+endif(APPLE)
+
+# Install rules
+if(WANT_CORE)
+ install(TARGETS quasselcore
+ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+endif(WANT_CORE)
+
+if(WANT_QTCLIENT)
+ install(TARGETS quasselclient
+ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+
+ install(FILES quasselclient.desktop
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
+endif(WANT_QTCLIENT)
+
+if(WANT_MONO)
+ install(TARGETS quassel
+ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+
+ install(FILES quassel.desktop
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
+endif(WANT_MONO)