From d0dc0761c8e2fb1a44f1c6c149fa800b5a2fe2c6 Mon Sep 17 00:00:00 2001 From: "Charles E. Rolke" Date: Mon, 4 Nov 2013 16:52:58 +0000 Subject: 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 --- .../qpid/dotnet/src/AssemblyInfo-template.cpp | 58 ++++++++++++++++++++++ qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo.cpp | 57 --------------------- .../src/msvc10/org.apache.qpid.messaging.vcxproj | 2 +- .../src/msvc9/org.apache.qpid.messaging.vcproj | 2 +- qpid/cpp/src/CMakeLists.txt | 2 + 5 files changed, 62 insertions(+), 59 deletions(-) create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo-template.cpp delete mode 100644 qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo.cpp (limited to 'qpid/cpp') diff --git a/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo-template.cpp b/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo-template.cpp new file mode 100644 index 0000000000..00d50900f6 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo-template.cpp @@ -0,0 +1,58 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +using namespace System; +using namespace System::Reflection; +using namespace System::Runtime::CompilerServices; +using namespace System::Runtime::InteropServices; +using namespace System::Security::Permissions; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly:AssemblyTitleAttribute("org.apache.qpid.messaging")]; +[assembly:AssemblyDescriptionAttribute("")]; +[assembly:AssemblyConfigurationAttribute("")]; +[assembly:AssemblyCompanyAttribute("")]; +[assembly:AssemblyProductAttribute("org.apache.qpid.messaging")]; +[assembly:AssemblyCopyrightAttribute("Copyright (c) 2010")]; +[assembly:AssemblyTrademarkAttribute("")]; +[assembly:AssemblyCultureAttribute("")]; + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the value or you can default the Revision and Build Numbers +// by using the '*' as shown below: +// [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)]; + +[assembly:CLSCompliantAttribute(true)]; + +[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)]; diff --git a/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo.cpp b/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo.cpp deleted file mode 100644 index 08d2d4b4f9..0000000000 --- a/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -*/ - -using namespace System; -using namespace System::Reflection; -using namespace System::Runtime::CompilerServices; -using namespace System::Runtime::InteropServices; -using namespace System::Security::Permissions; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly:AssemblyTitleAttribute("org.apache.qpid.messaging")]; -[assembly:AssemblyDescriptionAttribute("")]; -[assembly:AssemblyConfigurationAttribute("")]; -[assembly:AssemblyCompanyAttribute("")]; -[assembly:AssemblyProductAttribute("org.apache.qpid.messaging")]; -[assembly:AssemblyCopyrightAttribute("Copyright (c) 2010")]; -[assembly:AssemblyTrademarkAttribute("")]; -[assembly:AssemblyCultureAttribute("")]; - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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:ComVisible(false)]; - -[assembly:CLSCompliantAttribute(true)]; - -[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)]; 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 @@ - + 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 @@ >