]> vaikene.ee Git - evaf/blob - src/main/GUI/CMakeLists.txt
Changes to build the software with mingw on Windows.
[evaf] / src / main / GUI / CMakeLists.txt
1 # Name of the target
2 set(TARGET eVafGUI)
3
4 # Qt modules
5 set(QT_USE_QTMAIN TRUE)
6 include(${QT_USE_FILE})
7
8 # Include files
9 include_directories(${eVaf_INCLUDE})
10
11 # Required eVaf libraries
12 set(eVaf_LIBRARIES CommonLib PluginsLib)
13
14 # Source files
15 set(SRCS
16 main.cpp
17 exithandler.cpp
18 fatalerr.cpp
19 #version.cpp
20 )
21 if(WIN32)
22 set(SRCS
23 ${SRCS}
24 winconsole.cpp
25 )
26 endif(WIN32)
27
28 # Header files for the meta-object compiler
29 set(MOC_HDRS
30 main.h
31 fatalerr.h
32 #version_p.h
33 )
34
35 # Resources
36 #set(RCCS
37 # gui.qrc
38 #)
39
40 # Version info resource file for Windows builds
41 if(WIN32 AND NOT MINGW)
42 set(SRCS ${SRCS} version.rc gui.rc)
43 endif(WIN32 AND NOT MINGW)
44
45 qt4_add_resources(RCC_SRCS ${RCCS})
46
47 qt4_wrap_cpp(MOC_SRCS ${MOC_HDRS})
48
49 add_executable(${TARGET} WIN32 ${SRCS} ${MOC_SRCS} ${RCC_SRCS})
50
51 target_link_libraries(${TARGET} ${QT_LIBRARIES} ${eVaf_LIBRARIES})
52
53 install(TARGETS ${TARGET} DESTINATION bin)