Hi All,

The question I have is about our old friend the static library and config files.

In my project I use two other libraries that I depend on (both built via CMake)
 1. OpenCASCADE
 2. wxWidgets

plus some others. So, when I build my project in its application form I locate the LIB-config.cmake files for the dependent libraries and then just insert the include dir and libraries in the appropriate place and all is well in my world. When I build my project as a static library I still depend on these two libraries and everything compiles fine. Now, when I try to build and link an application (like a test app) into my library the problem occurs. I was hoping that with the config files I would get the desired chaining effect for dependent static libraries. But I don't. What I get is a target name instead of the target location that the linker needs. Because I am no longer including files like OpenCASCADE-config.cmake I don't get the imported target information because they are another level down (on the include tree). This only happens with CMake targets, non-CMake targets get set in full and propagate well.

Has anyone else come across this, and is there a solution to my problem. I was hoping to have an easy solution where my library would drag in all required dependencies without the test application (in this case) needing to find them, hence the config files. Which by the way have worked very well for the single tiered situation.

Cheers,


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to