By the way, I had a quick look at the source code
in cmLocalVisualStudio7Generator.cxx  for case cmTarget::EXECUTABLE:

replacing
  temp = target.GetDirectory(configName);
by
   temp = target.GetDirectory("");

seems to do the job of removing additional 'Debug' or 'Release'
directories from the OutputFile executable name.

    temp += "/";
    temp += targetNameFull;
    fout << "\t\t\t\tOutputFile=\""
         << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n";

Is there a better way, or should I write an option/patch
to strip the configuration directory that can go in the cmake release?

Thanks,
Erwin



On 7 February 2010 18:57, Erwin Coumans <[email protected]> wrote:

>
> Hi,
>
> How can we specify the actual directory where the executable ends up in
> MSVC, without any messing around by adding 'Debug' or "Release'?
>
> I tried the following lines:
>
> SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BULLET_PHYSICS_SOURCE_DIR})
> SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${BULLET_PHYSICS_SOURCE_DIR})
> SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BULLET_PHYSICS_SOURCE_DIR})
>
> But the generated MSVC projectfiles still add 'Debug', 'Release' to the
> directory. How can this additional 'Debug' or 'Release' be removed?
>
> http://www.itk.org/Bug/view.php?id=8555 suggests using the following hack:
> if(MSVC)
>    set_target_properties(foo PROPERTIES PREFIX "../")
> endif()
>
> The issue was discussed a few times in the bug tracker, but I couldn't make
> it work with CMake 2.8.
>
> http://www.itk.org/Bug/view.php?id=8243
> http://www.itk.org/Bug/view.php?id=9163
> http://itk.org/Bug/view.php?id=9924
>
> The issue was also brought up without any solution here (I do not want to
> use install targets)
>
> http://stackoverflow.com/questions/543203/cmake-runtimeoutputdirectory-on-windows
>
> Can someone help get rid of this additional 'Debug' or 'Release' appended
> to the CMAKE_RUNTIME_OUTPUT_DIRECTORY in MSVC?
> Thanks,
> Erwin
>
>
>
_______________________________________________
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

Reply via email to