Initial commit 🎉
fbshipit-source-id: b6fc29740c6875d2e78953b8a7123890a67930f2 Co-authored-by: Sebastian McKenzie <sebmck@fb.com> Co-authored-by: John Knox <jknox@fb.com> Co-authored-by: Emil Sjölander <emilsj@fb.com> Co-authored-by: Pritesh Nandgaonkar <prit91@fb.com>
This commit is contained in:
4
android/third-party/Folly/ApplicationManifest.xml
vendored
Normal file
4
android/third-party/Folly/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.folly">
|
||||
</manifest>
|
||||
81
android/third-party/Folly/CMakeLists.txt
vendored
Normal file
81
android/third-party/Folly/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
cmake_minimum_required (VERSION 3.6.0)
|
||||
|
||||
PROJECT(folly CXX)
|
||||
enable_language(CXX)
|
||||
set(PACKAGE_NAME folly)
|
||||
|
||||
set(FOLLY_DIR ${PROJECT_SOURCE_DIR}/folly)
|
||||
|
||||
|
||||
list(APPEND dir_list ./)
|
||||
list(APPEND dir_list ${FOLLY_DIR}/lang)
|
||||
list(APPEND dir_list ${FOLLY_DIR}/hash/)
|
||||
list(APPEND dir_list ${FOLLY_DIR}/detail)
|
||||
list(APPEND dir_list ${FOLLY_DIR}/memory/detail)
|
||||
|
||||
set(BOOST_DIR ../boost/boost_1_63_0/)
|
||||
set(GLOG_DIR ../glog/)
|
||||
set(DOUBLECONVERSION_DIR ../double-conversion/double-conversion-3.0.0/)
|
||||
|
||||
list(APPEND dir_list ${BOOST_DIR})
|
||||
list(APPEND dir_list ${BOOST_DIR}/../)
|
||||
|
||||
include_directories(${dir_list})
|
||||
|
||||
add_compile_options(
|
||||
-DFOLLY_NO_CONFIG=1
|
||||
-DFOLLY_HAVE_MEMRCHR
|
||||
-DFOLLY_MOBILE=1
|
||||
-DFOLLY_USE_LIBCPP=1
|
||||
-DFOLLY_HAVE_LIBJEMALLOC=0
|
||||
-DFOLLY_HAVE_PREADV=0
|
||||
-frtti
|
||||
-fexceptions
|
||||
-std=c++14
|
||||
-Wno-error
|
||||
-Wno-unused-local-typedefs
|
||||
-Wno-unused-variable
|
||||
-Wno-sign-compare
|
||||
-Wno-comment
|
||||
-Wno-return-type
|
||||
-Wno-tautological-constant-compare
|
||||
)
|
||||
|
||||
list(APPEND SRC_FILES ${FOLLY_DIR}/Executor.cpp
|
||||
${FOLLY_DIR}/lang/ColdClass.cpp
|
||||
${FOLLY_DIR}/lang/Assume.cpp
|
||||
${FOLLY_DIR}/json.cpp
|
||||
${FOLLY_DIR}/Unicode.cpp
|
||||
${FOLLY_DIR}/Conv.cpp
|
||||
${FOLLY_DIR}/Demangle.cpp
|
||||
${FOLLY_DIR}/memory/detail/MallocImpl.cpp
|
||||
${FOLLY_DIR}/String.cpp
|
||||
${FOLLY_DIR}/dynamic.cpp
|
||||
${FOLLY_DIR}/ScopeGuard.cpp
|
||||
${FOLLY_DIR}/json_pointer.cpp
|
||||
${FOLLY_DIR}/FormatArg.cpp
|
||||
${FOLLY_DIR}/Format.cpp
|
||||
)
|
||||
|
||||
add_library(${PACKAGE_NAME} SHARED ${SRC_FILES})
|
||||
|
||||
set(build_DIR ${CMAKE_SOURCE_DIR}/build)
|
||||
|
||||
set(libglog_build_DIR ${build_DIR}/libglog/${ANDROID_ABI})
|
||||
set(doubleconversion_build_DIR ${build_DIR}/doubleconversion/${ANDROID_ABI})
|
||||
|
||||
file(MAKE_DIRECTORY ${build_DIR})
|
||||
|
||||
add_subdirectory(${GLOG_DIR} ${libglog_build_DIR})
|
||||
add_subdirectory(${DOUBLECONVERSION_DIR} ${doubleconversion_build_DIR})
|
||||
|
||||
target_include_directories(${PACKAGE_NAME} PRIVATE
|
||||
${BOOST_DIR}
|
||||
${BOOST_DIR}/../
|
||||
${GLOG_DIR}/../
|
||||
${GLOG_DIR}/glog-0.3.5/src/
|
||||
${DOUBLECONVERSION_DIR})
|
||||
|
||||
|
||||
install(TARGETS ${PACKAGE_NAME} DESTINATION ./build/)
|
||||
target_link_libraries(${PACKAGE_NAME} glog double-conversion)
|
||||
39
android/third-party/Folly/build.gradle
vendored
Normal file
39
android/third-party/Folly/build.gradle
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.compileSdkVersion
|
||||
buildToolsVersion rootProject.buildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.minSdkVersion
|
||||
targetSdkVersion rootProject.targetSdkVersion
|
||||
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
|
||||
ndk {
|
||||
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared'
|
||||
}
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile './ApplicationManifest.xml'
|
||||
}
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path './CMakeLists.txt'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':glog')
|
||||
implementation project(':doubleconversion')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user