Nicolas Schneider
b970ef692f
vs2010: add extra_files to project
9 years ago
Nicolas Schneider
33e842e50a
vs2010: fix transitive dependencies
9 years ago
Nicolas Schneider
a33d9d56cf
vs2010: support EXTRA_ARGS for generators
9 years ago
Nicolas Schneider
c2a9f81b68
vs2010: fix generated files' path
...
Generated files should always come with the correct relative path set,
so we don't have to modify it at all.
9 years ago
Nicolas Schneider
ba8b650cda
vs2010: fix relative path to target private dir for generators
...
backend.get_target_private_dir() includes the target directory in the path.
However, we want to treat all paths relative from the target directory,
because that's where our VS project file lives in.
9 years ago
Nicolas Schneider
330be891c1
vs2010: fix generator command
...
A shebang line on Windows will be resolved to [binary, script_path].
Thus, we need to use both instead of just taking the first element of the
command.
9 years ago
Nicolas Schneider
30e2a5feae
vs2010: fix include directories
...
Everything in the VS project file is relative to the project file itself.
The project file gets put in the target.subdir, so to include files from
there we just need to use '.'. To include from the private dir, we
need to use the relative path from the target dir to the target private
dir.
9 years ago
Nicolas Schneider
9c17f0cd93
vs2010: support private include dirs
9 years ago
Nicolas Schneider
fd8180ddcb
move source file conflict detection into Vs2010 backend
9 years ago
Nicolas Schneider
84804fc531
vs2010: use copy of buildtype_args to not change global state
...
We do not want the modifications of general_args to propagate to the
global buildtype_args.
9 years ago
Nicolas Schneider
8787ec3ea2
vs2010: fix object extraction with same source file name
...
This also refactors determine_ext_objs() to use inheritance instead of a
method flag for determining the object output name.
9 years ago
Nicolas Schneider
0c4aab6eed
vs2010: support same source file names in different subdirs
9 years ago
Nicolas Schneider
147b7aa356
vs2010: add explicit objects as 'Object' ItemGroup instead of link dependency
...
This has two effects:
1. It makes targets with only object files work (test case 88).
2. It adds the object files to the project in the VS IDE.
9 years ago
Nicolas Schneider
d72cc6e6f8
vs2010: fix object extraction
...
1. Dependencies must be set up with the target's id instead of its
basename.
2. Extracted object output file names must not include the directory
prefix, because MSBuild puts all object files into the same directory
and names them srcfilename.obj instead of dir/filename.obj or
dir_filename.obj.
9 years ago
Nicolas Schneider
4d9db21039
vs2010: fix dependencies of CustomTarget
9 years ago
Nicolas Schneider
3871f22cc3
remove unnecessary os.path.join() calls
...
ofilenames and srcs are already absolute paths.
9 years ago
Nicolas Schneider
2761f96fe9
vs2010: give each target an own temp dir
...
The 'Rebuild' target fails in mysterious ways if multiple targets use
the same directories because of output files being deleted between two
build steps (e.g. test case 78 fails on Rebuild, whereas Clean + Build
work just fine).
9 years ago
Nicolas Schneider
2511ff0970
check is_header() first, since it is a subset of is_source()
9 years ago
Nicolas Schneider
1f907e75da
add everything that is not an object or source file to headers list
9 years ago
Nicolas Schneider
c72cefaac4
only include known source file extensions into sources list
9 years ago
Nicolas Schneider
baa639031b
not all dependencies have a compile_args attribute
9 years ago
Nicolas Schneider
e366631e9e
don't fail if we don't compile anything (we might just bundle object files)
9 years ago
Nicolas Schneider
5503939866
only guess language for source files, not for header or object files
9 years ago
Nicolas Schneider
8eac78b861
vs2010: support language specific extra_args
9 years ago
Nicolas Schneider
17f1323aca
vs2010: fix linker args
9 years ago
Nicolas Schneider
49418cfe8a
vs2010: support multiple precompiled headers (one per language)
...
This creates the PrecompiledHeader properties for every source file in the
project if multiple languages are present. Otherwise, the global pch
settings are used.
The pch to use is determined by checking the suffix of the source file.
9 years ago
Nicolas Schneider
5ba7680a0d
vs2010: fail on multiple precompiled headers
9 years ago
Nicolas Schneider
18ae344be4
vs2010: support precompiled headers
9 years ago
Nicolas Schneider
40a7287a59
vs2010: properly check whether solution needs to be regenerated
9 years ago
Nicolas Schneider
bffc84e77e
vs2010: write regen.rule in gen_regenproj
9 years ago
Nicolas Schneider
4651ec8f77
vs2010: fix REGEN project input files
9 years ago
Nicolas Schneider
c5001a3a5a
call os.path.normpath before splitting a file path into its components
...
This makes sure that any '/' are converted to native directory separators
on Windows.
9 years ago
Nicolas Schneider
6de2fd6ab5
vs2010: fix target_to_build_root method
...
Python's os.path.split() does not split the path into its components.
Instead, split the path with str.split() using the OS's file system
separator.
9 years ago
Nicolas Schneider
78551ae242
vs2010: do not add generated object files to project
...
MSBuild automatically includes the output objects of the CustomBuildStep
in the link command. If the objects are additionally added to the project,
they will be put twice on the linker command, which leads to LNK4042
warning.
9 years ago
Nicolas Schneider
2dcac38624
vs2010: write CustomBuildStep only if there is at least 1 command to be run
9 years ago
Nicolas Schneider
ed6c0e1fa6
vs2010: merge all generators into single command invocation
...
MSBuild does not allow multiple CustomBuildStep elements. Therefore, all
input / output files and generator commands must be concatenated and put
into a single CustomBuildStep.
9 years ago
Nicolas Schneider
d79f402769
vs2010: fix including a precompiled / generated object file in compilation
...
MSBuild uses the <Object Include='FILE'/> syntax to add prebuilt object
files to the project.
9 years ago
Nicolas Schneider
c2e406295e
vs2010: fix wrong generator command concatenation
9 years ago
Jussi Pakkanen
7435df8399
Moved backends to their own module.
9 years ago
Jussi Pakkanen
58d7db4a6c
Some windows fixes.
9 years ago
Jussi Pakkanen
23b98cd6e6
Renamed meson package to mesonbuild so that we can have a script named meson in the same toplevel dir.
9 years ago
Jussi Pakkanen
d2a14075b3
Some fixes for other backends.
9 years ago
Jussi Pakkanen
8b1039fa30
Organise files into a module structure.
9 years ago
Jussi Pakkanen
c62b7e1a72
A few vs2010 fixes.
9 years ago
Jussi Pakkanen
3c3c977518
Fix incorrect private_dir_abs method.
9 years ago
Jussi Pakkanen
8e24e9e09a
Use all the extra flags in vs2010 projects.
9 years ago
Jussi Pakkanen
eceedc0d29
Declare buildtype and platform only once.
9 years ago
Jussi Pakkanen
53f0b3c0e7
Bring msvc2010 backend to form again.
9 years ago
Jussi Pakkanen
1b697f04cd
Fixed run targets on VS2010.
9 years ago
Jussi Pakkanen
86c401e7b0
Use absolute paths on msvc projecte because their cwd varies. The correct solution would be to build target relative paths but I do not have suffient interest to spend the time.
9 years ago