[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [phonon-vlc/0.6] cmake/modules: (only) include internals when phonon_add_executable macro is not pre
From:       Harald Sitter <sitter () kde ! org>
Date:       2013-01-31 23:40:02
Message-ID: 20130131234002.9413DA6091 () git ! kde ! org
[Download RAW message or body]

Git commit 7e8d9eee34beff7f08c69cf213905716f0eee239 by Harald Sitter.
Committed on 01/02/2013 at 00:36.
Pushed by sitter into branch '0.6'.

(only) include internals when phonon_add_executable macro is not present

this increases compatibility between phonon <4.7 and >=4.7. for <4.7 the
internals will not be included (as they are already present), and for
>=4.7 they will be included.

note that this also prevents general double-inclusion, which is why it uses
the macro check over a version check. for phonon5 we should find a better
solution though.

Conflicts:
	cmake/modules/FindPhonon.cmake

M  +8    -2    cmake/modules/FindPhonon.cmake

http://commits.kde.org/phonon-vlc/7e8d9eee34beff7f08c69cf213905716f0eee239

diff --git a/cmake/modules/FindPhonon.cmake b/cmake/modules/FindPhonon.cmake
index 1112616..b9f4bc5 100644
--- a/cmake/modules/FindPhonon.cmake
+++ b/cmake/modules/FindPhonon.cmake
@@ -1,14 +1,20 @@
 # Find Phonon
 
-# Copyright (c) 2010, Harald Sitter <sitter@kde.org>
+# Copyright (c) 2010-2013, Harald Sitter <sitter@kde.org>
 # Copyright (c) 2011, Alexander Neundorf <neundorf@kde.org>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
 find_package(Phonon NO_MODULE)
-if(PHONON_FOUND)
+
+if(PHONON_BUILDSYSTEM_DIR)
     set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PHONON_BUILDSYSTEM_DIR})
+    # Prevent double-include of internals, and make sure they are included
+    # In Phonon <4.7 the internals were auto-included, in >=4.7 they are not.
+    if(NOT COMMAND phonon_add_executable)
+        include(${PHONON_BUILDSYSTEM_DIR}/FindPhononInternal.cmake )
+    endif()
 endif()
 
 include(FindPackageHandleStandardArgs)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic