Hello, I'm experiencing an odd behaviour of the INCLUDE_DIRECTORY command. Here's the relevant code:
INCLUDE(UsePkgConfig)
FOREACH(library sdl libpng freetype2)
PKGCONFIG(${library} INC LIB LD C)
IF(C)
INCLUDE_DIRECTORIES(${C})
TARGET_LINK_LIBRARIES(wowtris ${LD})
ELSE(C)
MESSAGE(FATAL_ERROR "${library} is missing.")
ENDIF(C)
ENDFOREACH(library)
Here's what happens when I make:
/usr/bin/c++ -I/home/siovene/projects/wowtris
-I/home/siovene/projects/wowtris/-D_GNU_SOURCE=1\ -D_REENTRANT\
-I/usr/include/SDL
-I/home/siovene/projects/wowtris/
-I/home/siovene/projects/wowtris/-I/usr/include/freetype2
-I/usr/include/GL -o CMakeFiles/wowtris.dir/src/Application.o
-c /home/siovene/projects/wowtris/src/Application.cpp
Notice how things like -I/usr/include/libpng12 get _prefixed_ by
-I/home/siovene/projects/wowtris/, so that the final include path will
be wrong.
Am I doing something obviously wrong?
My cmake version is 2.4-patch 5.
Thank you.
--
Salvatore Iovene
http://www.iovene.com
signature.asc
Description: PGP signature
_______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
