3

I am trying to build PODOFO library with CMake using MinGW compiler. It requires some external libraries like zlib, jpeg, openssl and freetype. My cmake command is as follows:

cmake -G "MinGW Makefiles" -DCMAKE_INCLUDE_PATH=c:\Users\Abhishek\Downloads\freetype-2.3.5-1-bin\include -DCMAKE_LIBRARY_PATH=c:\Users\Abhishek\Downloads\freetype-2.3.5-1-bin\lib -DCMAKE_INCLUDE_PATH=c:\Users\Abhishek\Downloads\zlib\include -DCMAKE_LIBRARY_PATH=c:\Users\Abhishek\Downloads\zlib\lib -DCMAKE_INCLUDE_PATH=C:\Users\Abhishek\Downloads\openssl-0.9.8h-1-lib\include -DCMAKE_LIBRARY_PATH=c:\Users\Abhishek\Downloads\openssl-0.9.8h-1-lib\lib -DPODOFO_BUILD_SHARED:BOOL=FALSE ..

Somehow it is not able to find the freetype files. The error I get is as follows:

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (message):

Could NOT find FREETYPE (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR)

Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStan dardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindFREETYPE.cmake:75

(FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:372
(FIND_PACKAGE)
-- Configuring incomplete, errors occurred!

One additional point. If I delete the previous CMake build files (cache etc) then it doesn't even find zlib!

I can't understand why this erratic behaviour. Can anyone shed light on this?

1
  • I compiled podofo library previously(about 2 years ago or so). Just create .pro file from the source code. Commented Apr 16, 2015 at 23:53

1 Answer 1

1

When you're configuring, you need to define FREETYPE_INCLUDE_DIR and the other variables for where you keep the libraries it depends on - cmake can't guess these just from your include paths.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your response. Actually I'm not much familiar with CMake. How do you that?
Since you mention MinGW, I assume you're building under windows - the easiest way is to install CMake-GUI. Then once you hit the "configure" button, you can simply see which fields are in need of filling in, and enter their values by double-clicking on them.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.