0

Is it possible to get scons MSVSProject builder to take a list of additional include directories for the project file to be generated? I have a lot of 3rd party includes that need to be there. Also, how do I change the configuration Type from a makefile project to an exe using the builder?

drwbns
  • 89
  • 10

2 Answers2

0

I dont know that builder very well, but have you tried adding the include paths to the environment as follows?

env = Environment()
env.Append(CPPPATH= ['path1', 'path2'])

project = env.MSVSProject(...)

This should populate the MSVS project file correctly.

You can find this and other Construction Variables like the LIBPATH documented here.

Brady
  • 10,207
  • 2
  • 20
  • 59
  • I tried that and it didn't work. Interestingly enough, when I start the sln, the project is set to makefile instead of exe, which doesn't have the include directories field along with missing many other exe only options. So I wonder if I'm supposed to set it to an exe somewhere. – drwbns Mar 11 '13 at 19:46
0

For anyone searching this: The configuration is set to MakeFile because VS is not compiling things 'natively'. The project is setup to use a makefile to trigger SCons (so essentially you end up with VS as a gui, but under the hood its still just SCons).

If calling SCons builds an exe, then your VS project will build an exe etc.

If SCons is correctly setup with include paths, these will work also.

Note that the file file paths you pass to MSVSProject though need to b relative to the projects directory, otherwise when you double click a file in Solution Explorer it will complain it can't find the file (and the path searched will be bad)

bdbaddog
  • 3,357
  • 2
  • 22
  • 33
FrozenKiwi
  • 1,362
  • 13
  • 26