forked from mindspore-Ecosystem/mindspore
libevent build static library
Signed-off-by: zhoufeng <zhoufeng54@huawei.com>
This commit is contained in:
parent
f080d84646
commit
c297a89c58
|
@ -1,4 +1,5 @@
|
|||
set(libevent_CFLAGS "-fstack-protector-all -D_FORTIFY_SOURCE=2 -O2")
|
||||
set(openssl_USE_STATIC_LIBS ON)
|
||||
set(libevent_CFLAGS "-fPIC -fvisibility=hidden -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2")
|
||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
set(libevent_LDFLAGS "-Wl,-z,now")
|
||||
endif()
|
||||
|
@ -20,7 +21,8 @@ mindspore_add_pkg(libevent
|
|||
URL ${REQ_URL}
|
||||
MD5 ${MD5}
|
||||
PATCHES ${CMAKE_SOURCE_DIR}/third_party/patch/libevent/libevent.patch001
|
||||
CMAKE_OPTION -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING=OFF -DOPENSSL_ROOT_DIR:PATH=${openssl_ROOT})
|
||||
CMAKE_OPTION -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING=OFF -DOPENSSL_ROOT_DIR:PATH=${openssl_ROOT}
|
||||
-DEVENT__LIBRARY_TYPE:STRING=STATIC)
|
||||
|
||||
include_directories(${libevent_INC})
|
||||
|
||||
|
|
|
@ -100,17 +100,6 @@ if(USE_GLOG)
|
|||
DESTINATION ${INSTALL_LIB_DIR} RENAME libmindspore_glog.so.0 COMPONENT mindspore)
|
||||
endif()
|
||||
|
||||
install(FILES ${libevent_LIBPATH}/libevent-2.1.so.7.0.1
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libevent-2.1.so.7 COMPONENT mindspore)
|
||||
install(FILES ${libevent_LIBPATH}/libevent_core-2.1.so.7.0.1
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libevent_core-2.1.so.7 COMPONENT mindspore)
|
||||
install(FILES ${libevent_LIBPATH}/libevent_extra-2.1.so.7.0.1
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libevent_extra-2.1.so.7 COMPONENT mindspore)
|
||||
install(FILES ${libevent_LIBPATH}/libevent_openssl-2.1.so.7.0.1
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libevent_openssl-2.1.so.7 COMPONENT mindspore)
|
||||
install(FILES ${libevent_LIBPATH}/libevent_pthreads-2.1.so.7.0.1
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libevent_pthreads-2.1.so.7 COMPONENT mindspore)
|
||||
|
||||
if(ENABLE_MINDDATA)
|
||||
install(
|
||||
TARGETS _c_dataengine _c_mindrecord
|
||||
|
|
|
@ -77,17 +77,6 @@ if(USE_GLOG)
|
|||
DESTINATION ${INSTALL_LIB_DIR} RENAME libmindspore_glog.0.dylib COMPONENT mindspore)
|
||||
endif()
|
||||
|
||||
install(FILES ${libevent_LIBPATH}/libevent-2.1.7.dylib
|
||||
DESTINATION ${INSTALL_LIB_DIR} COMPONENT mindspore)
|
||||
install(FILES ${libevent_LIBPATH}/libevent_core-2.1.7.dylib
|
||||
DESTINATION ${INSTALL_LIB_DIR} COMPONENT mindspore)
|
||||
install(FILES ${libevent_LIBPATH}/libevent_extra-2.1.7.dylib
|
||||
DESTINATION ${INSTALL_LIB_DIR} COMPONENT mindspore)
|
||||
install(FILES ${libevent_LIBPATH}/libevent_openssl-2.1.7.dylib
|
||||
DESTINATION ${INSTALL_LIB_DIR} COMPONENT mindspore)
|
||||
install(FILES ${libevent_LIBPATH}/libevent_pthreads-2.1.7.dylib
|
||||
DESTINATION ${INSTALL_LIB_DIR} COMPONENT mindspore)
|
||||
|
||||
if(ENABLE_CPU AND NOT WIN32)
|
||||
install(
|
||||
TARGETS ps_cache
|
||||
|
|
|
@ -41,17 +41,6 @@ if(USE_GLOG)
|
|||
)
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE LIBEVENT_LIB_LIST
|
||||
${libevent_LIBPATH}/libevent*${CMAKE_SHARED_LIBRARY_SUFFIX}*
|
||||
${libevent_LIBPATH}/libevent_pthreads*${CMAKE_SHARED_LIBRARY_SUFFIX}*
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${LIBEVENT_LIB_LIST}
|
||||
DESTINATION ${INSTALL_LIB_DIR}
|
||||
COMPONENT mindspore
|
||||
)
|
||||
|
||||
if(ENABLE_MINDDATA)
|
||||
install(
|
||||
TARGETS _c_dataengine _c_mindrecord
|
||||
|
|
Loading…
Reference in New Issue