[CMake] setting different include_directories, link_directories, etc for different targets

Kuba Bican kuba at smyslzivota.cz
Thu Mar 26 09:46:18 EDT 2009


Thanks for quick answers.

So one of the basic problems is that it is not possible to build the
same file several times in different targets? (Because the object
files would collide?) Then it makes me sense that the properties can
be set on directories and not on targets.

OK, I can configure a separate project for each platform. For that it
would be helpful to have:
 * multi-choice option in CMake to select from available platforms. Or
is there some good workaround if multi-choice options are not
available.
 * and finally, to somehow include all generated projects in single
solution. Or such thing has to be done manually?

Thanks again. Regards,

    Jakub



2009/3/26 Denis Scherbakov <denis_scherbakov at yahoo.com>:
>
> Jakub,
>
> I don't really understand, how it is possible, to share the same build directory with WIN32 object files and say Sparc-Solaris?
>
> Even, if you only talk about windows variations, how will you distinguish, file WindowUtilApp.obj was compiled for WinXP or WinCE?
>
> At build time - it is NOT possible to share build directories. At install time - you can specify common installation directory for all build trees, say C:\Project\BIN and perform installation of executables there, but you'll have to make sure that executable names still differ. Otherwise they will overwrite each other.
>
> Denis
>
>
>> Yes, this is one of the possibilities which does not solve
>> the problem
>> very nice ... or is it possible to have the final generated
>> projects
>> in one solution, with one "BUILD_ALL" and
>> "RUN_TESTS" and all the
>> things around?
>
>
>
>
>


More information about the CMake mailing list