Seite 1 von 2

cmake+Qt 4.4 -> Phonon

Verfasst: 10. Februar 2008 14:31
von C167
Tagchen,
ich schreibe hier ein Programm mit Qt 4.4-tp1 unter Linux, das spaeter auf Windows laufen soll. die TP1 verwende ich deshalb, weil ich kleinere Filmchen abspielen moechte, die aber nicht als Dateien vorliegen haben moechte.

Ich hab jetzt mal mehr aus jux versucht, vom QMake weg in Richtung CMake zu arbeiten, dabei tun sich mir als CMake-neuling allerdings einige Probleme auf

Ich moechte nun gegen die Qt-eigene Phonon-Bibliothek linken, aber die wird in der Datei FindQt4.cmake natuerlich nicht beruecksichtigt. Ich hab mir dann gedacht, dass das anpassen der Datei ja nicht so schwer sein kann. Gesagt getan: http://web1.v846.ncsrv.de/cmake/FindQt4.cmake_4.4.patch
Nur, er findet die Bibliothek nicht... was kann man da machen?

¤dit: da fehlt was: meine beiden CMakeList-txt's:

Code: Alles auswählen

SET( CMAKE_VERBOSE_MAKEFILE TRUE )

PROJECT( cdlauncher )

SET( QT_USE_QTSQL TRUE )
SET( QT_USE_PHONON TRUE )

FIND_PACKAGE( Qt4 REQUIRED )

INCLUDE( ${QT_USE_FILE} )

INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
INCLUDE_DIRECTORIES( ${QT_QTSQL_INCLUDE_DIR} )

ADD_DEFINITIONS( ${QT_DEFINITIONS} )

ADD_SUBDIRECTORY( src )
und die in src/:

Code: Alles auswählen

SET( cdlauncher_SOURCES main.cpp cdlauncher.cpp imagelabel.cpp imageviewer.cpp mainpage.cpp movieplayer.cpp programviewer.cpp renderthread.cpp )
SET( cdlauncher_HEADERS cdlauncher.h imagelabel.h imageviewer.h mainpage.h movieplayer.cpp programviewer.cpp renderthread.cpp )
SET( cdlauncher_RESOURCES images/images.qrc splashes/splashes.qrc )


QT4_WRAP_CPP( cdlauncher_HEADERS_MOC ${cdlauncher_HEADERS} )
QT4_ADD_RESOURCES( cdlauncher_RESOURCES_SOURCES ${cdlauncher_RESOURCES} )

#IF( MINGW )
#        ADD_CUSTOM_COMMAND(
#                OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/appicon.o
#                COMMAND windres.exe -I${CMAKE_CURRENT_SOURCE_DIR} -i${CMAKE_CURRENT_SOURCE_DIR}/appicon.rc -o ${CMAKE_CURRENT_BINARY_DIR}/appicon.o )
#ENDIF( MINGW )

MESSAGE(STATUS "${cdlauncher_SOURCES}\n${cdlauncher_HEADERS_MOC}\n${cdlauncher_RESOURCES_SOURCES}")
MESSAGE(STATUS "${QT_WEBKIT_INCLUDE_DIR}\n${QT_QTXML_INCLUDE_DIR}")
ADD_EXECUTABLE( cdlauncher ${cdlauncher_SOURCES} ${cdlauncher_HEADERS_MOC} ${cdlauncher_RESOURCES_SOURCES} )
TARGET_LINK_LIBRARIES( cdlauncher ${QT_LIBRARIES} )

Verfasst: 10. Februar 2008 15:02
von franzf
Findet er wirklich die Bibliothek nicht, oder meckert er wegen den phonon-headers?
Denn du fügst den INCLUDE_DIRECTORIES zwar das QtSql-dir hinzu aber nicht das von Phonon.

Ansonsten zeig mal den Output, dann kann man sicher mehr sagen :)

Grüße
Franz

Verfasst: 10. Februar 2008 17:16
von C167
die SQL-Bibliothek hab ich anfangs so eingebunden, weil ich nicht wusste, dass man einfach QT_USE_SQL true setzen muss, bevor man FIND_PACKAGE aufruft... ich habs einfach vergessen. output:

Code: Alles auswählen

[100%] Building CXX object src/CMakeFiles/cdlauncher.dir/qrc_splashes.o
Linking CXX executable cdlauncher
CMakeFiles/cdlauncher.dir/main.o: In function `main':
main.cpp:(.text+0x1e): undefined reference to `qInitResources_application()'
CMakeFiles/cdlauncher.dir/movieplayer.o: In function `MoviePlayer::~MoviePlayer()':
movieplayer.cpp:(.text+0x15): undefined reference to `vtable for MoviePlayer'
movieplayer.cpp:(.text+0x1c): undefined reference to `vtable for MoviePlayer'
movieplayer.cpp:(.text+0x48): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x4f): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x61): undefined reference to `Phonon::MediaNode::~MediaNode()'
movieplayer.cpp:(.text+0x70): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x77): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x82): undefined reference to `Phonon::AbstractAudioOutput::~AbstractAudioOutput()'
movieplayer.cpp:(.text+0x8d): undefined reference to `Phonon::MediaObject::~MediaObject()'
movieplayer.cpp:(.text+0x112): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x119): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x12b): undefined reference to `Phonon::MediaNode::~MediaNode()'
movieplayer.cpp:(.text+0x13a): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x141): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x14c): undefined reference to `Phonon::AbstractAudioOutput::~AbstractAudioOutput()'
movieplayer.cpp:(.text+0x157): undefined reference to `Phonon::MediaObject::~MediaObject()'
CMakeFiles/cdlauncher.dir/movieplayer.o: In function `MoviePlayer::~MoviePlayer()':
movieplayer.cpp:(.text+0x37f): undefined reference to `vtable for MoviePlayer'
movieplayer.cpp:(.text+0x386): undefined reference to `vtable for MoviePlayer'
movieplayer.cpp:(.text+0x3b2): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x3b9): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x3cb): undefined reference to `Phonon::MediaNode::~MediaNode()'
movieplayer.cpp:(.text+0x3da): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x3e1): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x3ec): undefined reference to `Phonon::AbstractAudioOutput::~AbstractAudioOutput()'
movieplayer.cpp:(.text+0x3f7): undefined reference to `Phonon::MediaObject::~MediaObject()'
movieplayer.cpp:(.text+0x47c): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x483): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x495): undefined reference to `Phonon::MediaNode::~MediaNode()'
movieplayer.cpp:(.text+0x4a4): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x4ab): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x4b6): undefined reference to `Phonon::AbstractAudioOutput::~AbstractAudioOutput()'
movieplayer.cpp:(.text+0x4c1): undefined reference to `Phonon::MediaObject::~MediaObject()'
CMakeFiles/cdlauncher.dir/movieplayer.o: In function `MoviePlayer::~MoviePlayer()':
movieplayer.cpp:(.text+0x66d): undefined reference to `vtable for MoviePlayer'
movieplayer.cpp:(.text+0x674): undefined reference to `vtable for MoviePlayer'
movieplayer.cpp:(.text+0x6a0): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x6a7): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x6b9): undefined reference to `Phonon::MediaNode::~MediaNode()'
movieplayer.cpp:(.text+0x6c8): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x6cf): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x6da): undefined reference to `Phonon::AbstractAudioOutput::~AbstractAudioOutput()'
movieplayer.cpp:(.text+0x6e5): undefined reference to `Phonon::MediaObject::~MediaObject()'
movieplayer.cpp:(.text+0x772): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x779): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x78b): undefined reference to `Phonon::MediaNode::~MediaNode()'
movieplayer.cpp:(.text+0x79a): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x7a1): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x7ac): undefined reference to `Phonon::AbstractAudioOutput::~AbstractAudioOutput()'
movieplayer.cpp:(.text+0x7b7): undefined reference to `Phonon::MediaObject::~MediaObject()'
CMakeFiles/cdlauncher.dir/movieplayer.o: In function `MoviePlayer::MoviePlayer(QWidget*)':
movieplayer.cpp:(.text+0x1b1e): undefined reference to `vtable for MoviePlayer'
movieplayer.cpp:(.text+0x1b25): undefined reference to `vtable for MoviePlayer'
movieplayer.cpp:(.text+0x1b3c): undefined reference to `Phonon::MediaObject::MediaObject(QObject*)'
movieplayer.cpp:(.text+0x1b53): undefined reference to `Phonon::AudioOutput::AudioOutput(QObject*)'
movieplayer.cpp:(.text+0x1b6a): undefined reference to `Phonon::VideoWidget::VideoWidget(QWidget*)'
movieplayer.cpp:(.text+0x2003): undefined reference to `Phonon::SeekSlider::SeekSlider(QWidget*)'
movieplayer.cpp:(.text+0x2be6): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x2bed): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x2bf4): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x2c0e): undefined reference to `Phonon::MediaNode::~MediaNode()'
movieplayer.cpp:(.text+0x2c21): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x2c28): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x2c34): undefined reference to `Phonon::AbstractAudioOutput::~AbstractAudioOutput()'
movieplayer.cpp:(.text+0x2c40): undefined reference to `Phonon::MediaObject::~MediaObject()'
CMakeFiles/cdlauncher.dir/movieplayer.o: In function `MoviePlayer::MoviePlayer(QWidget*)':
movieplayer.cpp:(.text+0x3194): undefined reference to `vtable for MoviePlayer'
movieplayer.cpp:(.text+0x319b): undefined reference to `vtable for MoviePlayer'
movieplayer.cpp:(.text+0x31b2): undefined reference to `Phonon::MediaObject::MediaObject(QObject*)'
movieplayer.cpp:(.text+0x31c9): undefined reference to `Phonon::AudioOutput::AudioOutput(QObject*)'
movieplayer.cpp:(.text+0x31e0): undefined reference to `Phonon::VideoWidget::VideoWidget(QWidget*)'
movieplayer.cpp:(.text+0x3679): undefined reference to `Phonon::SeekSlider::SeekSlider(QWidget*)'
movieplayer.cpp:(.text+0x425c): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x4263): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x426a): undefined reference to `vtable for Phonon::VideoWidget'
movieplayer.cpp:(.text+0x4284): undefined reference to `Phonon::MediaNode::~MediaNode()'
movieplayer.cpp:(.text+0x4297): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x429e): undefined reference to `vtable for Phonon::AudioOutput'
movieplayer.cpp:(.text+0x42aa): undefined reference to `Phonon::AbstractAudioOutput::~AbstractAudioOutput()'
movieplayer.cpp:(.text+0x42b6): undefined reference to `Phonon::MediaObject::~MediaObject()'
CMakeFiles/cdlauncher.dir/movieplayer.o: In function `Phonon::AbstractVideoOutput::~AbstractVideoOutput()':
movieplayer.cpp:(.text._ZN6Phonon19AbstractVideoOutputD0Ev[Phonon::AbstractVideoOutput::~AbstractVideoOutput()]+0x12): undefined reference to `Phonon::MediaNode::~MediaNode()'
CMakeFiles/cdlauncher.dir/movieplayer.o: In function `Phonon::AbstractVideoOutput::~AbstractVideoOutput()':
movieplayer.cpp:(.text._ZN6Phonon19AbstractVideoOutputD1Ev[Phonon::AbstractVideoOutput::~AbstractVideoOutput()]+0xb): undefined reference to `Phonon::MediaNode::~MediaNode()'
CMakeFiles/cdlauncher.dir/movieplayer.o:(.rodata._ZTIN6Phonon19AbstractVideoOutputE[typeinfo for Phonon::AbstractVideoOutput]+0x8): undefined reference to `typeinfo for Phonon::MediaNode'
CMakeFiles/cdlauncher.dir/programviewer.o: In function `ProgramViewer::~ProgramViewer()':
programviewer.cpp:(.text+0x12): undefined reference to `vtable for ProgramViewer'
programviewer.cpp:(.text+0x19): undefined reference to `vtable for ProgramViewer'
CMakeFiles/cdlauncher.dir/programviewer.o: In function `ProgramViewer::~ProgramViewer()':
programviewer.cpp:(.text+0x40): undefined reference to `vtable for ProgramViewer'
programviewer.cpp:(.text+0x47): undefined reference to `vtable for ProgramViewer'
CMakeFiles/cdlauncher.dir/programviewer.o: In function `ProgramViewer::~ProgramViewer()':
programviewer.cpp:(.text+0x56): undefined reference to `vtable for ProgramViewer'
CMakeFiles/cdlauncher.dir/programviewer.o:programviewer.cpp:(.text+0x5d): more undefined references to `vtable for ProgramViewer' follow
CMakeFiles/cdlauncher.dir/renderthread.o: In function `RenderThread::~RenderThread()':
renderthread.cpp:(.text+0xc): undefined reference to `vtable for RenderThread'
CMakeFiles/cdlauncher.dir/renderthread.o: In function `RenderThread::~RenderThread()':
renderthread.cpp:(.text+0x2c): undefined reference to `vtable for RenderThread'
CMakeFiles/cdlauncher.dir/renderthread.o: In function `RenderThread::~RenderThread()':
renderthread.cpp:(.text+0x3c): undefined reference to `vtable for RenderThread'
CMakeFiles/cdlauncher.dir/renderthread.o: In function `RenderThread::RenderThread()':
renderthread.cpp:(.text+0x60): undefined reference to `vtable for RenderThread'
CMakeFiles/cdlauncher.dir/renderthread.o: In function `RenderThread::RenderThread()':
renderthread.cpp:(.text+0x84): undefined reference to `vtable for RenderThread'
collect2: ld returned 1 exit status
make[2]: *** [src/cdlauncher] Fehler 1
make[1]: *** [src/CMakeFiles/cdlauncher.dir/all] Fehler 2
make: *** [all] Fehler 2

Verfasst: 10. Februar 2008 20:38
von Christian81
Da FindQt4.cmake von cmake 2.4.8 noch kein Phonon unterstützt muss man es wohl von Hand hinzufügen.

Verfasst: 10. Februar 2008 22:00
von C167
Jau, und da die Unterstuetzung auch im CVS noch nciht gegeben ist, hab ich mir gedacht, das machste selber (siehe Patch oben). Nur hat der Patch nciht funktioniert... also doch das gefiesel rein in die CMakeList.txt...

Verfasst: 10. Februar 2008 22:15
von Christian81
QT_USE_PHONON wird aber nicht in FindQt4.cmake definiert sondern in UseQt4.cmake

Verfasst: 10. Februar 2008 23:47
von C167
oh.. danke, so langsam komm ich in cmake rein... ich hab naemlich schon die Pruefungen gesucht, ein einfaches grep haette das gebracht...
okay, ich hab also bissel gepatched...
Patch UseQt4.cmake:

Code: Alles auswählen

--- UseQt4.cmake_orig   2008-01-25 11:00:07.000000000 +0100
+++ UseQt4.cmake        2008-02-10 23:32:38.000000000 +0100
@@ -102,6 +102,14 @@
   QT_MODULE_SETUP(DBUS)
 ENDIF (QT_USE_QTDBUS)

+IF (QT_USE_QTWEBKIT)
+  QT_MODULE_SETUP(WEBKIT)
+ENDIF (QT_USE_QTWEBKIT)
+
+IF (QT_USE_QTPHONON)
+  QT_MODULE_SETUP(PHONON)
+ENDIF (QT_USE_QTPHONON)
+
 IF (NOT QT_DONT_USE_QTCORE)
   QT_MODULE_SETUP(CORE)
 ENDIF (NOT QT_DONT_USE_QTCORE)
Patch FindQt4.cmake:

Code: Alles auswählen

--- FindQt4.cmake_orig  2008-01-25 11:00:06.000000000 +0100
+++ FindQt4.cmake       2008-02-10 23:32:05.000000000 +0100
@@ -24,6 +24,8 @@
 #                    QT_USE_QTUITOOLS
 #                    QT_USE_QTDBUS
 #                    QT_USE_QTSCRIPT
+#                    QT_USE_QTWEBKIT
+#                    QT_USE_QTPHONON
 #
 # All the libraries required are stored in a variable called QT_LIBRARIES.
 # Add this variable to your TARGET_LINK_LIBRARIES.
@@ -79,6 +81,8 @@
 #  QT_QTSCRIPT_FOUND      True if QtScript was found.
 #  QT_QTTEST_FOUND        True if QtTest was found.
 #  QT_QTUITOOLS_FOUND     True if QtUiTools was found.
+#  QT_QTWEBKIT_FOUND      True if QtWebKit was found.
+#  QT_QTPHONON_FOUND      True if QtPhonon was found.
 #
 #  QT_DEFINITIONS   Definitions to use when compiling code that uses Qt.
 #
@@ -106,6 +110,8 @@
 #  QT_QTSVG_INCLUDE_DIR        Path to "include/QtSvg"
 #  QT_QTSCRIPT_INCLUDE_DIR     Path to "include/QtScript"
 #  QT_QTTEST_INCLUDE_DIR       Path to "include/QtTest"
+#  QT_QTWEBKIT_INCLUDE_DIR     Path to "include/QtWebKit"
+#  QT_QTPHONON_INCLUDE_DIR     Path to "include/QtPhonon"
 #
 #  QT_LIBRARY_DIR              Path to "lib" of Qt4
 #
@@ -188,7 +194,15 @@
 # The QtUiTools library:      QT_QTUITOOLS_LIBRARY
 #                             QT_QTUITOOLS_LIBRARY_RELEASE
 #                             QT_QTUITOOLS_LIBRARY_DEBUG
-#
+#
+# The QtWebKit library:       QT_QTWEBKIT_LIBRARY
+#                             QT_QTWEBKIT_LIBRARY_RELEASE
+#                             QT_QTWEBKIT_LIBRARY_DEBUG
+#
+# The QtPhonon library:       QT_QTPHONON_LIBRARY
+#                             QT_QTPHONON_LIBRARY_RELEASE
+#                             QT_QTPHONON_LIBRARY_DEBUG
+#
 # also defined, but NOT for general use are
 #  QT_MOC_EXECUTABLE          Where to find the moc tool.
 #  QT_UIC_EXECUTABLE          Where to find the uic tool.
@@ -594,6 +608,22 @@
     NO_DEFAULT_PATH
     )

+  # Set QT_QTWEBKIT_INCLUDE_DIR
+  FIND_PATH(QT_QTWEBKIT_INCLUDE_DIR QtWebKit
+    PATHS
+    ${QT_INCLUDE_DIR}/QtWebKit
+    ${QT_HEADERS_DIR}/QtWebKit
+    NO_DEFAULT_PATH
+    )
+
+  # Set QT_QTPHONON_INCLUDE_DIR
+  FIND_PATH(QT_QTPHONON_INCLUDE_DIR phonon
+    PATHS
+    ${QT_INCLUDE_DIR}/phonon
+    ${QT_HEADERS_DIR}/phonon
+    NO_DEFAULT_PATH
+    )
+
   # Make variables changeble to the advanced user
   MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_INCLUDE_DIR QT_QT_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR QT_PLUGINS_DIR)

@@ -660,6 +690,16 @@
   FIND_LIBRARY(QT_QTDBUS_LIBRARY_RELEASE NAMES QtDBus QtDBus4 PATHS ${QT_LIBRARY_DIR}                       NO_DEFAULT_PATH)
   FIND_LIBRARY(QT_QTDBUS_LIBRARY_DEBUG   NAMES QtDBus_debug QtDBus_debug4 QtDBusd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

+  # Set QT_QTWEBKIT_LIBRARY
+  # This was introduced with Qt 4.4
+  FIND_LIBRARY(QT_QTWEBKIT_LIBRARY_RELEASE NAMES QtWebKit PATHS ${QT_LIBRARY_DIR}       NO_DEFAULT_PATH)
+  FIND_LIBRARY(QT_QTWEBKIT_LIBRARY_DEBUG   NAMES QtWebKit_debug PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+  # Set QT_PHONON_LIBRARY
+  # This was introduced with Qt 4.4, name may change in future versions
+  FIND_LIBRARY(QT_QTPHONON_LIBRARY_RELEASE NAMES phonon PATHS ${QT_LIBRARY_DIR}       NO_DEFAULT_PATH)
+  FIND_LIBRARY(QT_QTPHONON_LIBRARY_RELEASE NAMES phonon_debug PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
   # Set QT_QTSCRIPT_LIBRARY
   FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_RELEASE NAMES QtScript QtScript4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
   FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_DEBUG   NAMES QtScript_debug QtScriptd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
@@ -762,6 +802,8 @@
   _QT4_ADJUST_LIB_VARS(QTUITOOLS)
   _QT4_ADJUST_LIB_VARS(QTTEST)
   _QT4_ADJUST_LIB_VARS(QTDBUS)
+  _QT4_ADJUST_LIB_VARS(QTWEBKIT)
+  _QT4_ADJUST_LIB_VARS(QTPHONON)

   # platform dependent libraries
   IF(Q_WS_X11)
Wenn ich ein

Code: Alles auswählen

MESSAGE(STATUS "${QT_INCLUDE_DIR}\n${QT_HEADERS_DIR}\n${QT_QTPHONON_LIBRARY_RELEASE}\n${QT_QTPHONON_INCLUDE_DIR}")
mache, kommt dabei die richtige Ausgabe:

Code: Alles auswählen

-- /usr/include/qt4
/usr/include/qt4
/usr/lib/libphonon.so
/usr/include/qt4/phonon
Scheint also alles zu stimmen. Nur warum bekomme ich immernoch den gleichen Fehler?

Verfasst: 11. Februar 2008 07:02
von Christian81
Du includierst UseQt4.cmake nicht.

/edit: oder auch nicht. Ich schau mal ob es bei mir funktioniert.

Verfasst: 11. Februar 2008 10:14
von Christian81
Ok, bei mir geht es jetzt.
Ich glaube ich weiss auch wo der Fehler liegt.
QT_USE_FILE wird mit

Code: Alles auswählen

SET(QT_USE_FILE ${CMAKE_SOURCE_DIR}/cmake/UseQt4.cmake)
anstatt
SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
initialisiert -> Es wird ein falsches UseQt4.cmake benutzt und Phonon nicht hinzugefügt (ich gehe mal davon aus Du benutzt eigene cmake scripts anstatt die originalen in /usr/share/cmake/... zu verändern)

Verfasst: 11. Februar 2008 11:21
von C167
ich hab die originalen gespeichert (kopiert) und dann editiert

Code: Alles auswählen

/usr/share/cmake-2.4# grep QT_USE_FILE * -R
_FindQt4.cmake:# QT_USE_FILE which is the path to a CMake file that can be included to compile
_FindQt4.cmake:SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
Modules/FindQt4.cmake:# QT_USE_FILE which is the path to a CMake file that can be included to compile
Modules/FindQt4.cmake:SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
Modules/FindQt4.cmake_orig:# QT_USE_FILE which is the path to a CMake file that can be included to compile
Modules/FindQt4.cmake_orig:SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
¤dit: kann natuerlich sein dass ich was falsch verstehe, aber beim Matheunterricht was anderes zu machen ist nicht so einfach
¤dit2: und ich sollte vllt dazu sagen dass ich hier ein Debian Sid verwende ;)

Verfasst: 11. Februar 2008 12:39
von Christian81
C167 hat geschrieben:ich hab die originalen gespeichert (kopiert) und dann editiert
So sollte man das aber auf keinen Fall machen.
Die modifizierten/eigenen scripte sollten schon beim Code dabei sein.

Verfasst: 11. Februar 2008 13:55
von C167
Naja, das Projekt wird von mir quasi allein betreut, keiner ausser mir oder meiner engen bekannten (denen eh jeder Schritt erklaert werden muss bis zur Installation von Qt) wird niemand die Makefiles jeh ausfuehren... ausserdem wollte ich bei CMake am Ende wenns geht nen Patch einpflegen... Nur weiss ich nicht warum es nicht funktioniert...

Verfasst: 11. Februar 2008 14:41
von Christian81
Ich verstehe deine Argumente nicht... Man verändert nicht irgendwelche Systemdateien / Programm anderer. Wenn man ein cmake script ändert, kommt es in den Source-Ordner der Applikation. Denn nur dort ist sichergestellt dass diese Änderung auch auf einem anderen Computer mit dabei ist. Ein Patch an cmake kannst Du immernoch liefern (solltest Dich aber beeilen, sobald bei kde4 qt4.4 benutzt wird, kommt der Patch von denen, nicht von Dir)

Es heisst übrigens QTPHONON, du setzt QT_USE_PHONON.

Verfasst: 11. Februar 2008 15:29
von C167
Ich persoenlich hab keine Probleme dabei, solche Dateien zu veraendern, im Zweifel kann man die ja alle mit einem aptitude reinstall cmake wiederherstellen. Ausser mir wird eh niemand das ding unter Linux compilieren...
btw...
Es heisst übrigens QTPHONON, du setzt QT_USE_PHONON.
*kopf->tisch* Vielen Dank, es tuhut!! *jubel* nun werd ich mal das ganze cmake durch die neuste CVS-Version ersetzen und schaun wie ichs da patchen muss ;)

Verfasst: 11. Februar 2008 15:33
von Christian81
Naja, die Einstellung einfach so irgendwelche Dateien von Programmen zu ändern... ich weiss nicht. Zumal cmake ja extra was mitbringt damit man das nicht machen muss.