1 # Include the core library.
2 INCLUDE_DIRECTORIES(${FREERECITE_SOURCE_DIR}/src/core)
3 # Make sure the compiler can find include files from our ui library.
4 INCLUDE_DIRECTORIES(${FREERECITE_BINARY_DIR}/src/gui)
5 # Include the current library for the promoted widget header.
6 INCLUDE_DIRECTORIES(${FREERECITE_SOURCE_DIR}/src/gui)
8 # Make sure the linker can find the ui library once it is built.
9 LINK_DIRECTORIES(${FREERECITE_BINARY_DIR}/bin)
11 SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
13 # with SET() command you can change variables or define new ones
14 # here we define SAMPLE_SRCS variable that contains a list of all .cpp files
15 # note that we don't need \ at the end of line
45 # another list, this time it includes all header files that should be treated with moc
70 SET( FRGUI_MOC_HDRS ${FRGUI_MOC_HDRS} WinSpeaker.h )
71 SET( FRGUI_SRCS ${FRGUI_SRCS} WinSpeaker.cpp )
86 # and finally an resource file
92 ADD_DEFINITIONS( -Wall )
94 # by default only QtCore and QtGui modules are enabled
95 # other modules must be enabled like this:
97 #SET( QT_USE_QT3SUPPORT TRUE )
99 #SET( QT_USE_QTXML TRUE )
101 # this command finds Qt4 libraries and sets all required variables
102 # note that it's Qt4, not QT4 or qt4
103 FIND_PACKAGE( Qt4 REQUIRED )
105 ## The new version do not neet QtWebKit model
106 ##SET( QT_USE_QTWEBKIT TRUE )
108 # add some useful macros and variables
109 # (QT_USE_FILE is a variable defined by FIND_PACKAGE( Qt4 ) that contains a path to CMake script)
110 INCLUDE( ${QT_USE_FILE} )
112 # this command will generate rules that will run rcc on all files from FRGUI_RCS
113 # in result FRGUI_RC_SRCS variable will contain paths to files produced by rcc
114 QT4_ADD_RESOURCES( FRGUI_RC_SRCS ${FRGUI_RCS} )
116 # this will run uic on .ui files:
117 QT4_WRAP_UI( FRGUI_UI_HDRS ${FRGUI_UIS} )
119 # and finally this will run moc:
120 QT4_WRAP_CPP( FRGUI_MOC_SRCS ${FRGUI_MOC_HDRS} )
122 ADD_LIBRARY(FreeReciteGui SHARED
130 TARGET_LINK_LIBRARIES(FreeReciteGui
136 INSTALL(TARGETS FreeReciteGui LIBRARY DESTINATION lib)