Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
zite committed Jan 25, 2022
2 parents 3aa1726 + acccb78 commit f0a402f
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 64 deletions.
14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,14 @@ set_target_properties(XRSDKOpenVR
message(STATUS "Importing OpenVR API...")

add_library(openvr_api SHARED IMPORTED)

if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set_target_properties(openvr_api PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/lib/${PLATFORMX}/${OPENVR_API_NAME}.${COMPILED_LIB_TYPE})
set_target_properties(openvr_api PROPERTIES IMPORTED_IMPLIB ${CMAKE_SOURCE_DIR}/lib/${PLATFORMX}/${OPENVR_API_NAME}.${IMPORT_LIB_TYPE})
else()
set_target_properties(openvr_api PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/${OPENVR_API_NAME}.${COMPILED_LIB_TYPE})
set_target_properties(openvr_api PROPERTIES IMPORTED_IMPLIB ${CMAKE_SOURCE_DIR}/${OPENVR_API_NAME}.${IMPORT_LIB_TYPE})
endif()
set_target_properties(openvr_api PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(XRSDKOpenVR PUBLIC openvr_api)

Expand All @@ -172,11 +178,11 @@ else()
# Post-Build - Copy OpenVR api
add_custom_command(TARGET XRSDKOpenVR POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/lib/${PLATFORMX}/${OPENVR_API_NAME}.${COMPILED_LIB_TYPE}
${BINARY_PATH}/lib/${PLATFORMX}/${OPENVR_API_NAME}.${COMPILED_LIB_TYPE}
${CMAKE_SOURCE_DIR}/${OPENVR_API_NAME}.${COMPILED_LIB_TYPE}
${BINARY_PATH}/${OPENVR_API_NAME}.${COMPILED_LIB_TYPE}

COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/lib/${PLATFORMX}/${OPENVR_API_NAME}.${IMPORT_LIB_TYPE}
${BINARY_PATH}/lib/${PLATFORMX}/${OPENVR_API_NAME}.${IMPORT_LIB_TYPE}
${CMAKE_SOURCE_DIR}/${OPENVR_API_NAME}.${IMPORT_LIB_TYPE}
${BINARY_PATH}/${OPENVR_API_NAME}.${IMPORT_LIB_TYPE}
)
endif()
5 changes: 3 additions & 2 deletions Providers/UserProjectSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,9 @@ std::string UserProjectSettings::GetProjectDirectoryPath( bool bAddDataDirectory
}
return projectDirectoryPath;
#else
projectDirectoryName = RemoveFileExtension( std::string( basename( fullExePath ) ) + "_Data/" );
return basePath + projectDirectoryName;
size_t lastindex = exePath.find_last_of(".");
string projectPath = exePath.substr(0, lastindex);
return projectPath + "_Data/";
#endif
}
}
Expand Down
2 changes: 1 addition & 1 deletion com.valve.openvr/Editor/OpenVRBuildProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ public void OnPreprocessBuild(BuildReport report)
}
}
}
#endif
#endif
2 changes: 2 additions & 0 deletions com.valve.openvr/Runtime/Unity.XR.OpenVR.asmdef
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "Unity.XR.OpenVR",
"rootNamespace": "",
"references": [
"Unity.XR.Management",
"Unity.InputSystem"
],
"includePlatforms": [
"Editor",
"LinuxStandalone64",
"WSA",
"WindowsStandalone32",
"WindowsStandalone64"
Expand Down
Binary file modified com.valve.openvr/Runtime/x64/XRSDKOpenVR.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion com.valve.openvr/Runtime/x64/XRSDKOpenVR.dll.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions com.valve.openvr/Runtime/x64/lib.meta

This file was deleted.

8 changes: 0 additions & 8 deletions com.valve.openvr/Runtime/x64/lib/x64.meta

This file was deleted.

This file was deleted.

27 changes: 0 additions & 27 deletions com.valve.openvr/Runtime/x64/lib/x64/libopenvr_api.so.meta

This file was deleted.

Binary file modified com.valve.openvr/Runtime/x64/libXRSDKOpenVR.so
Binary file not shown.
9 changes: 4 additions & 5 deletions com.valve.openvr/Runtime/x64/libXRSDKOpenVR.so.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion com.valve.openvr/Runtime/x64/openvr_api.dll.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified com.valve.openvr/Runtime/x64/vc142.pdb
Binary file not shown.
Binary file modified com.valve.openvr/Runtime/x86/XRSDKOpenVR.dll
Binary file not shown.
Binary file modified com.valve.openvr/Runtime/x86/vc142.pdb
Binary file not shown.
File renamed without changes.
File renamed without changes.

0 comments on commit f0a402f

Please sign in to comment.