fix cast error, change cmake to c++ 20 for some uses, add headers to cmake for better vs project generation

This commit is contained in:
ykeara
2024-05-08 18:20:19 -05:00
parent 383f153c54
commit 44a05dfd57
2 changed files with 47 additions and 3 deletions
+46 -2
View File
@@ -3,7 +3,7 @@ project(AdvancedSettings VERSION 5.7.4 LANGUAGES CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
@@ -51,6 +51,50 @@ set(SRCS
src/utils/update_rate.cpp
)
set(HEADERS
src/alarm_clock/vr_alarm.h
src/keyboard_input/input_parser.h
src/keyboard_input/keyboard_input.h
#TODO, check if we need this
#src/keyboard_input/keyboard_sender.h
src/openvr/ivrinput.h
src/openvr/ivrinput_action.h
src/openvr/ivrinput_input_source.h
src/openvr/ivrinput_manifest.h
src/openvr/lh_console_util.h
src/openvr/openvr_init.h
src/openvr/ovr_application_wrapper.h
src/openvr/ovr_overlay_wrapper.h
src/openvr/ovr_settings_wrapper.h
src/openvr/ovr_system_wrapper.h
src/overlaycontroller.h
src/settings/settings.h
src/settings/settings_object.h
src/settings/internal/bool_setting_value.h
src/settings/internal/double_setting_value.h
src/settings/internal/setting_value.h
src/settings/internal/settings_controller.h
src/settings/internal/settings_object_data.h
src/settings/internal/specific_setting_value.h
src/tabcontrollers/AudioTabController.h
src/tabcontrollers/ChaperoneTabController.h
src/tabcontrollers/FixFloorTabController.h
src/tabcontrollers/MoveCenterTabController.h
src/tabcontrollers/RotationTabController.h
src/tabcontrollers/SettingsTabController.h
src/tabcontrollers/StatisticsTabController.h
src/tabcontrollers/SteamVRTabController.h
src/tabcontrollers/UtilitiesTabController.h
src/tabcontrollers/VideoTabController.h
src/utils/ChaperoneUtils.h
src/utils/FrameRateUtils.h
src/utils/paths.h
src/utils/setup.h
src/utils/update_rate.h
src/utils/Matrix.h
src/quaternion/quaternion.h
)
set(QML_FILES
src/res/qml/utilities_page/keyboard_utils/KeyboardGroupBox.qml
src/res/qml/utilities_page/media_keys/MediaControllerKeys.qml
@@ -137,7 +181,7 @@ endforeach()
set_source_files_properties(src/res/qml/common/MyResources.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
qt_add_executable(AdvancedSettings WIN32 MACOSX_BUNDLE ${SRCS} ${RESOURCES})
qt_add_executable(AdvancedSettings WIN32 MACOSX_BUNDLE ${SRCS} ${RESOURCES} ${HEADERS})
target_include_directories(AdvancedSettings PUBLIC
src
+1 -1
View File
@@ -548,7 +548,7 @@ void OverlayController::SetOverlayFromQRhiTexture( QRhiTexture& tex )
.m_nQueueFamilyIndex = vulkan_handles->gfxQueueIdx,
.m_nWidth = static_cast<uint32_t>( tex.pixelSize().width() ),
.m_nHeight = static_cast<uint32_t>( tex.pixelSize().height() ),
.m_nFormat = tex.format(),
.m_nFormat = static_cast<uint32_t>(tex.format()),
.m_nSampleCount = static_cast<uint32_t>( tex.sampleCount() ),
};
vrTex.handle = &vulkan;