update
This commit is contained in:
26
android/third-party/Folly/CMakeLists.txt
vendored
26
android/third-party/Folly/CMakeLists.txt
vendored
@@ -15,14 +15,17 @@ list(APPEND dir_list ${FOLLY_DIR}/memory/detail)
|
||||
|
||||
set(BOOST_DIR ../boost/boost_1_63_0/)
|
||||
set(GLOG_DIR ../glog/)
|
||||
set(LIBEVENT_DIR ../LibEvent/libevent-1.0.0/include)
|
||||
set(DOUBLECONVERSION_DIR ../double-conversion/double-conversion-3.0.0/)
|
||||
|
||||
list(APPEND dir_list ${BOOST_DIR})
|
||||
list(APPEND dir_list ${BOOST_DIR}/../)
|
||||
list(APPEND dir_list ${LIBEVENT_DIR}/)
|
||||
|
||||
include_directories(${dir_list})
|
||||
|
||||
add_compile_options(
|
||||
-DFOLLY_HAVE_PTHREAD=1
|
||||
-DFOLLY_NO_CONFIG=1
|
||||
-DFOLLY_HAVE_MEMRCHR
|
||||
-DFOLLY_MOBILE=1
|
||||
@@ -41,6 +44,25 @@ add_compile_options(
|
||||
-Wno-tautological-constant-compare
|
||||
)
|
||||
|
||||
file(GLOB SRC_FILES ${FOLLY_DIR}/*.cpp
|
||||
${FOLLY_DIR}/detail/*.cpp
|
||||
${FOLLY_DIR}/hash/*.cpp
|
||||
${FOLLY_DIR}/portability/*.cpp
|
||||
${FOLLY_DIR}/io/async/*.cpp
|
||||
${FOLLY_DIR}/io/async/ssl/*.cpp
|
||||
${FOLLY_DIR}/io/*.cpp
|
||||
${FOLLY_DIR}/synchronization/*.cpp
|
||||
${FOLLY_DIR}/lang/*.cpp
|
||||
${FOLLY_DIR}/memory/*.cpp
|
||||
${FOLLY_DIR}/futures/*.cpp
|
||||
${FOLLY_DIR}/futures/detail/*.cpp
|
||||
${FOLLY_DIR}/experimental/hazptr/*.cpp
|
||||
${FOLLY_DIR}/executors/*.cpp
|
||||
${FOLLY_DIR}/concurrency/*.cpp
|
||||
${FOLLY_DIR}/ssl/*.cpp
|
||||
${FOLLY_DIR}/ssl/detail/*.cpp
|
||||
${FOLLY_DIR}/system/*.cpp
|
||||
)
|
||||
list(APPEND SRC_FILES ${FOLLY_DIR}/Executor.cpp
|
||||
${FOLLY_DIR}/lang/ColdClass.cpp
|
||||
${FOLLY_DIR}/lang/Assume.cpp
|
||||
@@ -55,8 +77,10 @@ list(APPEND SRC_FILES ${FOLLY_DIR}/Executor.cpp
|
||||
${FOLLY_DIR}/json_pointer.cpp
|
||||
${FOLLY_DIR}/FormatArg.cpp
|
||||
${FOLLY_DIR}/Format.cpp
|
||||
${FOLLY_DIR}/memory/detail/MallocImpl.cpp
|
||||
)
|
||||
|
||||
message(STATUS "SRC FILES:- " ${SRC_FILES})
|
||||
add_library(${PACKAGE_NAME} SHARED ${SRC_FILES})
|
||||
|
||||
set(build_DIR ${CMAKE_SOURCE_DIR}/build)
|
||||
@@ -70,6 +94,8 @@ add_subdirectory(${GLOG_DIR} ${libglog_build_DIR})
|
||||
add_subdirectory(${DOUBLECONVERSION_DIR} ${doubleconversion_build_DIR})
|
||||
|
||||
target_include_directories(${PACKAGE_NAME} PRIVATE
|
||||
${LIBEVENT_DIR}
|
||||
${LIBEVENT_DIR}/../
|
||||
${BOOST_DIR}
|
||||
${BOOST_DIR}/../
|
||||
${GLOG_DIR}/../
|
||||
|
||||
4
android/third-party/LibEvent/ApplicationManifest.xml
vendored
Normal file
4
android/third-party/LibEvent/ApplicationManifest.xml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.libevent">
|
||||
</manifest>
|
||||
13
android/third-party/LibEvent/CMakeLists.txt
vendored
Normal file
13
android/third-party/LibEvent/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
cmake_minimum_required (VERSION 3.6.0)
|
||||
|
||||
PROJECT(libevent C)
|
||||
enable_language(C)
|
||||
set(PACKAGE_NAME libevent)
|
||||
set(LIBEVENT_DIR libevent-release-2.1.8-stable/)
|
||||
list(APPEND DIR_LIST ${LIBEVENT_DIR} ${LIBEVENT_DIR}/include)
|
||||
include_directories(${DIR_LIST})
|
||||
file(GLOB SRCFILES ${LIBEVENT_DIR}/*.c)
|
||||
message(STATUS "SRC FILES :- " ${SRCFILES})
|
||||
add_library(${PACKAGE_NAME} SHARED ${SRCFILES})
|
||||
install(TARGETS ${PACKAGE_NAME} DESTINATION ./build/)
|
||||
target_link_libraries(${PACKAGE_NAME})
|
||||
33
android/third-party/LibEvent/build.gradle
vendored
Normal file
33
android/third-party/LibEvent/build.gradle
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.compileSdkVersion
|
||||
buildToolsVersion rootProject.buildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.minSdkVersion
|
||||
targetSdkVersion rootProject.targetSdkVersion
|
||||
ndk {
|
||||
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments '-DANDROID_TOOLCHAIN=clang'
|
||||
}
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile './ApplicationManifest.xml'
|
||||
}
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path './CMakeLists.txt'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user