diff --git a/android/CMakeLists.txt b/android/CMakeLists.txt index 867c0c2d..b011d795 100644 --- a/android/CMakeLists.txt +++ b/android/CMakeLists.txt @@ -64,6 +64,7 @@ target_include_directories(android_platform PUBLIC # ) if(USE_XR) + include(${CMAKE_CURRENT_LIST_DIR}/xr.cmake) if(BUILD_XR_NATIVE) list(APPEND XR_EXTERNAL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/../../cocos/xr/Xr.h) list(APPEND XR_EXTERNAL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/../../cocos/platform/interfaces/modules/XRCommon.h) diff --git a/sources/xr/CMakeLists.txt b/android/xr.cmake similarity index 100% rename from sources/xr/CMakeLists.txt rename to android/xr.cmake diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index c9904181..7c1488d9 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -72,9 +72,6 @@ if(ANDROID OR OHOS OR NX) include(${CMAKE_CURRENT_LIST_DIR}/pvmp3dec/CMakeLists.txt) include(${CMAKE_CURRENT_LIST_DIR}/tremolo/CMakeLists.txt) - if(USE_XR) - include(${CMAKE_CURRENT_LIST_DIR}/xr/CMakeLists.txt) - endif() list(APPEND CC_EXTERNAL_LIBS pvmp3dec