-# This would suppress annoying warnings on cmake-2.6, but we can't use it
-# with 2.4, so... DUH!
-# cmake_policy(SET CMP0003 OLD) # suppress linker warnings
+if(COMMAND cmake_policy)
+ cmake_policy(SET CMP0003 OLD) # suppress linker warnings
+endif(COMMAND cmake_policy)
# Use our own (well, KDE's) version of some modules
# In particular cmake's FindQt4 and FindOpenSSL are quite buggy
# Use our own (well, KDE's) version of some modules
# In particular cmake's FindQt4 and FindOpenSSL are quite buggy
# Now that we have the correct $PATH, lets find Qt!
find_package(Qt4 REQUIRED)
# Now that we have the correct $PATH, lets find Qt!
find_package(Qt4 REQUIRED)
# Make sure version.gen exists before building mod_common
add_dependencies(mod_common genversion_run)
# Make sure version.gen exists before building mod_common
add_dependencies(mod_common genversion_run)
qt4_add_resources(RC_ICONS src/icons/icons.qrc)
qt4_add_resources(RC_QUASSEL_ICONS src/icons/quassel-icons.qrc)
qt4_add_resources(RC_SQL src/core/sql.qrc)
qt4_add_resources(RC_ICONS src/icons/icons.qrc)
qt4_add_resources(RC_QUASSEL_ICONS src/icons/quassel-icons.qrc)
qt4_add_resources(RC_SQL src/core/sql.qrc)
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
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
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
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