merging mod-ui changes from trunk
[duncan/yast2-qt4.git] / src / CMakeLists.txt
1 INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${QT_QT3SUPPORT_INCLUDE_DIR} "${CMAKE_SOURCE_DIR}/src/pkg" )
2
3 ADD_DEFINITIONS(
4 -DY2LOG=\\\"QT4\\\" ${QT_DEFINITIONS}
5 -DQT3_SUPPORT
6 -DQT_LOCALEDIR=\\\"${CMAKE_INSTALL_PREFIX}/share/qt4/translations\\\"
7 -DICONDIR=\\"${Y2QT_ICONDIR}\\"
8 -DLOCALEDIR=\\\"${Y2QT_LOCALEDIR}\\\"
9 -DLANG_FONTS_FILE=\\\"${CMAKE_INSTALL_PREFIX}/share/fonts/lang_fonts\\\"
10 -DTHEMEDIR=\\\"${Y2QT_THEMEDIR}\\\"
11 -DQTLIBDIR=\\\"${LIB_INSTALL_DIR}\\\"
12 )
13
14 SET( QT_USE_QT3SUPPORT TRUE )
15
16 SET(qt4_yast_plugin_SRCS
17   QY2CharValidator.cc QY2ComboTabWidget.cc QY2DiskUsageList.cc 
18   QY2LayoutUtils.cc QY2ListView.cc QY2Settings.cc Y2CCQt.cc 
19   YFrameBuffer.cc YQAlignment.cc YQApplication.cc YQBarGraph.cc 
20   YQCheckBox.cc YQCheckBoxFrame.cc YQComboBox.cc YQDateField.cc 
21   YQDialog.cc YQDownloadProgress.cc YQDumbTab.cc YQEBunny.cc 
22   YQEmpty.cc YQFrame.cc YQGenericButton.cc YQIconPool.cc 
23   YQImage.cc YQInputField.cc YQIntField.cc YQLabel.cc YQLayoutBox.cc 
24   YQLogView.cc YQMenuButton.cc YQMultiLineEdit.cc 
25   YQMultiProgressMeter.cc YQMultiSelectionBox.cc 
26   YQOptionalWidgetFactory.cc YQPackageSelectorPlugin.cc 
27   YQPartitionSplitter.cc YQProgressBar.cc YQPushButton.cc 
28   YQRadioButton.cc YQRadioButtonGroup.cc YQReplacePoint.cc 
29   YQRichText.cc YQSelectionBox.cc YQSignalBlocker.cc YQSlider.cc
30   YQSpacing.cc YQSquash.cc YQTable.cc YQTimeField.cc YQTree.cc
31   YQUI_builtins.cc YQUI_core.cc YQUI_widgets.cc YQUI_x11.cc
32   YQWidgetCaption.cc YQWidgetFactory.cc YQWizardButton.cc YQWizard.cc
33 )
34
35 QT4_AUTOMOC(${qt4_yast_plugin_SRCS})
36
37 INCLUDE_DIRECTORIES( ${QT_INCLUDES} )
38 INCLUDE_DIRECTORIES( ${YAST_INCLUDE_DIR} )
39 INCLUDE_DIRECTORIES( ${YAST_INCLUDE_DIR}/yui )
40
41 ADD_LIBRARY( py2qt4 SHARED ${qt4_yast_plugin_SRCS})
42 TARGET_LINK_LIBRARIES( py2qt4 ${YAST_LIBRARY} )
43 TARGET_LINK_LIBRARIES( py2qt4 ${YAST_YCP_LIBRARY} )
44 TARGET_LINK_LIBRARIES( py2qt4 ${YAST_PLUGIN_WFM_LIBRARY} )
45 TARGET_LINK_LIBRARIES( py2qt4 ${QT_QTCORE_LIBRARY} )
46 TARGET_LINK_LIBRARIES( py2qt4 ${QT_QTGUI_LIBRARY} )
47 TARGET_LINK_LIBRARIES( py2qt4 ${QT_QT3SUPPORT_LIBRARY} )
48 TARGET_LINK_LIBRARIES( py2qt4 ${YAST_PLUGIN_UI_LIBRARY} )
49 SET_TARGET_PROPERTIES( py2qt4 PROPERTIES SOVERSION 2 )
50
51 INSTALL(TARGETS py2qt4 LIBRARY DESTINATION ${YAST_PLUGIN_DIR} )
52
53 # ADD_SUBDIRECTORY(pkg)
54
55
56 #SET_TARGET_PROPERTIES( y2lang_qt4 PROPERTIES PREFIX "" )