Set parent for new windows dialog
[quassel.git] / src / main / CMakeLists.txt
1 if (HAVE_UMASK)
2     set_property(SOURCE main.cpp APPEND PROPERTY COMPILE_DEFINITIONS HAVE_UMASK)
3 endif()
4
5 if (WITH_BUNDLED_ICONS)
6     set_property(SOURCE main.cpp APPEND PROPERTY COMPILE_DEFINITIONS WITH_BUNDLED_ICONS)
7 endif()
8
9 # Windows icon resource
10 if(WIN32)
11     if(MINGW)
12         find_program(WINDRES_EXECUTABLE NAMES windres)
13         if(WINDRES_EXECUTABLE)
14             exec_program(windres
15                 ARGS "-i ${CMAKE_SOURCE_DIR}/pics/win32.rc"
16                      "-o ${CMAKE_CURRENT_BINARY_DIR}/win32.o"
17                      "--include-dir=${CMAKE_SOURCE_DIR}/pics"
18                 )
19             set(WIN_RC ${CMAKE_CURRENT_BINARY_DIR}/win32.o)
20         endif()
21     else()
22         set(WIN_RC ${CMAKE_SOURCE_DIR}/pics/win32.rc)
23     endif()
24 endif()
25
26 # Build the executables
27 if (WANT_CORE)
28     quassel_add_executable(quasselcore COMPONENT Core SOURCES main.cpp ${WIN_RC} LIBRARIES Qt5::Core Quassel::Core)
29 endif()
30
31 if (WANT_QTCLIENT)
32     set(libs Qt5::Core Qt5::Gui Quassel::QtUi)
33     if (WITH_KDE)
34         list(APPEND libs KF5::CoreAddons)
35     endif()
36     quassel_add_executable(quasselclient COMPONENT Client SOURCES main.cpp ${WIN_RC} LIBRARIES ${libs})
37 endif()
38
39 if (WANT_MONO)
40     set(libs Qt5::Core Qt5::Gui Quassel::Core Quassel::QtUi)
41     if (WITH_KDE)
42         list(APPEND libs KF5::CoreAddons)
43     endif()
44     quassel_add_executable(quassel COMPONENT Mono SOURCES main.cpp monoapplication.cpp ${WIN_RC} LIBRARIES ${libs})
45 endif()