diff --git a/cmake_modules/SwiftenConfig.cmake b/cmake_modules/SwiftenConfig.cmake new file mode 100644 index 0000000000000000000000000000000000000000..cf21298349143142cc52a89f6a9ee6b9919b80a7 --- /dev/null +++ b/cmake_modules/SwiftenConfig.cmake @@ -0,0 +1,11 @@ +FIND_LIBRARY(SWIFTEN_LIBRARY NAMES Swiften) +FIND_PATH(SWIFTEN_INCLUDE_DIR NAMES "Swiften.h" PATH_SUFFIXES libSwiften ) + + +if( SWIFTEN_LIBRARY AND SWIFTEN_INCLUDE_DIR ) + set( SWIFTEN_INCLUDE_DIR ${SWIFTEN_INCLUDE_DIR}/.. ) + message( STATUS "Found libSwiften: ${SWIFTEN_LIBRARY}, ${SWIFTEN_INCLUDE_DIR}") + set( SWIFTEN_FOUND 1 ) +else( SWIFTEN_LIBRARY AND SWIFTEN_INCLUDE_DIR ) + message( FATAL_ERROR "Could NOT find libSwiften" ) +endif( SWIFTEN_LIBRARY AND SWIFTEN_INCLUDE_DIR )