[CMake] FindX11.cmake - add paths?
Alexander Neundorf
a.neundorf-work at gmx.net
Tue Jan 18 15:12:46 EST 2011
On Sunday 19 December 2010, Clifford Yapp wrote:
> Looking at my local copy of FindX11.cmake, I note that the only change
> is to add a number of directories to the X11_INC_SEARCH_PATH and
> X11_LIB_SEARCH_PATH variables. Perhaps these could be added to the
> default FindX11.cmake?
>
> --- cmake-2.8.3/Modules/FindX11.cmake 2010-11-03 15:58:27.000000000 -0400
> +++ cadtoplevel/brlcad/cmake/misc/CMake/FindX11.cmake 2010-12-19
> 12:57:31.000000000 -0500
> @@ -60,12 +60,17 @@
> /usr/X11R6/include
> /usr/X11R7/include
> /usr/include/X11
> + /usr/local/include
> + /usr/local/include/X11
> /usr/openwin/include
> /usr/openwin/share/include
> /opt/graphics/OpenGL/include
> )
>
> SET(X11_LIB_SEARCH_PATH
> + /usr/lib64
> + /usr/lib32
> + /usr/lib
> /usr/pkg/xorg/lib
> /usr/X11R6/lib
> /usr/X11R7/lib
Are you sure these are actually necessary ?
/usr/local/include should be searched anyway, since the find_path() calls
don't have a keyword like "NO_DEFAULT_PATH" at the end, so the default paths
should be checked too automatically.
(the default paths are set in Platforms/UnixPaths.cmake)
Is /usr/local/include/X11/ necessary ?
This would mean the headers would be in /usr/local/include/X11/X11/X.h etc.
Is that the case for you ?
Same for the library directories.
/usr/lib should be searched anyway, and I think lib64 too
What breaks if you don't have these additional directories there ?
Alex
More information about the CMake
mailing list