Skip to content

Commit

Permalink
Use dynamic libraries for android.
Browse files Browse the repository at this point in the history
  • Loading branch information
ASxa86 committed Aug 13, 2024
1 parent 81aa713 commit a1bb028
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"remoteEnv": {
"NUGET_NAME": "gitlab",
"NUGET_SOURCE": "https://gitlab.com/api/v4/projects/51467465/packages/nuget/index.json",
"VCPKG_VERSION": "2024.02.14",
"VCPKG_VERSION": "2024.07.12",
"VCPKG_ROOT": "${containerWorkspaceFolder}/vcpkg",
"VCPKG_BINARY_SOURCES": "clear;nuget,gitlab,readwrite",
"GITLAB_USER": "${localEnv:GITLAB_USER}",
"GITLAB_USER_TOKEN": "${localEnv:GITLAB_USER_TOKEN}",
"WORKSPACE_DIR": "${containerWorkspaceFolder}",
"PATH": "${containerEnv:PATH}:${containerWorkspaceFolder}/vcpkg:${containerWorkspaceFolder}/vcpkg/downloads/tools/cmake-3.27.1-linux/cmake-3.27.1-linux-x86_64/bin:${containerEnv:ANDROID_HOME}/cmdline-tools/latest/bin:${containerEnv:ANDROID_HOME}/platform-tools:${containerEnv:ANDROID_HOME}/emulator"
"PATH": "${containerEnv:PATH}:${containerWorkspaceFolder}/vcpkg:${containerWorkspaceFolder}/vcpkg/downloads/tools/cmake-3.29.2-linux/cmake-3.29.2-linux-x86_64/bin:${containerEnv:ANDROID_HOME}/cmdline-tools/latest/bin:${containerEnv:ANDROID_HOME}/platform-tools:${containerEnv:ANDROID_HOME}/emulator"
},
"runArgs": [
"--gpus",
Expand Down
9 changes: 3 additions & 6 deletions .devcontainer/postcreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ fi
./vcpkg/vcpkg fetch nuget
./vcpkg/vcpkg fetch cmake

echo "mono ./vcpkg/downloads/tools/nuget-6.2.1-linux/nuget.exe sources add -source $NUGET_SOURCE -name $NUGET_NAME -username $GITLAB_USER -password $GITLAB_USER_TOKEN"
mono ./vcpkg/downloads/tools/nuget-6.2.1-linux/nuget.exe sources add -source $NUGET_SOURCE -name $NUGET_NAME -username $GITLAB_USER -password $GITLAB_USER_TOKEN

echo "mono ./vcpkg/downloads/tools/nuget-6.2.1-linux/nuget.exe config -set maxHttpRequestsPerSource=64"
mono ./vcpkg/downloads/tools/nuget-6.2.1-linux/nuget.exe config -set maxHttpRequestsPerSource=64
echo "mono ./vcpkg/downloads/tools/nuget-6.10.0-linux/nuget.exe sources add -source $NUGET_SOURCE -name $NUGET_NAME -username $GITLAB_USER -password $GITLAB_USER_TOKEN"
mono ./vcpkg/downloads/tools/nuget-6.10.0-linux/nuget.exe sources add -source $NUGET_SOURCE -name $NUGET_NAME -username $GITLAB_USER -password $GITLAB_USER_TOKEN

sdkmanager "emulator"
sdkmanager "system-images;android-33;google_apis;x86_64"
sdkmanager "system-images;android-34;google_apis;x86_64"
apt install -y libpulse-dev

if [ ! -d "$WORKSPACE_DIR/avd" ]; then
Expand Down
5 changes: 5 additions & 0 deletions triplets/arm64-android-aspire.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
set(VCPKG_LIBRARY_LINKAGE static)

if(${PORT} MATCHES "qt")
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()

set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME Android)
Expand Down
5 changes: 5 additions & 0 deletions triplets/x64-android-aspire.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
set(VCPKG_LIBRARY_LINKAGE static)

if(${PORT} MATCHES "qt")
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME Android)
Expand Down

0 comments on commit a1bb028

Please sign in to comment.