[Cmake] -I/usr/include needed before -I/usr/X11R6/include
Brad King
brad.king at kitware.com
Tue Jun 11 16:37:19 EDT 2002
> I need to have -I/usr/include before -I/usr/X11R6/include on the c++
> compile command so I get GL/*.h from /usr/include/GL, and not
> /usr/X11R6/include/GL. Is there a way to specify this in cmake? I
> tried the following
>
> INCLUDE_DIRECTORIES( /usr/include ) # ignored
Compiler writers tell us to NEVER use "-I /usr/include" because it screws
with the compiler's library header files. Some compilers replace system
headers by placing them in an internal include directory that comes before
/usr/include. If the user specified -I /usr/include, it breaks this
design. CMake always ignores /usr/include as an include directory
specifically for this reason.
-Brad
More information about the CMake
mailing list