Skip to content

Commit

Permalink
Release 2407.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Release Pipeline committed Jul 2, 2024
1 parent 166ebff commit 24fd821
Show file tree
Hide file tree
Showing 173 changed files with 7,015 additions and 2,276 deletions.
8 changes: 4 additions & 4 deletions Build/PlayFab.C.paths.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<PlayFabPathsImported>true</PlayFabPathsImported>
</PropertyGroup>

<!-- Pull in PlayFab.C.external.props. It will define $(HCRoot) which defines the root directory of the LHC repo. -->
<!-- If the external props file can't be found, assume libHttpClient repo is cloned alongside PlayFab.C repo.-->
<!-- Pull in PlayFabSDKCommonProperties.props. It will define $(HCRoot) which defines the root directory of the LHC repo. -->
<!-- If this props file can't be found, assume libHttpClient repo is cloned alongside PlayFab.C repo.-->
<PropertyGroup>
<ExternalPropsFile>$([MSBuild]::GetPathOfFileAbove(PlayFab.C.external.props))</ExternalPropsFile>
<PlayFabSDKCommonPropertiesFile>$([MSBuild]::GetPathOfFileAbove(PlayFabSDKCommonProperties.props))</PlayFabSDKCommonPropertiesFile>
</PropertyGroup>
<Import Condition="Exists($(ExternalPropsFile))" Project="$(ExternalPropsFile)"/>
<Import Condition="Exists($(PlayFabSDKCommonPropertiesFile)) and '$(PlayFabSDKCommonPropertiesImported)'!='true'" Project="$(PlayFabSDKCommonPropertiesFile)"/>

<PropertyGroup>
<PlayFabRoot>$(MSBuildThisFileDirectory)..</PlayFabRoot>
Expand Down
35 changes: 30 additions & 5 deletions Build/PlayFabCore.Android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,31 @@ endif()

project("PlayFabCore.Android")

# For PlayFab, we need to compile with c++20 rather than c++17 because of an issue with std::optional discussed here:
# https://discourse.llvm.org/t/code-which-compiles-with-g-but-not-with-clang/56868/4
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-z,now")
set(CMAKE_CXX_FLAGS_RELEASE "-gdwarf-5")
set(CMAKE_C_FLAGS_RELEASE "-gdwarf-5")

##################################
### Set up binary output paths ###
##################################

# Set final shared libraries output folder
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${PATH_TO_ROOT}/Out/Android/${ANDROID_ABI}/Debug/${PROJECT_NAME})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${PATH_TO_ROOT}/Out/Android/${ANDROID_ABI}/Release/${PROJECT_NAME})

# Set final static libraries output folder
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${PATH_TO_ROOT}/Out/Android/${ANDROID_ABI}/Debug/${PROJECT_NAME})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PATH_TO_ROOT}/Out/Android/${ANDROID_ABI}/Release/${PROJECT_NAME})

# Set final runtime output folder
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PATH_TO_ROOT}/Out/Android/${ANDROID_ABI}/Debug/${PROJECT_NAME})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PATH_TO_ROOT}/Out/Android/${ANDROID_ABI}/Release/${PROJECT_NAME})

###########################################
### Set up paths for source and include ###
###########################################
Expand Down Expand Up @@ -48,10 +66,11 @@ set(COMMON_INCLUDE_DIRS
### Set up shared lib ###
#########################

add_subdirectory("../PlayFabSharedInternal.Android" ${PATH_TO_ROOT}/Out/Android/PlayFabCore.Android/PlayFabSharedInternal/${CMAKE_BUILD_TYPE}/${ANDROID_ABI})
set(PlayFabSharedInternal.Android ${PATH_TO_ROOT}/Out/Android/${ANDROID_ABI}/${CMAKE_BUILD_TYPE}/PlayFabSharedInternal.Android/PlayFabSharedInternal.Android.a)

string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
add_subdirectory("${PATH_TO_LHC}/Build/libHttpClient.Android" "${PATH_TO_LHC}/Binaries/Android/.cxx/libHttpClient.Android/cmake/${CMAKE_BUILD_TYPE_LOWER}/${ANDROID_ABI}")
# libHttpClient Shared Lib
string(TOLOWER "${CMAKE_BUILD_TYPE}" PATH_FLAVOR)
set(libHttpClient ${PATH_TO_LHC}/Binaries/Android/libHttpClient.Android/intermediates/cmake/${PATH_FLAVOR}/obj/${ANDROID_ABI}/libHttpClient.Android.so)

add_library(
"PlayFabCore.Android"
Expand All @@ -74,11 +93,17 @@ find_library( # Sets the name of the path variable.
log
)

find_library(
zlib
z
)

target_link_libraries(
PlayFabCore.Android
PlayFabSharedInternal.Android
libHttpClient.Android
${PlayFabSharedInternal.Android}
${libHttpClient}
${log-lib}
${zlib}
)

include("../PlayFabSharedInternal.CMake/GetLinuxFlags.cmake")
Expand Down
10 changes: 7 additions & 3 deletions Build/PlayFabCore.Android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ android {
cmake {
// externalNativeBuild normally skips static
// lib targets. This forces it to build.
cppFlags "-std=c++20"
targets "PlayFabCore.Android"
arguments "-DANDROID_TOOLCHAIN=clang++"
}
Expand All @@ -20,6 +21,8 @@ android {

externalNativeBuild {
cmake {
// CXX20 Standard is only available in CMake 3.18.1 and above.
// Navigate to SDK Manager > SDK Tools > CMake for the correct version.
version "3.18.1"
path "CMakeLists.txt"
buildStagingDirectory "${project.buildDir.getParentFile().getAbsolutePath()}/.cxx/${project.name}"
Expand Down Expand Up @@ -68,6 +71,7 @@ android {
}
}

// Put all the Gradle build files under the /Out directory
def binariesDir = project.file("../../Out/Android/${project.name}").getAbsolutePath()
project.buildDir(new File(binariesDir))
dependencies {
implementation project(":libHttpClient.Android")
implementation project(":PlayFabSharedInternal.Android")
}
Loading

0 comments on commit 24fd821

Please sign in to comment.