[CMake] Visual C++ 2005 Express - command line?

Brad King brad.king at kitware.com
Wed Aug 2 11:49:14 EDT 2006


Dean Inglis wrote:
> I ran the VS Express command prompt from the start
> menu folder and checked my env vars which
> appear to have been set by the bat script
> that runs, so all vcvars appear to be  correcly
> set.  Running cmake (2.4.2 windows exe install)
> from the command prompt still gives a fail
> due to the linker not finding user32.lib.

This is because you have to manually add the PSDK environment to your
command prompt.  It's just part of the VCExpress setup process and has
nothing to do with CMake.

I use a command prompt with this batch script:

@echo off
call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86
set INCLUDE=C:\Program Files\Microsoft Platform SDK\Include;%INCLUDE%
set LIB=C:\Program Files\Microsoft Platform SDK\Lib;%LIB%

> On another note, with cmake generated Visual Studio 8
> project files that can be compiled in the IDE,
> is there a way to force the output directory
> to be for example my_vtk_binary_output_path_root\bin
> instead of  my_vtk_binary_output_path_root\bin\release
> or my_vtk_binary_output_path_root\bin\minsizerel
> which appears to be what VS generates independent
> of cmake specified output paths??

No.  The VS8 generator is a multi-configuration generator.  The
configuration to build is selected at build time and not cmake time
(CMAKE_BUILD_TYPE is not used).  Therefore the output locations are
per-configuration.

-Brad


More information about the CMake mailing list