KDE_EXPORT in kdelibs and winposix
William A. Hoffman
billlist at nycap.rr.com
Fri Feb 10 15:13:58 CET 2006
At 03:10 AM 2/10/2006, Ralf Habacker wrote:
>I think specific include directorys of a package should be setup in the
>related cmake find module as the unix part does. I suggest the following
>patch
>
>Index: FindLibXml2.cmake
>===================================================================
>--- FindLibXml2.cmake (revision 507814)
>+++ FindLibXml2.cmake (working copy)
>@@ -17,6 +17,7 @@
> SET(LIBXML2_DEFINITIONS ${_LibXml2Cflags})
>
> FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
>+ ${CMAKE_INCLUDE_PATH}/libxml2
> ${_LibXml2IncDir}/libxml2
> /usr/include/libxml2
> /usr/local/include/libxml2
The search path for FIND_LIBRARY and FIND_PATH calls are constrcted
in c++, like this:
//----------------------------------------------------------------------------
void
cmMakefile::GetIncludeSearchPath(const std::vector<std::string>& callerPaths,
std::vector<std::string>& path)
{
// Add paths configured into the cache for this project.
if(const char* cmakeIncludePath = this->GetDefinition("CMAKE_INCLUDE_PATH"))
{
cmSystemTools::ExpandListArgument(cmakeIncludePath, path);
}
// Add paths in the user's environment.
cmSystemTools::GetPath(path, "CMAKE_INCLUDE_PATH");
cmSystemTools::GetPath(path, "INCLUDE");
// Add paths given by the caller.
path.insert(path.end(), callerPaths.begin(), callerPaths.end());
// Add standard system paths.
cmSystemTools::GetPath(path);
}
//----------------------------------------------------------------------------
void
cmMakefile::GetLibrarySearchPath(const std::vector<std::string>& callerPaths,
std::vector<std::string>& path)
{
// Add paths configured into the cache for this project.
if(const char* cmakeLibPath = this->GetDefinition("CMAKE_LIBRARY_PATH"))
{
cmSystemTools::ExpandListArgument(cmakeLibPath, path);
}
// Add paths in the user's environment.
cmSystemTools::GetPath(path, "CMAKE_LIBRARY_PATH");
cmSystemTools::GetPath(path, "LIB");
// Add paths given by the caller.
path.insert(path.end(), callerPaths.begin(), callerPaths.end());
// Add standard system paths.
cmSystemTools::GetPath(path);
}
So, the search order is:
1. search the cmake variable CMAKE_*_PATH
2. search the env variable CMAKE_*_PATH
3. search the LIB or INCLUDE env variable.
4. search the paths specified in the call to FIND_*
5. search the system PATH
-Bill
More information about the Kde-buildsystem
mailing list