4e9c2c846f2e621f687c3e8eb0df3ecb43b597e5
[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 QY2LayoutUtils.cc QY2ListView.cc QY2Settings.cc Y2CCQt.cc YFrameBuffer.cc YQAlignment.cc YQApplication.cc YQBarGraph.cc YQCheckBox.cc YQCheckBoxFrame.cc YQComboBox.cc YQDateField.cc YQDialog.cc YQDownloadProgress.cc YQDumbTab.cc YQEBunny.cc YQEmpty.cc YQFrame.cc YQGenericButton.cc YQIconPool.cc YQImage.cc YQInputField.cc YQIntField.cc YQLabel.cc YQLayoutBox.cc YQLogView.cc YQMenuButton.cc YQMultiLineEdit.cc YQMultiProgressMeter.cc YQMultiSelectionBox.cc YQOptionalWidgetFactory.cc YQPackageSelectorPlugin.cc YQPartitionSplitter.cc YQProgressBar.cc YQPushButton.cc YQRadioButton.cc YQRadioButtonGroup.cc YQReplacePoint.cc YQRichText.cc YQSelectionBox.cc YQSignalBlocker.cc YQSlider.cc YQSpacing.cc YQSquash.cc YQTable.cc YQTimeField.cc YQTree.cc YQUI_builtins.cc YQUI_core.cc YQUI_widgets.cc YQUI_x11.cc YQWidgetCaption.cc YQWidgetFactory.cc YQWizardButton.cc YQWizard.cc
18 )
19
20 QT4_AUTOMOC(${qt4_yast_plugin_SRCS})
21
22 INCLUDE_DIRECTORIES( ${QT_INCLUDES} )
23 INCLUDE_DIRECTORIES( ${YAST_INCLUDE_DIR} )
24 INCLUDE_DIRECTORIES( ${YAST_INCLUDE_DIR}/yui )
25
26 ADD_LIBRARY( py2qt4 SHARED ${qt4_yast_plugin_SRCS})
27 TARGET_LINK_LIBRARIES( py2qt4 ${YAST_LIBRARY} )
28 TARGET_LINK_LIBRARIES( py2qt4 ${YAST_YCP_LIBRARY} )
29 TARGET_LINK_LIBRARIES( py2qt4 ${YAST_PLUGIN_WFM_LIBRARY} )
30 TARGET_LINK_LIBRARIES( py2qt4 ${QT_QTCORE_LIBRARY} )
31 TARGET_LINK_LIBRARIES( py2qt4 ${QT_QTGUI_LIBRARY} )
32 TARGET_LINK_LIBRARIES( py2qt4 ${QT_QT3SUPPORT_LIBRARY} )
33 TARGET_LINK_LIBRARIES( py2qt4 ${YAST_PLUGIN_UI_LIBRARY} )
34 SET_TARGET_PROPERTIES( py2qt4 PROPERTIES SOVERSION 2 )
35
36 INSTALL(TARGETS py2qt4 LIBRARY DESTINATION ${YAST_PLUGIN_DIR} )
37
38 ADD_SUBDIRECTORY(pkg)
39
40
41
42 #SET_TARGET_PROPERTIES( y2lang_qt4 PROPERTIES PREFIX "" )