Skip to content

Commit

Permalink
Do not unconditionally include search/xapian features
Browse files Browse the repository at this point in the history
On Windows, if we declare a exported class, the implementation of this
class is expected in the dll.

When compiling without xapian we must not include headers for which we
don't compile the implementation.
  • Loading branch information
mgautierfr committed May 29, 2024
1 parent c930ed6 commit 3dc8833
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/writer/defaultIndexData.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@

#include <zim/writer/item.h>
#include <zim/tools.h>

#if defined(ENABLE_XAPIAN)
#include "xapian/myhtmlparse.h"
#endif
#include "../tools.h"

#include <atomic>
Expand Down
2 changes: 2 additions & 0 deletions test/archive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
#include <zim/zim.h>
#include <zim/archive.h>
#include <zim/item.h>
#if defined(ENABLE_XAPIAN)
#include <zim/search.h>
#endif
#include <zim/suggestion.h>
#include <zim/error.h>

Expand Down
2 changes: 2 additions & 0 deletions test/indexing_criteria.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
#define ZIM_PRIVATE
#include <zim/archive.h>
#include <zim/item.h>
#if defined(ENABLE_XAPIAN)
#include <zim/search.h>
#endif
#include <zim/suggestion.h>
#include <zim/writer/item.h>

Expand Down
1 change: 0 additions & 1 deletion test/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ typedef SSIZE_T ssize_t;

#define ZIM_PRIVATE
#include <zim/archive.h>
#include <zim/search.h>
#include <zim/writer/creator.h>
#include <zim/writer/item.h>
#include <zim/writer/contentProvider.h>
Expand Down

0 comments on commit 3dc8833

Please sign in to comment.