Author: astitcher
Date: Tue Sep 4 21:39:56 2012
New Revision: 1380901
URL: http://svn.apache.org/viewvc?rev=1380901&view=rev
Log:
PROTON-7: libqpid-proton-posix seems like an unnecessary library
Fix the proton c build so that there is only one qpid-proton shared library and
make it directly depend on the uuid library so that its clients don't have
to know anything about libraries they themselves don't use.
Modified:
qpid/proton/trunk/proton-c/CMakeLists.txt
qpid/proton/trunk/proton-c/bindings/CMakeLists.txt
Modified: qpid/proton/trunk/proton-c/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/CMakeLists.txt?rev=1380901&r1=1380900&r2=1380901&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/CMakeLists.txt Tue Sep 4 21:39:56 2012
@@ -4,7 +4,6 @@ project (Proton C)
set (PN_VERSION_MAJOR 0)
set (PN_VERSION_MINOR 1)
-set (LINK_DEPS uuid)
configure_file (
"${PROJECT_SOURCE_DIR}/pn_config.h.in"
@@ -26,6 +25,21 @@ add_custom_command (
DEPENDS ${PROJECT_SOURCE_DIR}/src/protocol.h.py
)
+find_package(SWIG)
+if (SWIG_FOUND)
+ add_subdirectory(bindings)
+endif (SWIG_FOUND)
+
+add_subdirectory(docs/api)
+
+# Should really be finding the uuid library appropriate for the platform
+# in lieu of doing this set the library name directly.
+set (UUID_LIB uuid)
+
+set (qpid-proton-platform
+ src/driver.c
+)
+
add_library (
qpid-proton SHARED
@@ -45,36 +59,28 @@ add_library (
src/message/message.c
src/sasl/sasl.c
- ${PROJECT_BINARY_DIR}/encodings.h
- ${PROJECT_BINARY_DIR}/protocol.h
-)
+ src/messenger.c
-add_library (
- qpid-proton-posix SHARED
+ ${qpid-proton-platform}
- src/driver.c
- src/messenger.c
+ ${PROJECT_BINARY_DIR}/encodings.h
+ ${PROJECT_BINARY_DIR}/protocol.h
)
-
-find_package(SWIG)
-if (SWIG_FOUND)
- add_subdirectory(bindings)
-endif (SWIG_FOUND)
+target_link_libraries (qpid-proton ${UUID_LIB})
add_executable (proton src/proton.c)
-target_link_libraries (proton qpid-proton qpid-proton-posix ${LINK_DEPS})
+target_link_libraries (proton qpid-proton)
add_executable (proton-dump src/proton-dump.c)
target_link_libraries (proton-dump qpid-proton)
-add_subdirectory(docs/api)
-
set_target_properties (
- qpid-proton qpid-proton-posix proton proton-dump
+ qpid-proton proton proton-dump
PROPERTIES
COMPILE_FLAGS "-Wall -Werror -pedantic-errors -std=c99 -g -Iinclude -fPIC"
)
-install (TARGETS proton proton-dump qpid-proton qpid-proton-posix
+# Install executables and libraries
+install (TARGETS proton proton-dump qpid-proton
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
Modified: qpid/proton/trunk/proton-c/bindings/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/CMakeLists.txt?rev=1380901&r1=1380900&r2=1380901&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/CMakeLists.txt Tue Sep 4 21:39:56 2012
@@ -19,7 +19,7 @@
include(UseSWIG)
-set (BINDING_DEPS qpid-proton qpid-proton-posix ${LINK_DEPS})
+set (BINDING_DEPS qpid-proton)
# Build wrapper for Python:
find_package (PythonLibs)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]