Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port from main to RB-2.1 - Propagate Android CMake configuration to external projects (#1579) #1584

Merged
merged 1 commit into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions share/cmake/modules/FindHalf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,14 @@ if(NOT Half_FOUND)
${Half_CMAKE_ARGS} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()

if (ANDROID)
set(Half_CMAKE_ARGS
${Half_CMAKE_ARGS}
-DANDROID_PLATFORM=${ANDROID_PLATFORM}
-DANDROID_ABI=${ANDROID_ABI}
-DANDROID_STL=${ANDROID_STL})
endif()

# Hack to let imported target be built from ExternalProject_Add
file(MAKE_DIRECTORY ${Half_INCLUDE_DIR})

Expand Down
8 changes: 8 additions & 0 deletions share/cmake/modules/FindImath.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ if(NOT Imath_FOUND)
${Imath_CMAKE_ARGS} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()

if (ANDROID)
set(Imath_CMAKE_ARGS
${Imath_CMAKE_ARGS}
-DANDROID_PLATFORM=${ANDROID_PLATFORM}
-DANDROID_ABI=${ANDROID_ABI}
-DANDROID_STL=${ANDROID_STL})
endif()

# Hack to let imported target be built from ExternalProject_Add
file(MAKE_DIRECTORY ${Imath_INCLUDE_DIR})

Expand Down
8 changes: 8 additions & 0 deletions share/cmake/modules/Findexpat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ if(NOT expat_FOUND)
${EXPAT_CMAKE_ARGS} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()

if (ANDROID)
set(EXPAT_CMAKE_ARGS
${EXPAT_CMAKE_ARGS}
-DANDROID_PLATFORM=${ANDROID_PLATFORM}
-DANDROID_ABI=${ANDROID_ABI}
-DANDROID_STL=${ANDROID_STL})
endif()

# Hack to let imported target be built from ExternalProject_Add
file(MAKE_DIRECTORY ${expat_INCLUDE_DIR})

Expand Down
8 changes: 8 additions & 0 deletions share/cmake/modules/Findlcms2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ if(NOT lcms2_FOUND)
${lcms2_CMAKE_ARGS} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()

if (ANDROID)
set(lcms2_CMAKE_ARGS
${lcms2_CMAKE_ARGS}
-DANDROID_PLATFORM=${ANDROID_PLATFORM}
-DANDROID_ABI=${ANDROID_ABI}
-DANDROID_STL=${ANDROID_STL})
endif()

# Hack to let imported target be built from ExternalProject_Add
file(MAKE_DIRECTORY ${lcms2_INCLUDE_DIR})

Expand Down
8 changes: 8 additions & 0 deletions share/cmake/modules/Findpybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,14 @@ if(NOT pybind11_FOUND)
${pybind11_CMAKE_ARGS} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()

if (ANDROID)
set(pybind11_CMAKE_ARGS
${pybind11_CMAKE_ARGS}
-DANDROID_PLATFORM=${ANDROID_PLATFORM}
-DANDROID_ABI=${ANDROID_ABI}
-DANDROID_STL=${ANDROID_STL})
endif()

ExternalProject_Add(pybind11_install
GIT_REPOSITORY "https://github.com/pybind/pybind11.git"
GIT_TAG "v${pybind11_FIND_VERSION}"
Expand Down
9 changes: 9 additions & 0 deletions share/cmake/modules/Findpystring.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ if(NOT pystring_FOUND)
${pystring_CMAKE_ARGS} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()


if (ANDROID)
set(pystring_CMAKE_ARGS
${pystring_CMAKE_ARGS}
-DANDROID_PLATFORM=${ANDROID_PLATFORM}
-DANDROID_ABI=${ANDROID_ABI}
-DANDROID_STL=${ANDROID_STL})
endif()

if(NOT BUILD_SHARED_LIBS)
#TODO: Find a way to merge in the static libs when built with internal pystring
message(WARNING
Expand Down
9 changes: 9 additions & 0 deletions share/cmake/modules/Findyaml-cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,15 @@ if(NOT yaml-cpp_FOUND)
${yaml-cpp_CMAKE_ARGS} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()


if (ANDROID)
set(yaml-cpp_CMAKE_ARGS
${yaml-cpp_CMAKE_ARGS}
-DANDROID_PLATFORM=${ANDROID_PLATFORM}
-DANDROID_ABI=${ANDROID_ABI}
-DANDROID_STL=${ANDROID_STL})
endif()

if(NOT BUILD_SHARED_LIBS)
#TODO: Find a way to merge in the static libs when built with internal yamlcpp
message(WARNING
Expand Down