Project

General

Profile

Actions

Bug #3390

open

libharu not found (mingw, cmake)

Added by Michael Shestero almost 10 years ago. Updated almost 10 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
Start date:
06/27/2014
Due date:
% Done:

0%

Estimated time:

Description

I compiled and install libharu-libharu-ec89be4 into d:\libharu

When I cmake-gui to compilee Wt I see:

libharu libraries not found - set HARU_PREFIX
[...]
** Disabling PDF support (WPdfImage, WPdfRenderer): requires libharu.
   Indicate the location of your haru library using -DHARU_PREFIX=...

But I indeed set HARU_PREFIX to d:/libharu.

It even set HARU_LIB_RELEASE (libhpdfs.a) automatically.

Note: there are only libhpdfs.a and libhpdf.dll.a but no libhpdfsd.a file in d:\libharu\lib\. There are no other files(!) (such as libharu*) - is it normal?

I actually don't need debug. I tried to copy libhpdfs.a to libhpdfsd.a to fake it, but there was no effect.

Actions #1

Updated by Wim Dumon almost 10 years ago

  • Status changed from New to Feedback

The easiest work-around is probably to edit cmake/WtFindHaru.txt so that it only requires libhpdfs.a. With MSVS, it's important to link debug builds to debug builds of the library, that's why we require both release and debug builds of dependency libraries on Windows. I don't know if mingw has the same requirement.

BR,

Wim.

Actions #2

Updated by Michael Shestero almost 10 years ago

I removed in cmake/WtFindHaru.txt libharu and changed libhpdf to libhpdfs.

Yet my cmake continued report that libharu isn't found.

I discovered this caused by the HARU_SUPPORT_LIBS_FOUND variable, that seems to check m(?), PNG and ZLib libraries.

When I removed "AND HARU_SUPPORT_LIBS_FOUND" from cmake/WtFindHaru.txt, the libharu was "found" by cmake configuration process.

But I've got compilation error:

[  0%] Building CXX object src/CMakeFiles/wt.dir/Wt/WPdfImage.obj
In file included from D:\var\wt-3.3.3\src\Wt\WPdfImage.C:13:0:
D:/var/wt-3.3.3/src/Wt/WPdfImage:17:18: fatal error: hpdf.h: No such file or dir
ectory
compilation terminated.
src\CMakeFiles\wt.dir\build.make:7549: recipe for target 'src/CMakeFiles/wt.dir/
Wt/WPdfImage.obj' failed

What is my next steps?

The hpdf.h is in d:\libharu\include directory. How to specify this directory?

Note that HARU_PREFIX is set.

PS I expect next trouble with linker.

Actions #3

Updated by Wim Dumon almost 10 years ago

If you look in CMakeCache.txt in your build directory, does it contain HARU_INCLUDE_DIR? Is it set correctly?

BR,

Wim.

Actions #4

Updated by Michael Shestero almost 10 years ago

Upd: sorry, I just discovered my HARU_INCLUDE_DIR was set to lib mistakenly. Now I'm trying again...

Actions #5

Updated by Michael Shestero almost 10 years ago

Yes!

I built it.

Note that I had to edit cmake/WtFindHaru.txt to do it.

Actions

Also available in: Atom PDF