[CMake] Determining IntDir property for Visual Studio 10

David Cole david.cole at kitware.com
Mon Sep 19 10:36:11 EDT 2011


On Mon, Sep 19, 2011 at 5:25 AM, Perry Ismangil <perry at pjsip.org> wrote:
> Hi,
>
> I am trying to set the IntDir property in VS 10 project generation, I
> could not find the right variable/property to set.
>
> Inspecting the CMake generator code, it seems it is rather hardcoded,
> it doesn't get the value externally.
>
> Is this correct?
>
> Using CMake 2.8.5.
>
> --
> Perry Ismangil
> _______________________________________________
> 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
>

The code writes out reasonable per-target values for both "IntDir" and
"OutDir" -- you can change the output directory on a per-target basis
for various types of files with the following target properties:

  http://cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:ARCHIVE_OUTPUT_DIRECTORY
  http://cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:LIBRARY_OUTPUT_DIRECTORY
  http://cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:RUNTIME_OUTPUT_DIRECTORY

See also the "_CONFIG" variants to specify per-configuration output directories.

You cannot change IntDir, but you can use ${CMAKE_CFG_INTDIR} in
custom commands if necessary, to direct custom output to the same
location as build output.

  http://cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_CFG_INTDIR


HTH,
David


More information about the CMake mailing list