ryzom / ryzomcore

Ryzom Core is the open-source project related to the Ryzom game. This community repository is synchronized with the Ryzom Forge repository, based on the Core branch.
https://wiki.ryzom.dev
GNU Affero General Public License v3.0
331 stars 89 forks source link

cmake and freetype detection on Linux Debian SID #96

Closed ryzom-pipeline closed 10 years ago

ryzom-pipeline commented 10 years ago

Original report by liria (Bitbucket: liria, GitHub: liria).


With the latest ryzom source, I get a cmake error when trying to compile the client.

configuration

A Debian SID 64bits on intel architecture

cmake options

#!sh

cmake -DWITH_NEL_TESTS=OFF  \
  -DWITH_RYZOM_SERVER=OFF \
  -DWITH_RYZOM_CLIENT=ON \
  -DWITH_NEL_TOOLS=OFF \
  -DWITH_RYZOM_TOOLS=OFF \
  -DWITH_NEL=ON \
  -DWITH_DRIVER_OPENGL=ON \
  -DWITH_DRIVER_OPENAL=ON \
  -DWITH_SOUND=ON \
  ..

The cmake error

#!c++

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FREETYPE_INCLUDE_DIRS
   used as include directory in directory /home/liria/dev/ryzom/code/nel/src/3d
   used as include directory in directory /home/liria/dev/ryzom/code/nel/src/3d
   used as include directory in directory /home/liria/dev/ryzom/code/nel/src/3d/driver/opengl
   used as include directory in directory /home/liria/dev/ryzom/code/nel/src/3d/driver/opengl

Note : I have the libfreetype6 and libfreetype6-dev 2.5.2-1 and the includes are in : /usr/include/freetype2 and the libs in : /usr/lib/x86_64-linux-gnu

Workaround

I solved the issue by adding the freetype include path to the cmake command line : -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2/

Compilation issues with freetype

The compilation aborted due to error in the freetype.h include :

#!c++

/home/liria/dev/ryzom/code/nel/src/3d/font_generator.cpp:32:31: fatal error: freetype/freetype.h: Aucun fichier ou dossier de ce type
 #include <freetype/freetype.h>
                               ^

/home/liria/dev/ryzom/code/nel/src/3d/font_generator.cpp:54:31: fatal error: freetype/fterrors.h: Aucun fichier ou dossier de ce type
 #include <freetype/fterrors.h>
                               ^

changing the

include <freetype/freetype.h>

and

include <freetype/fterrors.h>

by

include <freetype2/freetype.h>

and

include <freetype2/fterrors.h>

solved the compilation issue.

ryzom-pipeline commented 10 years ago

Original comment by Cédric Ochs (Bitbucket: [Cédric OCHS](https://bitbucket.org/Cédric OCHS), ).


Thanks for the report, it's very strange they changed directories layout for freetype :( I'll fix that :)

ryzom-pipeline commented 10 years ago

Original comment by Cédric Ochs (Bitbucket: [Cédric OCHS](https://bitbucket.org/Cédric OCHS), ).


Fixed: #96 cmake and freetype detection on Linux Debian SID

ryzom-pipeline commented 10 years ago

Original comment by liria (Bitbucket: liria, GitHub: liria).


Thanks You Cédric