[CMake] Visual Studio dependency/auto-install help
Sam Baker
sam.baker at bigfishgames.com
Fri Oct 31 16:04:10 EDT 2008
Thanks Eric - I'm so used to having the executable project be the default project for debugging, I didn't think of making the INSTALL project default. That does work and I can still debug as long as I tell it where the exe is.
That doesn't work so well for my more complex Tools project that has multiple executables in the solution since I then need to switch default projects to debug different apps but I can put up with that for now and look at the add_custom_command options later.
Is it possible to build the solution's INSTALL project as a post build step for a target? I realize that may not make much sense outside of visual studio projects. The install is specific to the game whereas the libraries shouldn't be building with knowledge of the game so the coupling isn't ideal.
Thanks again!
-----Original Message-----
From: Eric NOULARD [mailto:eric.noulard at gmail.com]
Sent: Friday, October 31, 2008 12:48 PM
To: Sam Baker
Cc: cmake at cmake.org
Subject: Re: [CMake] Visual Studio dependency/auto-install help
Le Fri, 31 Oct 2008 11:58:53 -0700,
"Sam Baker" <sam.baker at bigfishgames.com> a écrit :
> When generating MSVS solutions, is there a way to make all library
> projects automatically build the solution's INSTALL project when done?
Why don't you make the "INSTALL" project the default project
of your solution?
Normally INSTALL depends on other target (lib or exe) to be up to date?
So "building" would always fits your needs, or did I miss something?
> I have a game executable and a bunch of DLLs in my solution. When my
> game builds, I have a post-build step that copies the exe file and the
> library DLLs to the folder where I execute the game and where I have
> my art assets that the game loads.
[...]
> I hope that makes sense - I'm sure there's a simple way to solve this;
> help is appreciated.
Another solution would be to systematically add a
"add_custom_command" with the TARGET + POST_BUILD command.
look at the command doc:
add_custom_command(TARGET target
PRE_BUILD | PRE_LINK | POST_BUILD
COMMAND command1 [ARGS] [args1...]
[COMMAND command2 [ARGS] [args2...] ...]
[WORKING_DIRECTORY dir]
[COMMENT comment] [VERBATIM])
--
Erk
Big Fish Games, Inc. A New Game Every Day!
More information about the CMake
mailing list