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

Andreas Guther Andreas at guther.net
Sun Feb 26 03:18:36 EST 2012


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


More information about the CMake mailing list