集成HTTP业务层插件,修正集成后rdkafka缺少第三方连接库导致的编译问题。

This commit is contained in:
Lu Qiuwen
2018-09-18 14:01:10 +08:00
parent 50d0d7ead1
commit 650623c562
3 changed files with 6 additions and 1 deletions

View File

@@ -17,6 +17,8 @@ target_link_libraries(tfe pthread dl
MESA_field_stat) MESA_field_stat)
target_link_libraries(tfe -Wl,--whole-archive http -Wl,--no-whole-archive) target_link_libraries(tfe -Wl,--whole-archive http -Wl,--no-whole-archive)
target_link_libraries(tfe -Wl,--whole-archive pangu-http -Wl,--no-whole-archive)
#target_link_libraries(tfe -Wl,--whole-archive decrypt-mirroring -Wl,--no-whole-archive) #target_link_libraries(tfe -Wl,--whole-archive decrypt-mirroring -Wl,--no-whole-archive)
install(TARGETS tfe RUNTIME DESTINATION ./) install(TARGETS tfe RUNTIME DESTINATION ./)

View File

@@ -1,3 +1,4 @@
add_library(pangu-http pangu_logger.cpp pangu_http.cpp) add_library(pangu-http pangu_logger.cpp pangu_http.cpp)
target_link_libraries(pangu-http common http) target_link_libraries(pangu-http common http)
target_link_libraries(pangu-http librdkafka-static ctemplate-static cjson) target_link_libraries(pangu-http librdkafka-static ctemplate-static cjson)
target_link_libraries(pangu-http maatframe)

View File

@@ -177,6 +177,7 @@ file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
add_library(librdkafka-static STATIC IMPORTED GLOBAL) add_library(librdkafka-static STATIC IMPORTED GLOBAL)
set_property(TARGET librdkafka-static PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/librdkafka.a) set_property(TARGET librdkafka-static PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/librdkafka.a)
set_property(TARGET librdkafka-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include) set_property(TARGET librdkafka-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
set_property(TARGET librdkafka-static PROPERTY INTERFACE_LINK_LIBRARIES ssl crypto sasl2 m z dl pthread rt)
### ctemplate ### ctemplate
ExternalProject_Add(ctemplate PREFIX ctemplate ExternalProject_Add(ctemplate PREFIX ctemplate
@@ -185,6 +186,7 @@ ExternalProject_Add(ctemplate PREFIX ctemplate
BUILD_COMMAND sh autogen.sh BUILD_COMMAND sh autogen.sh
CONFIGURE_COMMAND ./configure --prefix=<INSTALL_DIR> CONFIGURE_COMMAND ./configure --prefix=<INSTALL_DIR>
BUILD_IN_SOURCE 1) BUILD_IN_SOURCE 1)
ExternalProject_Get_Property(ctemplate INSTALL_DIR) ExternalProject_Get_Property(ctemplate INSTALL_DIR)
file(MAKE_DIRECTORY ${INSTALL_DIR}/include) file(MAKE_DIRECTORY ${INSTALL_DIR}/include)