diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2016-03-16 22:36:24 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2016-03-16 22:36:24 +0000 |
| commit | 9db3c30218c417dc5bfb3b7fbba85643969f3c90 (patch) | |
| tree | b7137019c83549f07e19887849aa483233267c19 /qpid/cpp/examples/winsdk-cmake | |
| parent | a13774c897218ba99d55a743ab77ba9179b93ff3 (diff) | |
| download | qpid-python-9db3c30218c417dc5bfb3b7fbba85643969f3c90.tar.gz | |
QPID-7148: Update CMake files to use better more modern style and features
- This is already the way we do this stuff in Qpid Proton
- Upgrade minimum version of CMake to 2.8.7
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1735324 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/examples/winsdk-cmake')
| -rw-r--r-- | qpid/cpp/examples/winsdk-cmake/CMakeLists.txt | 189 |
1 files changed, 94 insertions, 95 deletions
diff --git a/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt b/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt index 6f089625ca..a59bdca954 100644 --- a/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt +++ b/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt @@ -1,95 +1,94 @@ -#
-# 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.
-#
-
-#
-# Description
-# For WinSDK:
-# Top-level CMake source to build version-independent C++
-# example solution and project files for Visual Studio.
-#
-# Usage:
-# 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)
-
-set (CMAKE_VERBOSE_MAKEFILE ON)
-
-cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
-cmake_policy (SET CMP0015 NEW)
-
-set (CMAKE_SUPPRESS_REGENERATION TRUE)
-
-add_definitions(
- /D "_CRT_NONSTDC_NO_WARNINGS"
- /D "NOMINMAX"
- /D "WIN32_LEAN_AND_MEAN"
-)
-
-set (CMAKE_DEBUG_POSTFIX "d")
-
-include_directories ( "../../include" )
-link_directories ( "../../lib" )
-
-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} 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)
- add_executable(${example} ../${srcdirectory}/${example}.cpp)
- add_example_properties(${example})
-endmacro(add_example)
-
-macro(add_example_with_parser srcdirectory example)
- add_executable(${example} ../${srcdirectory}/${example}.cpp ../messaging/OptionParser.cpp)
- add_example_properties(${example})
-endmacro(add_example_with_parser)
-
-add_example_with_parser(messaging drain)
-add_example_with_parser(messaging spout)
-
-add_example(messaging map_receiver)
-add_example(messaging map_sender)
-add_example(messaging client)
-add_example(messaging server)
-add_example(messaging server_reconnect)
-add_example(messaging hello_world)
-add_example(messaging hello_xml)
+# +# 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. +# + +# +# Description +# For WinSDK: +# Top-level CMake source to build version-independent C++ +# example solution and project files for Visual Studio. +# +# Usage: +# 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) + +set (CMAKE_VERBOSE_MAKEFILE ON) + +cmake_minimum_required(VERSION 2.8.7 FATAL_ERROR) + +set (CMAKE_SUPPRESS_REGENERATION TRUE) + +add_definitions( + /D "_CRT_NONSTDC_NO_WARNINGS" + /D "NOMINMAX" + /D "WIN32_LEAN_AND_MEAN" +) + +set (CMAKE_DEBUG_POSTFIX "d") + +include_directories ( "../../include" ) +link_directories ( "../../lib" ) + +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} 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) + add_executable(${example} ../${srcdirectory}/${example}.cpp) + add_example_properties(${example}) +endmacro(add_example) + +macro(add_example_with_parser srcdirectory example) + add_executable(${example} ../${srcdirectory}/${example}.cpp ../messaging/OptionParser.cpp) + add_example_properties(${example}) +endmacro(add_example_with_parser) + +add_example_with_parser(messaging drain) +add_example_with_parser(messaging spout) + +add_example(messaging map_receiver) +add_example(messaging map_sender) +add_example(messaging client) +add_example(messaging server) +add_example(messaging server_reconnect) +add_example(messaging hello_world) +add_example(messaging hello_xml) |
