You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2017/04/27 19:42:20 UTC
qpid-dispatch git commit: DISPATCH-390 - Additional fix. Include
LIBWEBSOCKETS_LIBRARIES only if LIBWEBSOCKETS_FOUND
Repository: qpid-dispatch
Updated Branches:
refs/heads/master b974b884a -> 3b04b3932
DISPATCH-390 - Additional fix. Include LIBWEBSOCKETS_LIBRARIES only if LIBWEBSOCKETS_FOUND
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/3b04b393
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/3b04b393
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/3b04b393
Branch: refs/heads/master
Commit: 3b04b393298403ee90cdf28c7053da989496cd0d
Parents: b974b88
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Thu Apr 27 15:41:35 2017 -0400
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Thu Apr 27 15:41:35 2017 -0400
----------------------------------------------------------------------
src/CMakeLists.txt | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3b04b393/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 17674d4..2a570e6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -35,12 +35,19 @@ add_custom_command (
OUTPUT ${GENERATED_SOURCES}
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/tests/run.py -s ${CMAKE_CURRENT_SOURCE_DIR}/schema_c.py
DEPENDS ${GENERATOR_DEPENDS})
-
+
+if(NOT LIBWEBSOCKETS_FOUND)
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+else()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${LIBWEBSOCKETS_INCLUDE_DIRS}
)
+endif()
# Build the qpid-dispatch library.
set(qpid_dispatch_SOURCES
@@ -92,6 +99,7 @@ set(qpid_dispatch_SOURCES
trace_mask.c
)
+# USE_LIBWEBSOCKETS is true only if LIBWEBSOCKETS_FOUND
if(USE_LIBWEBSOCKETS)
set(qpid_dispatch_SOURCES ${qpid_dispatch_SOURCES} http-libwebsockets.c)
else(USE_LIBWEBSOCKETS)
@@ -111,7 +119,11 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
endif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
add_library(qpid-dispatch SHARED ${qpid_dispatch_SOURCES})
+if(NOT LIBWEBSOCKETS_FOUND)
+target_link_libraries(qpid-dispatch ${ProtonCore_LIBRARIES} ${ProtonProactor_LIBRARIES} ${pthread_lib} ${rt_lib} ${dl_lib} ${PYTHON_LIBRARIES})
+else()
target_link_libraries(qpid-dispatch ${ProtonCore_LIBRARIES} ${ProtonProactor_LIBRARIES} ${pthread_lib} ${rt_lib} ${dl_lib} ${PYTHON_LIBRARIES} ${LIBWEBSOCKETS_LIBRARIES})
+endif()
set_target_properties(qpid-dispatch PROPERTIES
LINK_FLAGS "${CATCH_UNDEFINED}"
)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org