diff options
author | Sebastian Trueg <sebastian@trueg.de> | 2009-07-29 18:19:01 +0000 |
---|---|---|
committer | Sebastian Trueg <sebastian@trueg.de> | 2009-07-29 18:19:01 +0000 |
commit | 3208b1d4a10c81c23be871c7a74f77de49c3aeaf (patch) | |
tree | 9f3caf2fe7681016f9e91676a210fa5c96be2350 | |
parent | a9ed3a40905c027bbc94de8066d48b27a38b5570 (diff) | |
download | extra-cmake-modules-3208b1d4a10c81c23be871c7a74f77de49c3aeaf.tar.gz extra-cmake-modules-3208b1d4a10c81c23be871c7a74f77de49c3aeaf.tar.bz2 |
Forwardport: also include the path to the soprano cmake macro into the cmake module path.
This way the macro can be used without being included manually but also by including it.
svn path=/trunk/KDE/kdelibs/; revision=1004264
-rw-r--r-- | modules/FindSoprano.cmake | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/modules/FindSoprano.cmake b/modules/FindSoprano.cmake index e40275cd..29331cf9 100644 --- a/modules/FindSoprano.cmake +++ b/modules/FindSoprano.cmake @@ -47,18 +47,6 @@ ${KDE4_INCLUDE_DIR} ) - # find the cmake macro file installed by soprano, relative to the include dir - get_filename_component(_SOPRANO_PREFIX ${SOPRANO_INCLUDE_DIR} PATH) - # first check in <prefix>/share/soprano/cmake, if it's not found there, check in <prefix>/share/apps/cmake/modules - # find_file(_SOPRANO_MACRO_FILE NAMES SopranoAddOntology.cmake HINTS ${_SOPRANO_PREFIX}/share/soprano/cmake ) - find_file(_SOPRANO_MACRO_FILE NAMES SopranoAddOntology.cmake HINTS ${_SOPRANO_PREFIX}/share/apps/cmake/modules ) - - # since which version of soprano is this file installed ? - # we should fail if the file is not found but SOPRANO_MIN_VERSION is bigger than this version. - if(_SOPRANO_MACRO_FILE) - include(${_SOPRANO_MACRO_FILE}) - endif(_SOPRANO_MACRO_FILE) - find_library_with_debug(SOPRANO_INDEX_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES @@ -186,6 +174,23 @@ set(_plugins "${_plugins} virtuosobackend") endif(EXISTS ${SOPRANO_PLUGIN_DIR}/virtuosobackend.desktop) + # make sure the Soprano cmake macros are found + # We also include it directly for convinience + get_filename_component(_SOPRANO_PREFIX ${SOPRANO_INCLUDE_DIR} PATH) + find_file(_SOPRANO_MACRO_FILE NAMES SopranoAddOntology.cmake HINTS ${_SOPRANO_PREFIX}/share/soprano/cmake ) + if(_SOPRANO_MACRO_FILE) + # new Soprano > 2.3.0 location + include(${_SOPRANO_MACRO_FILE}) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${_SOPRANO_PREFIX}/share/soprano/cmake) + else(_SOPRANO_MACRO_FILE) + # the old Soprano 2.3.0 location + find_file(_SOPRANO_MACRO_FILE_OLD NAMES SopranoAddOntology.cmake HINTS ${_SOPRANO_PREFIX}/share/apps/cmake/modules ) + if(_SOPRANO_MACRO_FILE_OLD) + include(${_SOPRANO_MACRO_FILE_OLD}) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${_SOPRANO_PREFIX}/share/apps/cmake/modules) + endif(_SOPRANO_MACRO_FILE_OLD) + endif(_SOPRANO_MACRO_FILE) + endif(Soprano_FOUND) if(Soprano_FOUND) |