diff options
author | Benjamin Reed <ranger@befunk.com> | 2009-06-02 21:19:45 +0000 |
---|---|---|
committer | Benjamin Reed <ranger@befunk.com> | 2009-06-02 21:19:45 +0000 |
commit | 5363f85ae5e6be164e1bb32164f45c41800fb520 (patch) | |
tree | 772a4eb451eea5b7a6d5603edc0d819166babd9c /modules | |
parent | ae3ca088bb52dd48d2ecba2e00467e7803a516f2 (diff) | |
download | extra-cmake-modules-5363f85ae5e6be164e1bb32164f45c41800fb520.tar.gz extra-cmake-modules-5363f85ae5e6be164e1bb32164f45c41800fb520.tar.bz2 |
if PHONON_INCLUDE_DIR is a framework directory on Mac OS X, we need to include the Headers/ subdir to read the .h file directly
svn path=/trunk/KDE/kdelibs/; revision=976874
Diffstat (limited to 'modules')
-rw-r--r-- | modules/FindPhonon.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/FindPhonon.cmake b/modules/FindPhonon.cmake index 93332697..e9d45f0b 100644 --- a/modules/FindPhonon.cmake +++ b/modules/FindPhonon.cmake @@ -12,7 +12,11 @@ # For details see the accompanying COPYING-CMAKE-SCRIPTS file. macro(_phonon_find_version) - file(READ "${PHONON_INCLUDE_DIR}/phonon/phononnamespace.h" _phonon_header LIMIT 5000 OFFSET 1000) + set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/phonon/phononnamespace.h") + if (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phonon/phononnamespace.h") + set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/Headers/phonon/phononnamespace.h") + endif (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phonon/phononnamespace.h") + file(READ _phonon_namespace_header_file _phonon_header LIMIT 5000 OFFSET 1000) string(REGEX MATCH "define PHONON_VERSION_STR \"(4\\.[0-9]+\\.[0-9a-z]+)\"" _phonon_version_match "${_phonon_header}") set(PHONON_VERSION "${CMAKE_MATCH_1}") message(STATUS "Phonon Version: ${PHONON_VERSION}") |