From kde-commits Thu Jan 31 23:40:15 2013 From: Harald Sitter Date: Thu, 31 Jan 2013 23:40:15 +0000 To: kde-commits Subject: [phonon-gstreamer/4.6] cmake: (only) include internals when phonon_add_executable macro is not prese Message-Id: <20130131234015.52194A60C8 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=135967562418464 Git commit 1c3ba4f86fdd4b880f95969c819b9bc20224207a by Harald Sitter. Committed on 01/02/2013 at 00:36. Pushed by sitter into branch '4.6'. (only) include internals when phonon_add_executable macro is not present this increases compatibility between phonon <4.7 and >=3D4.7. for <4.7 the internals will not be included (as they are already present), and for >=3D4.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/FindPhonon.cmake M +8 -2 cmake/FindPhonon.cmake http://commits.kde.org/phonon-gstreamer/1c3ba4f86fdd4b880f95969c819b9bc2022= 4207a diff --git a/cmake/FindPhonon.cmake b/cmake/FindPhonon.cmake index 64de8f0..db07646 100644 --- a/cmake/FindPhonon.cmake +++ b/cmake/FindPhonon.cmake @@ -1,14 +1,20 @@ # Find Phonon = -# Copyright (c) 2010, Harald Sitter +# Copyright (c) 2010-2013, Harald Sitter # Copyright (c) 2011, Alexander Neundorf # # Redistribution and use is allowed according to the terms of the BSD lice= nse. # 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 >=3D4.7 they are= not. + if(NOT COMMAND phonon_add_executable) + include(${PHONON_BUILDSYSTEM_DIR}/FindPhononInternal.cmake ) + endif() endif() = include(FindPackageHandleStandardArgs)