[CMake] how to build a target after installing dependencies?

hurcan solter hsolter at gmail.com
Sun May 1 09:06:14 EDT 2011


Hi all

  I have a project that depends on some contrib libraries (SDL png etc..).
If I can't find the dependencies through FindXXX macros
I build them myself (wrote CMakeLists for dependencies) and link to the
project, also setting the include directories(SDL_INCLUDE_DIR in spirit
of FindXXX macros again).

   The problem is, for example; SDL header files resides in the directory
SDL/include/filename.h but the project expects them to be in
  SDL/filename.h as if SDL is installed already.The original makefile deals
with this calling make install on the dependencies beforehand
  then includes them from installation directory. I am guessing this is not
possible with CMake during configuration phase because the makefiles are not
generated
  yet(There is also a MSVC dimension to consider ). I can place the
libraries the way I want via ARCHIVE_OUTPUT_DIRECTORY but have no idea
 how to do that with header files. This seems like a common problem but I am
stumped at the moment

 Any pointers would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110501/272a8d5f/attachment.htm>


More information about the CMake mailing list