[CMake] How to configure build output directory

2009-01-27 Thread Tron Thomas
I want to use CMake to configure a project that will build several 
applications.  I would like things such that each built program ends up 
in a directory path like:

.../BuildDirectory/Debug/ApplicationName/AppliationName(.exe)


What is needed to cause CMake to configure this kind of build output?


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to configure build output directory

2009-01-28 Thread Alexander Neundorf
On Wednesday 28 January 2009, Tron Thomas wrote:
> I want to use CMake to configure a project that will build several
> applications.  I would like things such that each built program ends up
> in a directory path like:
> .../BuildDirectory/Debug/ApplicationName/AppliationName(.exe)
>
>
> What is needed to cause CMake to configure this kind of build output?

You could set EXECUTABLE_OUTPUT_PATH. Is that good enough ?

Alex
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to configure build output directory

2009-01-28 Thread Philip Lowman
On Tue, Jan 27, 2009 at 10:34 PM, Tron Thomas wrote:

> I want to use CMake to configure a project that will build several
> applications.  I would like things such that each built program ends up in a
> directory path like:
> .../BuildDirectory/Debug/ApplicationName/AppliationName(.exe)
>
>
> What is needed to cause CMake to configure this kind of build output?


I'm not sure if you'll be able to easily get the "Debug" prior to the
"ApplicationName" because usually Visual Studio adds that.  If you can live
with "ApplicationName/Debug/ApplicationName.exe" the following might work
for you:

add_execuable(ApplicationName foo.cc)
set_target_properties(ApplicationName PROPERTIES RUNTIME_OUTPUT_DIRECTORY
ApplicationName)

I would only consider this if you are building all static executables or are
willing to live with using the PATH environment variable to keep DLLs in
your path.  Otherwise you're very quickly going to run into a problem
running one or more of your executables and you'll have to copy DLLs to
every folder.

-- 
Philip Lowman
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] How to configure build output directory

2009-01-29 Thread Tron Thomas
The point about the PATH needed for DLL's under this directory structure 
is something I forgot to take into account when I was contemplating how 
to organize things.  It would not work out well with what I had in 
mind.  Given that, I think I will have to consider a different strategy.


Philip Lowman wrote:
On Tue, Jan 27, 2009 at 10:34 PM, Tron Thomas > wrote:


I want to use CMake to configure a project that will build several
applications.  I would like things such that each built program
ends up in a directory path like:
.../BuildDirectory/Debug/ApplicationName/AppliationName(.exe)


What is needed to cause CMake to configure this kind of build output?


I'm not sure if you'll be able to easily get the "Debug" prior to the 
"ApplicationName" because usually Visual Studio adds that.  If you can 
live with "ApplicationName/Debug/ApplicationName.exe" the following 
might work for you:


add_execuable(ApplicationName foo.cc)
set_target_properties(ApplicationName PROPERTIES 
RUNTIME_OUTPUT_DIRECTORY ApplicationName)


I would only consider this if you are building all static executables 
or are willing to live with using the PATH environment variable to 
keep DLLs in your path.  Otherwise you're very quickly going to run 
into a problem running one or more of your executables and you'll have 
to copy DLLs to every folder.


--
Philip Lowman



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to configure build output directory

2009-01-29 Thread Philip Lowman
On Thu, Jan 29, 2009 at 9:47 PM, Tron Thomas wrote:

> The point about the PATH needed for DLL's under this directory structure is
> something I forgot to take into account when I was contemplating how to
> organize things.  It would not work out well with what I had in mind.  Given
> that, I think I will have to consider a different strategy.


Most people just set CMAKE_RUNTIME_OUTPUT_PATH once (usually to "bin") and
INSTALL() targets to a runtime output path (also usually "bin") and call it
a day.  Let us know what you come up with though. =)

-- 
Philip Lowman
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] How to configure build output directory

2009-01-30 Thread Tron Thomas




During development, I don't expect INSTALL targets will be used at
all.  The main reason I initially wanted this directory structure was
because I was planning to have a configuration file for each
application, and I thought I would name it "configuration".

However, if all the executables are in the same directory, they can't
all have configuration files with the same name.  When I thought of
this problem, it occurred to me this would not be a problem on the
Macintosh, as all the executables are placed in bundles, which are
really just directory structures disguised as a single application
file.  I knew the file could simple be embedded into the bundle, and I
thought perhaps I could apply a similar strategy to other platforms.

My solution now it to just use name of the application for the
configuration file.

Philip Lowman wrote:

  On Thu, Jan 29, 2009 at 9:47 PM, Tron Thomas
  
wrote:
  The
point about the PATH needed for DLL's under this directory structure is
something I forgot to take into account when I was contemplating how to
organize things.  It would not work out well with what I had in mind.
 Given that, I think I will have to consider a different strategy.
  
Most people just set CMAKE_RUNTIME_OUTPUT_PATH once (usually to "bin")
and INSTALL() targets to a runtime output path (also usually "bin") and
call it a day.  Let us know what you come up with though. =)
  
  
  
-- 
Philip Lowman





___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake