mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Find patched CLucene from Packman
This commit is contained in:
@@ -12,7 +12,15 @@
|
|||||||
INCLUDE(CheckSymbolExists)
|
INCLUDE(CheckSymbolExists)
|
||||||
INCLUDE(FindLibraryWithDebug)
|
INCLUDE(FindLibraryWithDebug)
|
||||||
|
|
||||||
|
# try to locate a patched unstable version (for comp's sake *sigh*) first
|
||||||
|
FIND_PACKAGE(CLuceneUnstable)
|
||||||
|
IF(CLUCENEUNSTABLE_FOUND)
|
||||||
|
SET(CLucene_FOUND TRUE)
|
||||||
|
SET(CLUCENE_INCLUDE_DIR ${CLUCENE_UNSTABLE_INCLUDE_DIRS})
|
||||||
|
SET(CLUCENE_LIBRARIES ${CLUCENE_UNSTABLE_LIBS})
|
||||||
|
|
||||||
|
#MESSAGE(FATAL_ERROR NARF)
|
||||||
|
ELSE(CLUCENEUNSTABLE_FOUND)
|
||||||
IF(CLucene_FIND_VERSION)
|
IF(CLucene_FIND_VERSION)
|
||||||
SET(CLUCENE_MIN_VERSION ${CLucene_FIND_VERSION})
|
SET(CLUCENE_MIN_VERSION ${CLucene_FIND_VERSION})
|
||||||
ELSEIF()
|
ELSEIF()
|
||||||
@@ -99,6 +107,7 @@ ENDIF (CLUCENE_LIBRARY_DIR)
|
|||||||
IF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARIES AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
|
IF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARIES AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
|
||||||
SET(CLucene_FOUND TRUE)
|
SET(CLucene_FOUND TRUE)
|
||||||
ENDIF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARIES AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
|
ENDIF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARIES AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
|
||||||
|
ENDIF(CLUCENEUNSTABLE_FOUND)
|
||||||
|
|
||||||
IF(CLucene_FOUND)
|
IF(CLucene_FOUND)
|
||||||
IF(NOT CLucene_FIND_QUIETLY)
|
IF(NOT CLucene_FIND_QUIETLY)
|
||||||
|
37
CMakeModules/FindCLuceneUnstable.cmake
Normal file
37
CMakeModules/FindCLuceneUnstable.cmake
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# - Try to find clucene-unstable
|
||||||
|
# This is a workaround for distros, that want to ship a recent enough clucene but don't want to replace the old version
|
||||||
|
#
|
||||||
|
# CLUCENEUNSTABLE_FOUND - system has clucene-unstable
|
||||||
|
# CLUCENE_UNSTABLE_INCLUDE_DIR - the clucene-unstable include directories
|
||||||
|
# CLUCENE_UNSTABLE_LIBS - link these to use clucene-unstable
|
||||||
|
#
|
||||||
|
# (c) Dominik Schmidt <dev@dominik-schmidt.de>
|
||||||
|
#
|
||||||
|
|
||||||
|
# Include dir
|
||||||
|
find_path(CLUCENE_UNSTABLE_INCLUDE_DIR
|
||||||
|
NAMES CLucene.h
|
||||||
|
PATH_SUFFIXES clucene-unstable
|
||||||
|
PATHS ${KDE4_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Finally the library itself
|
||||||
|
find_library(CLUCENE_UNSTABLE_SHARED_LIB
|
||||||
|
NAMES clucene-unstable-shared
|
||||||
|
PATHS ${KDE4_LIB_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(CLUCENE_UNSTABLE_CORE_LIB
|
||||||
|
NAMES clucene-unstable-core
|
||||||
|
PATHS ${KDE4_LIB_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
SET( CLUCENE_UNSTABLE_LIBS ${CLUCENE_UNSTABLE_SHARED_LIB} ${CLUCENE_UNSTABLE_CORE_LIB} )
|
||||||
|
SET( CLUCENE_UNSTABLE_INCLUDE_DIRS ${CLUCENE_UNSTABLE_INCLUDE_DIR})
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CLuceneUnstable DEFAULT_MSG CLUCENE_UNSTABLE_LIBS CLUCENE_UNSTABLE_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(CLUCENE_UNSTABLE_LIBS CLUCENE_UNSTABLE_INCLUDE_DIRS)
|
||||||
|
|
Reference in New Issue
Block a user