You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2011/12/03 00:11:32 UTC

svn commit: r1209774 - in /qpid/trunk/qpid/cpp: bld-winsdk.ps1 examples/winsdk-cmake/CMakeLists.txt

Author: chug
Date: Fri Dec  2 23:11:32 2011
New Revision: 1209774

URL: http://svn.apache.org/viewvc?rev=1209774&view=rev
Log:
QPID-2643 Visual Studio 2010

In the SDK build script remove VS2008 projects and replace them
with a CMakeLists.txt that can generate example projects and solutions
on demand for any version of Visual Studio.

Tidy up the actual CMake script.

Modified:
    qpid/trunk/qpid/cpp/bld-winsdk.ps1
    qpid/trunk/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt

Modified: qpid/trunk/qpid/cpp/bld-winsdk.ps1
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bld-winsdk.ps1?rev=1209774&r1=1209773&r2=1209774&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bld-winsdk.ps1 (original)
+++ qpid/trunk/qpid/cpp/bld-winsdk.ps1 Fri Dec  2 23:11:32 2011
@@ -253,6 +253,7 @@ function BuildAPlatform
         'examples/tradedemo',
         'examples/*.sln',
         'examples/*.vcproj',
+        'examples/messaging/*.vcproj',
         'include',
         'plugins')
 
@@ -292,9 +293,10 @@ function BuildAPlatform
     # Set top level info files to DOS line endings
     Unix2Dos "$install_dir/README-winsdk.txt"
     Unix2Dos "$install_dir/LICENSE"
-    Unix2Dos "$install_dir/NOTICE"
+    Unix2Dos "$install_dir/NOTICE"
+    Unix2Dos "$install_dir/examples/README.txt"
 
-    # Install the .NET binding examples
+    # Install the .NET binding example source code
     New-Item -path $(Join-Path $(Get-Location) $install_dir)                 -name dotnet_examples -type directory
     New-Item -path $(Join-Path $(Get-Location) $install_dir/dotnet_examples) -name        examples -type directory
 
@@ -302,14 +304,19 @@ function BuildAPlatform
     $dst = Resolve-Path "$install_dir/dotnet_examples"
     Copy-Item "$src\" -destination "$dst\" -recurse -force
 
-    $src = Resolve-Path "$qpid_cpp_src/bindings/qpid/dotnet/winsdk_sources/$msvcVer"
-    $dst = Resolve-Path "$install_dir/dotnet_examples"
-    Copy-Item "$src\*" -destination "$dst\" -recurse -force
-
-    # Construct the examples' msvc-versioned solution/projects
-    New-Item $(Join-Path $install_dir "examples\msvc") -type Directory | Out-Null
+    Remove-Item -recurse "$install_dir/dotnet_examples/examples/msvc9"
+    Remove-Item -recurse "$install_dir/dotnet_examples/examples/msvc10"
+    
+    # TODO: Fix up the .NET binding example solution/projects before including them.
+    # $src = Resolve-Path "$qpid_cpp_src/bindings/qpid/dotnet/winsdk_sources/$msvcVer"
+    # $dst = Resolve-Path "$install_dir/dotnet_examples"
+    # Copy-Item "$src\*" -destination "$dst\" -recurse -force
+
+    # For the C++ examples: install a CMakeLists.txt file so customers can build
+    # their own Visual Studio solutions and projects.
+    New-Item $(Join-Path $install_dir "examples\examples-cmake") -type Directory | Out-Null
     $src = Resolve-Path "$global:sourceDirectory/cpp/examples/winsdk-cmake"
-    $dst = Join-Path $install_dir "examples\msvc"
+    $dst = Join-Path $install_dir "examples\examples-cmake"
     Copy-Item "$src\*" -destination "$dst\"
     
     # Zip the /bin PDB files
@@ -325,6 +332,8 @@ function BuildAPlatform
     Copy-Item -force -path "./src/RelWithDebInfo/org.apache.qpid.messaging*.dll" -destination "$install_dir/bin/Release/"
     Copy-Item -force -path "./src/RelWithDebInfo/org.apache.qpid.messaging*.pdb" -destination "$install_dir/bin/Release/"
 
+    # TODO: What happened to the .NET binding PDB files?
+    
     # Create a new zip for the whole kit.
     # Exclude *.pdb so as not include the debug symbols twice
     if (Test-Path $zipfile) {Remove-Item $zipfile}

Modified: qpid/trunk/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt?rev=1209774&r1=1209773&r2=1209774&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt Fri Dec  2 23:11:32 2011
@@ -17,31 +17,31 @@
 # under the License.
 #
 
+#
 # Description
 #   For WinSDK:
 #   Top-level CMake source to build version-independent C++ 
 #   example solution and project files for Visual Studio.
 #
 # Usage:
-#   mkdir msvc9-win32
-#   cd    msvc9-win32
-#   cmake -G "Visual Studio 9 2008" ..\winsdk-cmake
-#   cd ..
-#
-#   mkdir msvc9-x64
-#   cd    msvc9-x64
-#   cmake -G "Visual Studio 9 2008 Win64" ..\winsdk-cmake
-#   cd ..
-#
-#   mkdir msvc10-win32
-#   cd    msvc10-win32
-#   cmake -G "Visual Studio 10" ..\winsdk-cmake
-#   cd ..
-#
-#   mkdir msvc10-x64
-#   cd    msvc10-x64
-#   cmake -G "Visual Studio 10 Win64" ..\winsdk-cmake
-#   cd ..
+#   Target: Visual Studio 2008, 32-bit
+#     cd    <WinSDK>\examples\examples-cmake
+#     cmake -G "Visual Studio 9 2008" .
+#
+#   Target: Visual Studio 2008, 64-bit
+#     cd    <WinSDK>\examples\examples-cmake
+#     cmake -G "Visual Studio 9 2008 Win64" .
+#
+#   Target: Visual Studio 2010, 32-bit
+#     cd    <WinSDK>\examples\examples-cmake
+#     cmake -G "Visual Studio 10" .
+#
+#   Target: Visual Studio 2010, 64-bit
+#     cd    <WinSDK>\examples\examples-cmake
+#     cmake -G "Visual Studio 10 Win64" .
+#
+#   Then execute the examples.sln created by cmake to build
+#   the examples in Debug or Release configurations.
 #
 
 project(examples)
@@ -68,9 +68,9 @@ macro(add_example_properties example)
   set_target_properties(${example} PROPERTIES OUTPUT_NAME "${example}" )
   set_target_properties(${example} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../bin/${CMAKE_BUILD_TYPE})
   
-  target_link_libraries(${example} qpidmessaging)
-  target_link_libraries(${example} qpidcommon   )
-  target_link_libraries(${example} qpidtypes    )
+  target_link_libraries(${example} optimized qpidmessaging debug qpidmessagingd)
+  target_link_libraries(${example} optimized qpidcommon    debug qpidcommond   )
+  target_link_libraries(${example} optimized qpidtypes     debug qpidtypesd    )
 endmacro(add_example_properties)
 
 macro(add_example srcdirectory example)



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org