Skip to content

Commit

Permalink
Merge branch 'main-fixes' of github.com:rhabacker/vsgvr into cherry-p…
Browse files Browse the repository at this point in the history
…ick-fixes
  • Loading branch information
geefr committed Dec 18, 2022
2 parents b518a6b + df42a72 commit 4b7a68a
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 7 deletions.
29 changes: 28 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
cmake_minimum_required(VERSION 3.14)

project(VSGVR)
project(vsgvr
VERSION 0.4.0
DESCRIPTION "VulkanSceneGraph based virtual reality viewer"
LANGUAGES CXX
)

set(VSGVR_SOVERSION 0)

option( BUILD_SHARED_LIBS "Build shared libraries" OFF )
option( VSGVR_BUILD_EXAMPLES "Whether to build VSGVR examples" ON )
Expand Down Expand Up @@ -54,9 +60,30 @@ elseif( VSGVR_XR_PLATFORM STREQUAL "OPENXR_OCULUS_MOBILE" )
"${VSGVR_OCULUS_OPENXR_MOBILE_SDK}/3rdParty/khronos/openxr/OpenXR-SDK/include")
endif()

vsg_setup_dir_vars()
vsg_setup_build_vars()

vsg_add_target_clang_format(
FILES
${PROJECT_SOURCE_DIR}/vsgvr/include/vsgvr/*.h
${PROJECT_SOURCE_DIR}/vsgvr/srv/vsgvr/*.cpp
)
vsg_add_target_cppcheck(
FILES
${PROJECT_SOURCE_DIR}/vsgvr/include/vsgvr/*.h
${PROJECT_SOURCE_DIR}/vsgvr/srv/vsgvr/*.cpp
)
vsg_add_target_clobber()
vsg_add_target_docs(
FILES
${PROJECT_SOURCE_DIR}/vsgvr/include
)
vsg_add_target_uninstall()

add_subdirectory( vsgvr )

if( VSGVR_BUILD_EXAMPLES )
add_subdirectory( examples )
endif()

vsg_add_feature_summary()
1 change: 1 addition & 0 deletions examples/generic/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "../../models/controller/controller.cpp"
#include "../../models/controller/controller2.cpp"
#include "../../models/world/world.cpp"
#include <iostream>

int main(int argc, char **argv) {
try
Expand Down
14 changes: 8 additions & 6 deletions vsgvr/include/vsgvr/xr/OpenXRTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <string>
#include <vector>

namespace vsgvr {
class VSGVR_DECLSPEC OpenXRTraits : public vsg::Inherit<vsg::Object, OpenXRTraits> {
namespace vsgvr
{
class VSGVR_DECLSPEC OpenXRTraits : public vsg::Inherit<vsg::Object, OpenXRTraits>
{
public:
OpenXRTraits();
std::vector<std::string> xrExtensions = {
// "XR_EXT_debug_utils"
// "XR_EXT_debug_utils"
};
std::vector<std::string> xrLayers = {
// "XR_APILAYER_LUNARG_core_validation"
// "XR_APILAYER_LUNARG_core_validation"
};
XrVersion apiVersion = XR_MAKE_VERSION(1, 0, 0);
std::string applicationName = "VSGVR Application";
Expand All @@ -56,8 +58,8 @@ namespace vsgvr {
VkFormat swapchainFormat = VK_FORMAT_R8G8B8A8_SRGB; // Runtimes _should_ support this, as a preferred option
uint32_t swapchainSampleCount = 4;

protected:
virtual ~OpenXRTraits();
protected:
virtual ~OpenXRTraits();
};
}

Expand Down
5 changes: 5 additions & 0 deletions vsgvr/vsgvrConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include(CMakeFindDependencyMacro)

@FIND_DEPENDENCY_OUT@

include("${CMAKE_CURRENT_LIST_DIR}/vsgvrTargets.cmake")

0 comments on commit 4b7a68a

Please sign in to comment.