[CMake] FIND_PATH / FIND_LIBRARY order
gga
ggarra at advancedsl.com.ar
Wed Jun 13 09:25:48 EDT 2007
gga wrote:
> Currently, using cmake2.5, I am finding the lookup order of FIND_PATH /
> FIND_LIBRARY to be counter productive, so I'm wondering if this is a bug
> or intended behavior. If intended behavior, I would also want to know
> what's the proper way around it.
>
Okay, no comments so far, so I logged it as a bug -- see bug #5156.
I've looked into it and it seems the order of the definitions in
Modules/Platform/UnixPaths.cmake are wrong.
This is a pretty serious bug that effects unix platforms, but luckily
also easy to fix.
Here's what I belive is a fixed UnixPaths.cmake file.
--
Gonzalo Garramuño
ggarra at advancedsl.com.ar
AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy
-------------- next part --------------
SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH}
# Locals first
/usr/local/include /opt/local/include
# Windows API on Cygwin
/usr/include/w32api
# X11
/usr/X11R6/include /usr/include/X11
# Other
/usr/pkg/include
/opt/csw/include /opt/include
# Standard
/usr/include /include
)
SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
# User environment first
$ENV{LD_LIBRARY_PATH}
# Locals first
/usr/local/lib /opt/local/lib
# Windows API on Cygwin
/usr/lib/w32api
# X11
/usr/X11R6/lib /usr/lib/X11
# Other
/usr/pkg/lib
/opt/csw/lib /opt/lib
# Standard
/usr/lib /lib
)
SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH}
/usr/local/bin /usr/pkg/bin /usr/bin /sbin /bin
)
SET(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}
/usr/lib64 /usr/lib32 /usr/lib /lib
)
More information about the CMake
mailing list