You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/01/04 12:35:40 UTC

[GitHub] ShannonDing closed pull request #51: Be able to build examples with static client

ShannonDing closed pull request #51: Be able to build examples with static client
URL: https://github.com/apache/rocketmq-client-cpp/pull/51
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt
index c4c24660..90c9442f 100755
--- a/example/CMakeLists.txt
+++ b/example/CMakeLists.txt
@@ -40,7 +40,7 @@ foreach(file ${files})
         endif()
     endif()
 
-    if (MSVC) 
+    if (MSVC)
     	if (BUILD_ROCKETMQ_SHARED)
         	target_link_libraries (${basename}  rocketmq_shared ${deplibs}
         	${Boost_LIBRARIES} ${LIBEVENT_LIBRARIES} ${JSONCPP_LIBRARIES})
@@ -49,11 +49,11 @@ foreach(file ${files})
         	${Boost_LIBRARIES} ${LIBEVENT_LIBRARIES} ${JSONCPP_LIBRARIES})
         endif()
     else()
-        #if (BUILD_ROCKETMQ_SHARED)
-    	    target_link_libraries (${basename} rocketmq_shared ${deplibs})
-        #else()
-    	#    target_link_libraries (${basename} rocketmq_static ${deplibs})
-        #endif()
+        if (BUILD_ROCKETMQ_SHARED)
+    	    target_link_libraries (${basename} rocketmq_shared)
+        else()
+    	    target_link_libraries (${basename} rocketmq_static)
+        endif()
     endif()
-    
+
 endforeach()
diff --git a/project/CMakeLists.txt b/project/CMakeLists.txt
index 83ec6cfd..a1cdc711 100755
--- a/project/CMakeLists.txt
+++ b/project/CMakeLists.txt
@@ -46,8 +46,11 @@ if(BUILD_ROCKETMQ_STATIC)
     add_library(rocketmq_static STATIC ${SRC_FILES})
     set_target_properties(rocketmq_static PROPERTIES OUTPUT_NAME "rocketmq")
     add_dependencies(rocketmq_static Signature)
-    target_link_libraries(rocketmq_static ${deplibs})
     target_link_libraries(rocketmq_static Signature)
+    target_link_libraries(rocketmq_static  ${JSONCPP_LIBRARIES})
+    target_link_libraries(rocketmq_static  ${LIBEVENT_LIBRARIES})
+    target_link_libraries(rocketmq_static  ${Boost_LIBRARIES})
+    target_link_libraries(rocketmq_static ${deplibs})
 endif()
 
 # shared
@@ -56,11 +59,11 @@ if(BUILD_ROCKETMQ_SHARED)
     add_library(rocketmq_shared SHARED ${SRC_FILES})
     set_target_properties(rocketmq_shared PROPERTIES OUTPUT_NAME "rocketmq")
     add_dependencies(rocketmq_shared Signature)
-    target_link_libraries(rocketmq_shared ${deplibs})
     target_link_libraries(rocketmq_shared  Signature)
     target_link_libraries(rocketmq_shared  ${JSONCPP_LIBRARIES})
     target_link_libraries(rocketmq_shared  ${LIBEVENT_LIBRARIES})
     target_link_libraries(rocketmq_shared  ${Boost_LIBRARIES})
+    target_link_libraries(rocketmq_shared ${deplibs})
 endif()
 
 # install


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services