You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2012/11/01 15:17:05 UTC
svn commit: r1404604 - in /qpid/proton/branches/kgiusti-msvc2010/proton-c:
CMakeLists.txt README src/codec/encodings.h.py src/protocol.h.py
Author: kgiusti
Date: Thu Nov 1 14:17:05 2012
New Revision: 1404604
URL: http://svn.apache.org/viewvc?rev=1404604&view=rev
Log:
NO-JIRA: cmake support for Microsoft Visual C++ Express 2010
Modified:
qpid/proton/branches/kgiusti-msvc2010/proton-c/CMakeLists.txt
qpid/proton/branches/kgiusti-msvc2010/proton-c/README
qpid/proton/branches/kgiusti-msvc2010/proton-c/src/codec/encodings.h.py
qpid/proton/branches/kgiusti-msvc2010/proton-c/src/protocol.h.py
Modified: qpid/proton/branches/kgiusti-msvc2010/proton-c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/branches/kgiusti-msvc2010/proton-c/CMakeLists.txt?rev=1404604&r1=1404603&r2=1404604&view=diff
==============================================================================
--- qpid/proton/branches/kgiusti-msvc2010/proton-c/CMakeLists.txt (original)
+++ qpid/proton/branches/kgiusti-msvc2010/proton-c/CMakeLists.txt Thu Nov 1 14:17:05 2012
@@ -42,7 +42,7 @@ endif()
if (NOT DEFINED LIB_SUFFIX)
get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
- if (${LIB64} STREQUAL "TRUE" AND ${CMAKE_SIZEOF_VOID_P} STREQUAL "8")
+ if ("${LIB64}" STREQUAL "TRUE" AND ${CMAKE_SIZEOF_VOID_P} STREQUAL "8")
set(LIB_SUFFIX 64)
else()
set(LIB_SUFFIX "")
@@ -83,13 +83,13 @@ include_directories ("${PROJECT_SOURCE_D
add_custom_command (
OUTPUT ${PROJECT_BINARY_DIR}/encodings.h
- COMMAND PYTHONPATH=${PROJECT_SOURCE_DIR} python ${PROJECT_SOURCE_DIR}/src/codec/encodings.h.py > ${PROJECT_BINARY_DIR}/encodings.h
+ COMMAND python ${PROJECT_SOURCE_DIR}/src/codec/encodings.h.py -s ${PROJECT_SOURCE_DIR} > ${PROJECT_BINARY_DIR}/encodings.h
DEPENDS ${PROJECT_SOURCE_DIR}/src/codec/encodings.h.py
)
add_custom_command (
OUTPUT ${PROJECT_BINARY_DIR}/protocol.h
- COMMAND PYTHONPATH=${PROJECT_SOURCE_DIR} python ${PROJECT_SOURCE_DIR}/src/protocol.h.py > ${PROJECT_BINARY_DIR}/protocol.h
+ COMMAND python ${PROJECT_SOURCE_DIR}/src/protocol.h.py -s ${PROJECT_SOURCE_DIR} > ${PROJECT_BINARY_DIR}/protocol.h
DEPENDS ${PROJECT_SOURCE_DIR}/src/protocol.h.py
)
@@ -151,19 +151,34 @@ target_link_libraries (proton qpid-proto
add_executable (proton-dump src/proton-dump.c)
target_link_libraries (proton-dump qpid-proton)
+if (CMAKE_COMPILER_IS_GNUCC)
+ set (WARNING_FLAGS "-Wall -Werror -pedantic-errors")
+ set (CMAKE_C_FLAGS "${WARNING_FLAGS} -std=c99 -Iinclude -fPIC")
+ set (CMAKE_C_FLAGS_DEBUG "-O -g")
+ set (CMAKE_C_FLAGS_RELEASE "-O2 -g -DNDEBUG")
+ set (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
+endif (CMAKE_COMPILER_IS_GNUCC)
+
+if (MSVC)
+ set (WARNING_FLAGS "/Wall")
+ set (CMAKE_C_FLAGS "${WARNING_FLAGS} /Iinclude")
+ set (CMAKE_C_FLAGS_DEBUG "/MDd /Od /Zi")
+ set (CMAKE_C_FLAGS_RELEASE "/MD /Ox /D NDEBUG")
+ set (CMAKE_C_FLAGS_RELWITHDEBINFO "/MD /Ox /Zi")
+endif (MSVC)
+
set_target_properties (
qpid-proton
PROPERTIES
- COMPILE_FLAGS "-Wall -Werror -pedantic-errors -std=c99 -g -Iinclude -fPIC"
VERSION ${PN_VERSION}
SOVERSION ${PN_SOVERSION}
)
-set_target_properties (
- proton proton-dump
- PROPERTIES
- COMPILE_FLAGS "-Wall -Werror -pedantic-errors -std=c99 -g -Iinclude -fPIC"
-)
+# set_target_properties (
+# proton proton-dump
+# PROPERTIES
+# COMPILE_FLAGS "-Wall -Werror -pedantic-errors -std=c99 -g -Iinclude -fPIC"
+# )
# Install executables and libraries
install (TARGETS proton proton-dump qpid-proton
Modified: qpid/proton/branches/kgiusti-msvc2010/proton-c/README
URL: http://svn.apache.org/viewvc/qpid/proton/branches/kgiusti-msvc2010/proton-c/README?rev=1404604&r1=1404603&r2=1404604&view=diff
==============================================================================
--- qpid/proton/branches/kgiusti-msvc2010/proton-c/README (original)
+++ qpid/proton/branches/kgiusti-msvc2010/proton-c/README Thu Nov 1 14:17:05 2012
@@ -25,7 +25,7 @@ Proton is multi-lingual:
Please see http://qpid.apache.org/proton for a more info.
-== Build Instructions ==
+== Build Instructions (Linux) ==
The following prerequesuites are required to do a full build. If you
do not wish to build a given language binding you can ommit the -devel
@@ -63,3 +63,59 @@ From the directory where you found this
Note that all installed files are stored in the install_manifest.txt
file.
+
+
+== Build Instructions (Windows) ==
+
+This describes how to build the Proton library on Windows using Microsoft Visual C++ 2010
+Express (VC10).
+
+The Proton build uses the cmake tool to generate the Visual Studio project files. These
+project files can then be loaded into Express and used to build the Proton library.
+
+Note that these instructions were created using a 32 bit version of Windows 7
+Professional. These instructions assume use of a command shell.
+
+The following packages must be installed:
+
+ Visual Studio 2010 Express (or equivalent)
+ Python (www.python.org)
+ Cmake (www.cmake.org)
+
+ Notes:
+ - Be sure to install MSVC Express 2010 Service Pack 1 also!
+ - python.exe _must_ be in your path
+ - cmake.exe _must_ be in your path
+
+
+Step 1: Create a 'build' directory - this must be at the same level as the 'src'
+ directory. Example:
+
+ $ cd proton-c
+ $ mkdir build
+
+Step 2: cd into the build directory
+
+ $ cd build
+
+Step 3: Generate the Visual Studio project files using cmake. You must provide:
+
+ 1) the name of the compiler you are using [see cmake documentation],
+ 2) the path to the _directory_ that contains the "CMakeLists.txt"
+ file (the parent directory, in this case).
+ Example:
+
+ $ cmake -G "Visual Studio 10" ..
+
+ Refer to the cmake documentation for more information.
+
+Step 4: Load the ALL_BUILD project into Visual C++ Express.
+
+ 4a: Run the Microsoft Visual C++ Express IDE
+ 4b: From within the IDE, open the ALL_BUILD project file - it should be in the
+ 'build' directory you created above.
+
+Step 5: Build the ALL_BUILD project.
+
+
+
Modified: qpid/proton/branches/kgiusti-msvc2010/proton-c/src/codec/encodings.h.py
URL: http://svn.apache.org/viewvc/qpid/proton/branches/kgiusti-msvc2010/proton-c/src/codec/encodings.h.py?rev=1404604&r1=1404603&r2=1404604&view=diff
==============================================================================
--- qpid/proton/branches/kgiusti-msvc2010/proton-c/src/codec/encodings.h.py (original)
+++ qpid/proton/branches/kgiusti-msvc2010/proton-c/src/codec/encodings.h.py Thu Nov 1 14:17:05 2012
@@ -18,7 +18,17 @@
# under the License.
#
-import mllib, optparse, os, sys
+import optparse, os, sys
+
+parser = optparse.OptionParser(usage="usage: %prog [options]")
+parser.add_option("-s", "--srcpath", action="store", type="string",
+ help="Path to the top of the source tree.")
+opts, outfile = parser.parse_args() # uses sys.argv[1:]
+
+if opts.srcpath:
+ sys.path.append( opts.srcpath )
+
+import mllib
xml = os.path.join(os.path.dirname(__file__), "types.xml")
doc = mllib.xml_parse(xml)
Modified: qpid/proton/branches/kgiusti-msvc2010/proton-c/src/protocol.h.py
URL: http://svn.apache.org/viewvc/qpid/proton/branches/kgiusti-msvc2010/proton-c/src/protocol.h.py?rev=1404604&r1=1404603&r2=1404604&view=diff
==============================================================================
--- qpid/proton/branches/kgiusti-msvc2010/proton-c/src/protocol.h.py (original)
+++ qpid/proton/branches/kgiusti-msvc2010/proton-c/src/protocol.h.py Thu Nov 1 14:17:05 2012
@@ -18,6 +18,16 @@
# under the License.
#
+import optparse, sys
+
+parser = optparse.OptionParser(usage="usage: %prog [options]")
+parser.add_option("-s", "--srcpath", action="store", type="string",
+ help="Path to the top of the source tree.")
+opts, outfile = parser.parse_args() # uses sys.argv[1:]
+
+if opts.srcpath:
+ sys.path.append( opts.srcpath )
+
from protocol import *
print "/* generated */"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org