configure the csproj files to adapt to cmake build
diff --git a/shims/amqpnetlite/src/CMakeLists.txt b/shims/amqpnetlite/src/CMakeLists.txt
index dc3e2cb..ea8afc5 100644
--- a/shims/amqpnetlite/src/CMakeLists.txt
+++ b/shims/amqpnetlite/src/CMakeLists.txt
@@ -52,7 +52,7 @@
message(STATUS "AMQP.Net Lite library directory '${AMQPNETLITE_LIB_DIR}' does not exist.")
set(lite_default OFF)
else ()
- if (NOT EXISTS ${AMQPNTLITE_LIB_DIR}/Amqp.Net.dll)
+ if (NOT EXISTS ${AMQPNETLITE_LIB_DIR}/Amqp.Net.dll)
message(STATUS "AMQP.Net Lite shim requires Amqp.Net.dll to be in folder located with AMQPNETLITE_LIB_DIR environment variable")
message(STATUS "AMQP.Net Lite DLL does not exist in library directory '${AMQPNETLITE_LIB_DIR}'")
set(lite_default OFF)
@@ -65,3 +65,19 @@
option(BUILD_AMQPNETLITE "Build AMQP.Net Lite shim under mono" ${lite_default})
message(STATUS "BUILD_AMQPNETLITE = ${BUILD_AMQPNETLITE}")
+
+# Stage the build
+if (BUILD_AMQPNETLITE)
+ # Drop lite dll into build/packages
+ file(GLOB LITE_LIBS "${AMQPNETLITE_LIB_DIR}/Amqp.Net.*")
+ file(COPY ${LITE_LIBS} DESTINATION ${CMAKE_BINARY_DIR}/shims/amqpnetlite/packages/amqpnetlite/lib/net45/)
+
+ # Configure the csproj files
+ configure_file( amqp_types_test/Receiver/Receiver.csproj.in
+ ${CMAKE_BINARY_DIR}/shims/amqpnetlite/src/amqp_types_test/Receiver/Receiver.csproj
+ @ONLY)
+ configure_file( amqp_types_test/Sender/Sender.csproj.in
+ ${CMAKE_BINARY_DIR}/shims/amqpnetlite/src/amqp_types_test/Sender/Sender.csproj
+ @ONLY)
+
+endif ()
diff --git a/shims/amqpnetlite/src/amqp_types_test/Receiver/Receiver.csproj b/shims/amqpnetlite/src/amqp_types_test/Receiver/Receiver.csproj.in
similarity index 81%
rename from shims/amqpnetlite/src/amqp_types_test/Receiver/Receiver.csproj
rename to shims/amqpnetlite/src/amqp_types_test/Receiver/Receiver.csproj.in
index 360b89b..93fdab8 100644
--- a/shims/amqpnetlite/src/amqp_types_test/Receiver/Receiver.csproj
+++ b/shims/amqpnetlite/src/amqp_types_test/Receiver/Receiver.csproj.in
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -50,6 +50,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Amqp.Net, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\amqpnetlite\lib\net45\Amqp.Net.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
@@ -63,25 +66,12 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="Receiver.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="@CMAKE_CURRENT_SOURCE_DIR@/amqp_types_test/Receiver/Receiver.cs" />
+ <Compile Include="@CMAKE_CURRENT_SOURCE_DIR@/amqp_types_test/Receiver/Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
- <None Include="App.config" />
- <None Include="packages.config" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\..\src\Amqp.Net.csproj">
- <Project>{92153715-1d99-43b1-b291-470cf91a156d}</Project>
- <Name>Amqp.Net</Name>
- </ProjectReference>
+ <None Include="@CMAKE_CURRENT_SOURCE_DIR@/amqp_types_test/Receiver/App.config" />
+ <None Include="@CMAKE_CURRENT_SOURCE_DIR@/amqp_types_test/Receiver/packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
+</Project>
diff --git a/shims/amqpnetlite/src/amqp_types_test/Sender/Sender.csproj b/shims/amqpnetlite/src/amqp_types_test/Sender/Sender.csproj.in
similarity index 81%
rename from shims/amqpnetlite/src/amqp_types_test/Sender/Sender.csproj
rename to shims/amqpnetlite/src/amqp_types_test/Sender/Sender.csproj.in
index 3b70a36..38ac699 100644
--- a/shims/amqpnetlite/src/amqp_types_test/Sender/Sender.csproj
+++ b/shims/amqpnetlite/src/amqp_types_test/Sender/Sender.csproj.in
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -50,6 +50,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Amqp.Net, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\amqpnetlite\lib\net45\Amqp.Net.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
@@ -62,25 +65,12 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="Sender.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="@CMAKE_CURRENT_SOURCE_DIR@/amqp_types_test/Sender/Sender.cs" />
+ <Compile Include="@CMAKE_CURRENT_SOURCE_DIR@/amqp_types_test/Sender/Properties/AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
- <None Include="App.config" />
- <None Include="packages.config" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\..\src\Amqp.Net.csproj">
- <Project>{92153715-1d99-43b1-b291-470cf91a156d}</Project>
- <Name>Amqp.Net</Name>
- </ProjectReference>
+ <None Include="@CMAKE_CURRENT_SOURCE_DIR@/amqp_types_test/Sender/App.config" />
+ <None Include="@CMAKE_CURRENT_SOURCE_DIR@/amqp_types_test/Sender/packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
+</Project>