[CMake] Hinting find_library using other libraries + VS path truncation issues

Lucas Thode ljthode at gmail.com
Tue Nov 17 08:13:44 EST 2009


1) Is there some sort of rather low upper limit on the length of the
per-project header search path, either in the CMake VS generator or in VS?

Test CMakeLists.txt:
====begin file====
PROJECT(test CXX)
INCLUDE_DIRECTORIES(C:\Windows\System32 C:\Windows\System32\Wbem
C:\Documents and Settings\All Users\Desktop C:\Documents and Settings\All
Users\Start Menu C:\Windows C:\ C:\Documents and Settings\All
Users\Application Data C:\Documents and Settings\All Users C:\Documents and
Settings . .. C:\Program Files C:\Program Files\Microsoft Visual Studio 2008
C:\Windows\System32\WinSxS C:\Windows\System C:\Documents and Settings\All
Users\Favorites ..\..)
ADD_EXECUTABLE(hello hello.cpp)
====end file====
and the hello.cpp is just a Hello World program:
====begin file====
#include <iostream>

int main()
{
  std::cout << "Hello, world!" << std::endl;
  return 0;
}
====end file====

2) I have the location of a library XXX in its XXX_LIBRARIES variable.  I
need to find a library YYY that is often found together with XXX (in the
same place, and they are closely related libraries).  What sort of CMake
code do I need to write to extract the path to XXX from the XXX_LIBRARIES
variable so I can pass it in the HINTS when I do a find_library for YYY, or
can I simply feed find_library XXX_LIBRARIES in its HINTS and have it work
out OK?

--Lucas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091117/4c6bc9fb/attachment.htm>


More information about the CMake mailing list