forked from NETMF/llilum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LlvmApplication.props
69 lines (62 loc) · 4.47 KB
/
LlvmApplication.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" InitialTargets="VerifyLLVMProperties" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
</ImportGroup>
<PropertyGroup>
<!--
NOTE: VS doesn't like it when conditions and other expressions appear in the UserMacros labeled PropertyGroup.
Therefore, these are all done in an unlabeled group that precedes the UserMacros group visible in the IDE
-->
<LLVM_VERSION Condition="'$(LLVM_VERSION)'==''">3.6.1</LLVM_VERSION>
<!-- Source ROOT Dir contains the full source of LLVM -->
<LLVM_SRCROOT_DIR Condition="'$(LLVM_SRCROOT_DIR)'==''">$([MSBuild]::GetRegistryValue(`HKEY_CURRENT_USER\Software\LLVM\$(LLVM_VERSION)\`, `SrcRoot`))</LLVM_SRCROOT_DIR>
<LLVM_SRCROOT_DIR Condition="'$(LLVM_SRCROOT_DIR)'!='' AND !HasTrailingSlash('$(LLVM_SRCROOT_DIR)')">$(LLVM_SRCROOT_DIR)\</LLVM_SRCROOT_DIR>
<!-- Build dir is assumed to be a sub dir of the source root if not already set -->
<LLVM_BUILD_DIR Condition="'$(LLVM_BUILD_DIR)'==''">$(LLVM_SRCROOT_DIR)Build\</LLVM_BUILD_DIR>
<LLVM_BUILD_DIR Condition="'$(LLVM_BUILD_DIR)'!='' AND !HasTrailingSlash('$(LLVM_BUILD_DIR)')">$(LLVM_BUILD_DIR)\</LLVM_BUILD_DIR>
</PropertyGroup>
<PropertyGroup Label="UserMacros" >
<!-- Standard LLVM common Include path-->
<LLVM_INCLUDE>$(LLVM_SRCROOT_DIR)Include</LLVM_INCLUDE>
<!-- Build is assumed to contain the following sub directories -->
<!-- CMake doesn't support generating unified solutions/projects for multiple platforms
Therefore, the Build folder should contain a sub folder for each targeted platform
where CMAKe has generated all the project and solution files for that platform.
-->
<LLVM_PLATFORM_DIR Condition="'$(LLVM_PLATFORM_DIR)'==''">$(LLVM_BUILD_DIR)$(Platform)\</LLVM_PLATFORM_DIR>
<!-- Config Directory contains the output of the build for a given configuration (e.g. Debug, Release, RelWithDebInfo) -->
<LLVM_CONFIG_DIR Condition="'$(LLVM_CONFIG_DIR)'==''">$(LLVM_PLATFORM_DIR)$(Configuration)\</LLVM_CONFIG_DIR>
<!-- CMAKE generated headers containing configuration settigns and defines for a given target platform -->
<LLVM_CONFIG_INCLUDE Condition="'$(LLVM_CONFIG_INCLUDE)'==''">$(LLVM_PLATFORM_DIR)Include\</LLVM_CONFIG_INCLUDE>
<!-- Location of binary Executables generated by building the LLVM source for a given Platform+Configuration -->
<LLVM_BIN Condition="'$(LLVM_BIN)'==''">$(LLVM_CONFIG_DIR)bin\</LLVM_BIN>
<!-- Location of LLVM libraries generated by building the LLVM source for a given Platform+Configuration -->
<LLVM_LIB_DIR Condition="'$(LLVM_LIB_DIR)'==''">$(LLVM_CONFIG_DIR)lib\</LLVM_LIB_DIR>
</PropertyGroup >
<ItemGroup>
<AllLlvmLibs Include="$(LLVM_LIB_DIR)LLVM*.lib" />
</ItemGroup>
<PropertyGroup>
<AllLlvmStaticLibs>@(AllLlvmLibs)</AllLlvmStaticLibs>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(LLVM_CONFIG_INCLUDE);$(LLVM_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4267;4244;4800;4291;4996</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>$(AllLlvmStaticLibs);$(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<Target Name="VerifyLLVMProperties">
<Message Importance="high" Text="LLVM_SRCROOT_DIR='$(LLVM_SRCROOT_DIR)'"/>
<Message Importance="high" Text="LLVM_BUILD_DIR='$(LLVM_BUILD_DIR)'"/>
<Error Condition="'$(LLVM_SRCROOT_DIR)'==''" Text="LLVM_SRCROOT_DIR not specified, either set it manually in your project file or set the registry value HKLM\Software\LLVM\SrcRoot" />
<Error Condition="!EXISTS('$(LLVM_SRCROOT_DIR)')" Text="Folder '$(LLVM_SRCROOT_DIR)' (LLVM_SRCROOT_DIR) does not exist" />
<Error Condition="!EXISTS('$(LLVM_BUILD_DIR)')" Text="Folder '$(LLVM_BUILD_DIR)' (LLVM_BUILD_DIR) does not exist" />
<Error Condition="!EXISTS('$(LLVM_PLATFORM_DIR)')" Text="Folder '$(LLVM_PLATFORM_DIR)' (LLVM_PLATFORM_DIR) does not exist" />
<Error Condition="!EXISTS('$(LLVM_BIN)')" Text="Folder '$(LLVM_BIN)' (LLVM_BIN) does not exist" />
<Error Condition="!EXISTS('$(LLVM_LIB_DIR)')" Text="Folder '$(LLVM_LIB_DIR)' (LLVM_LIB_DIR) does not exist" />
<Error Condition="!EXISTS('$(LLVM_CONFIG_INCLUDE)')" Text="Folder '$(LLVM_CONFIG_INCLUDE)' (LLVM_CONFIG_INCLUDE) does not exist" />
</Target>
</Project>