diff options
| author | Charles E. Rolke <chug@apache.org> | 2013-11-04 16:52:58 +0000 |
|---|---|---|
| committer | Charles E. Rolke <chug@apache.org> | 2013-11-04 16:52:58 +0000 |
| commit | d0dc0761c8e2fb1a44f1c6c149fa800b5a2fe2c6 (patch) | |
| tree | 4dbfc8dfe16318963d70dccf014686c9a5f6b291 | |
| parent | 2bcd7e8519c7b7e81017df68a0f54dd06ce72c8d (diff) | |
| download | qpid-python-d0dc0761c8e2fb1a44f1c6c149fa800b5a2fe2c6.tar.gz | |
QPID-5287: .NET binding does not set AssemblyVersion to build version.
The fix is
1. rename the AssemblyInfo.cpp to indicate that it is a template.
2. put replacement strings into the template (see sessionreceiver for correct pattern).
3. configure the template during cmake run.
4. Refer to generated file in projects that need it.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1538674 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo-template.cpp (renamed from qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo.cpp) | 5 | ||||
| -rw-r--r-- | qpid/cpp/bindings/qpid/dotnet/src/msvc10/org.apache.qpid.messaging.vcxproj | 2 | ||||
| -rw-r--r-- | qpid/cpp/bindings/qpid/dotnet/src/msvc9/org.apache.qpid.messaging.vcproj | 2 | ||||
| -rw-r--r-- | qpid/cpp/src/CMakeLists.txt | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo.cpp b/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo-template.cpp index 08d2d4b4f9..00d50900f6 100644 --- a/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo.cpp +++ b/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo-template.cpp @@ -47,8 +47,9 @@ using namespace System::Security::Permissions; //
// You can specify all the value or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-
-[assembly:AssemblyVersionAttribute("1.0.*")];
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("${winver_PRODUCT_VERSION_N1}.${winver_PRODUCT_VERSION_N2}.${winver_PRODUCT_VERSION_N3}.${winver_PRODUCT_VERSION_N4}")]
+[assembly: AssemblyFileVersion("${winver_FILE_VERSION_N1}.${winver_FILE_VERSION_N2}.${winver_FILE_VERSION_N3}.${winver_FILE_VERSION_N4}")]
[assembly:ComVisible(false)];
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/msvc10/org.apache.qpid.messaging.vcxproj b/qpid/cpp/bindings/qpid/dotnet/src/msvc10/org.apache.qpid.messaging.vcxproj index a027d77ae0..9b06cc86b8 100644 --- a/qpid/cpp/bindings/qpid/dotnet/src/msvc10/org.apache.qpid.messaging.vcxproj +++ b/qpid/cpp/bindings/qpid/dotnet/src/msvc10/org.apache.qpid.messaging.vcxproj @@ -279,7 +279,7 @@ </ItemGroup>
<ItemGroup>
<ClCompile Include="..\Address.cpp" />
- <ClCompile Include="..\AssemblyInfo.cpp" />
+ <ClCompile Include="$(QPID_BUILD_ROOT)\src\windows\generated_src\AssemblyInfo.cpp" />
<ClCompile Include="..\Connection.cpp" />
<ClCompile Include="..\FailoverUpdates.cpp" />
<ClCompile Include="..\Message.cpp" />
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/msvc9/org.apache.qpid.messaging.vcproj b/qpid/cpp/bindings/qpid/dotnet/src/msvc9/org.apache.qpid.messaging.vcproj index 36ab910e81..9a02d625f5 100644 --- a/qpid/cpp/bindings/qpid/dotnet/src/msvc9/org.apache.qpid.messaging.vcproj +++ b/qpid/cpp/bindings/qpid/dotnet/src/msvc9/org.apache.qpid.messaging.vcproj @@ -530,7 +530,7 @@ >
</File>
<File
- RelativePath="..\AssemblyInfo.cpp"
+ RelativePath="$(QPID_BUILD_ROOT)\src\windows\generated_src\AssemblyInfo.cpp"
>
</File>
<File
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt index 19e70eb549..1da108b727 100644 --- a/qpid/cpp/src/CMakeLists.txt +++ b/qpid/cpp/src/CMakeLists.txt @@ -230,6 +230,8 @@ if (MSVC) # Set the windows version for the .NET Binding cpp project configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/org.apache.qpid.messaging.rc) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src/AssemblyInfo-template.cpp + ${CMAKE_CURRENT_BINARY_DIR}/windows/generated_src/AssemblyInfo.cpp) # Set the windows version for the .NET Binding sessionreceiver project configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src/sessionreceiver/properties/sessionreceiver-AssemblyInfo-template.cs ${CMAKE_CURRENT_BINARY_DIR}/windows/generated_src/sessionreceiver-AssemblyInfo.cs) |
