diff options
| author | Slávek Banko <slavek.banko@axis.cz> | 2025-10-27 14:41:30 +0100 |
|---|---|---|
| committer | Slávek Banko <slavek.banko@axis.cz> | 2025-10-27 15:23:14 +0100 |
| commit | df84fe45dda7f127a4cc09cd31e5c214f150049d (patch) | |
| tree | 930c2965b3f54b0779d6c2aa44e58c47c8580422 | |
| parent | a361f52b67e2f572b7ae6ba278cba8c42f90ab5b (diff) | |
| download | bibletime-df84fe45.tar.gz bibletime-df84fe45.zip | |
This resolve FTBFS when building with the upstream state of the clucene
library, which does not list clucene-shared in the linking libraries.
See Issue #31.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit e5b8adbd649f602bda9d568eb80856d809176c71)
| -rw-r--r-- | ConfigureChecks.cmake | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 84147b5..86d98b1 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -63,6 +63,42 @@ if( NOT CLUCENE_FOUND ) endif() if( NOT CLUCENE_VERSION VERSION_LESS "2.0" ) set( CLUCENE_V2 1 ) + tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${CLUCENE_INCLUDE_DIRS}" ) + tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "${CLUCENE_LIBRARIES}" ) + check_cxx_source_compiles(" + #include <CLucene.h> + + extern size_t lucene_wcstoutf8 (char *, const wchar_t *, size_t maxslen); + + int main() + { + lucene_wcstoutf8(NULL, NULL, 0); + } + " + BUILD_WITH_CLUCENE_CORE + ) + if( NOT BUILD_WITH_CLUCENE_CORE ) + set( CMAKE_REQUIRED_LIBRARIES "${CLUCENE_LIBRARIES};clucene-shared" ) + check_cxx_source_compiles(" + #include <CLucene.h> + + extern size_t lucene_wcstoutf8 (char *, const wchar_t *, size_t maxslen); + + int main() + { + lucene_wcstoutf8(NULL, NULL, 0); + } + " + BUILD_WITH_CLUCENE_SHARED + ) + if( NOT BUILD_WITH_CLUCENE_SHARED ) + tde_message_fatal( "clucene library was found, but building with clucene is not successful" ) + else() + set( CLUCENE_LIBRARIES "${CLUCENE_LIBRARIES};clucene-shared" CACHE INTERNAL "clucene libraries" FORCE ) + endif() + endif() + tde_restore( CMAKE_REQUIRED_INCLUDES ) + tde_restore( CMAKE_REQUIRED_LIBRARIES ) endif() |
