mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-01-17 14:28:24 +01:00
Find patched CLucene from Packman
This commit is contained in:
parent
be1827e554
commit
f1200ac74d
@ -12,7 +12,15 @@
|
||||
INCLUDE(CheckSymbolExists)
|
||||
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)
|
||||
SET(CLUCENE_MIN_VERSION ${CLucene_FIND_VERSION})
|
||||
ELSEIF()
|
||||
@ -99,6 +107,7 @@ ENDIF (CLUCENE_LIBRARY_DIR)
|
||||
IF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARIES AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
|
||||
SET(CLucene_FOUND TRUE)
|
||||
ENDIF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARIES AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
|
||||
ENDIF(CLUCENEUNSTABLE_FOUND)
|
||||
|
||||
IF(CLucene_FOUND)
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user