[CMake] Question regarding source tree structure and how to find libraries easily within that structure

m.hergarden m.hergarden at euphoria-it.nl
Wed Feb 29 01:50:47 EST 2012


On 02/26/2012 09:18 AM, Andreas Guther wrote:
> Hello,
>
> I'm justing starting to learn/use CMake and I have a question regarding the usage of it in regards of source tree structure and library usage.
>
> I have the following folder structure:
>
> Root
> 	Bin
> 		Win32X86Debug
> 		Win32X86Release
> 		...
> 	Lib
> 		Win32X86Debug
> 		Win32X86Release
> 		...
> 	Source
> 		ace
> 		Application_1
> 		Application_2
> 		boost
> 		Library_1
> 		Library_2
> 		Library_3
> 		...
> 	Tools
>>
> I'd like to point out the structure within "Source". In the source directory there are libraries that may be used by one or more applications. That means for example that "Application_1" may use "Library_1" and "Library_3" and "Application_2" may use "Library_1" and "Library_2".
>
> I have currently no idea how I should solve this without creating a find module for every library in the tree. Is there any other solution than creating find modules I can use?
> If there is really no other (good) solution than creating find modules, is it possible to place the find modules (Library_n.cmake files, right?) within the library folders? I ask this, because I think it would make it much more easy to maintain them.
>
> Kind regards,
> Andreas
> --
>
> 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
Is there a reason you can't use the 'include_directories' and 
'link_directories' commands to add the correct linkpaths?

Micha

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120229/6dce887f/attachment.htm>


More information about the CMake mailing list