[vlc-commits] commit: Fix linking (Jean-Baptiste Kempf )

git at videolan.org git at videolan.org
Sat Mar 13 18:07:39 CET 2010


vlc/phonon | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Mar 13 18:07:59 2010 +0100| [0a3cb2e2406599e320506ac9962486eb0d2813ee] | committer: Jean-Baptiste Kempf 

Fix linking

> http://git.videolan.org/gitweb.cgi/vlc/phonon.git/?a=commit;h=0a3cb2e2406599e320506ac9962486eb0d2813ee
---

 CMakeLists.txt                 |   16 +++++++++++-----
 cmake/modules/FindLIBVLC.cmake |    1 +
 vlc/CMakeLists.txt             |    7 ++++---
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 71d7a36..8a962e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,21 +20,18 @@ include(PhononMacros)
 include(MacroLogFeature)
 include(MacroOptionalFindPackage)
 
+# Qt4
 set(QT_MIN_VERSION 4.4.0)
 find_package(Qt4 REQUIRED)
 if (NOT QT_QTDBUS_FOUND)
    message(STATUS "Warning: Phonon won't be compiled with DBus support.")
 endif(NOT QT_QTDBUS_FOUND)
 
+# Automoc
 find_package(Automoc4 REQUIRED)
 include (CheckCXXCompilerFlag)
 include (MacroEnsureVersion)
 
-find_package(Phonon REQUIRED)
-if(PHONON_PULSESUPPORT)
-  add_definitions(-DPHONON_PULSESUPPORT)
-endif(PHONON_PULSESUPPORT)
-find_package(LIBVLC REQUIRED)
 if (NOT AUTOMOC4_VERSION)
    set(AUTOMOC4_VERSION "0.9.83")
 endif (NOT AUTOMOC4_VERSION)
@@ -43,6 +40,15 @@ if (NOT _automoc4_version_ok)
    message(FATAL_ERROR "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least 0.9.86")
 endif (NOT _automoc4_version_ok)
 
+# Phonon
+find_package(Phonon REQUIRED)
+if(PHONON_PULSESUPPORT)
+  add_definitions(-DPHONON_PULSESUPPORT)
+endif(PHONON_PULSESUPPORT)
+
+# libVLC
+find_package(LIBVLC REQUIRED)
+
 if (CMAKE_COMPILER_IS_GNUCXX)
    set (KDE4_ENABLE_EXCEPTIONS -fexceptions)
    # Select flags.
diff --git a/cmake/modules/FindLIBVLC.cmake b/cmake/modules/FindLIBVLC.cmake
index b312cd6..d922897 100644
--- a/cmake/modules/FindLIBVLC.cmake
+++ b/cmake/modules/FindLIBVLC.cmake
@@ -65,3 +65,4 @@ ELSE (LIBVLC_FOUND)
       MESSAGE(FATAL_ERROR "Could not find LibVLC")
    ENDIF (LIBVLC_FIND_REQUIRED)
 ENDIF (LIBVLC_FOUND)
+
diff --git a/vlc/CMakeLists.txt b/vlc/CMakeLists.txt
index 1909a9a..153222f 100644
--- a/vlc/CMakeLists.txt
+++ b/vlc/CMakeLists.txt
@@ -1,6 +1,6 @@
 project(phonon-vlc)
-include_directories(${QT_INCLUDES} 
-                    ${VLC_INCLUDE_DIRS} 
+include_directories(${QT_INCLUDES}
+                    ${VLC_INCLUDE_DIRS}
                     ${CMAKE_CURRENT_SOURCE_DIR})
 
 add_definitions(-D_PHONON_BACKEND_VERSION_4_2)
@@ -26,7 +26,8 @@ automoc4(phonon_vlc phonon_vlc_SRCS)
 add_library(phonon_vlc MODULE ${phonon_vlc_SRCS})
 
 set_target_properties(phonon_vlc PROPERTIES PREFIX "")
-target_link_libraries(phonon_vlc ${PHONON_LIBS} ${LIBVLC_LIBRARIES})
+target_link_libraries(phonon_vlc ${PHONON_LIBS} ${LIBVLC_LIBRARY}
+    ${LIBVLCCORE_LIBRARY} )
 
 if(WIN32)
     install(TARGETS phonon_vlc DESTINATION bin/phonon_backend)



More information about the vlc-commits mailing list