File mingw32-vsgvr.spec of Package mingw32-vsgvr

%define soname  0
%define _name   vsgvr
Name:           mingw32-%{_name}
Version:        20230104+git.8a4f987
Release:        0
Summary:        VR viewer for VulkanSceneGraph
Group:          Productivity/Graphics/3D Editors
License:        BSD-3-Clause
URL:            https://github.com/geefr/vsgvr
Source0:        vsgvr-%{version}.tar.xz
Patch1:         0001-Reorder-vsg-include-header-alphabetical.patch
Patch2:         0002-Fixed-issue-that-the-declaration-for-vsg-createHeadL.patch
Patch3:         0003-Fix-api-change-of-vsg-FrameStamp-create.patch
Patch4:         0004-Adjust-to-use-vsg-version-1.1.3-api.patch
Patch5:         0005-Fix-warning-related-to-overwriting-local-member.patch
Patch6:         0006-Fix-building-with-vsg-1.1.10.patch
Patch7:         0007-cmake-add-feature-summary.patch
BuildRequires:  mingw32-cross-cmake
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32(cmake:vsg)
BuildRequires:  mingw32(cmake:OpenXR)
# dependency of libvsg ?
BuildRequires:  mingw32(pkg:vulkan)
%_mingw32_package_header_debug
BuildArch:      noarch

%description
An VulkanSceneGraph based viewer with support for viewing a scene graph on devices compatible with OpenXR

%package -n mingw32-lib%{_name}%{soname}
Summary:        Runtime compoment for vsg based virtual reality viewer
Group:          System/Libraries

%description -n mingw32-lib%{_name}%{soname}
This package provides the runtime component for the vsg based virtual reality viewer 

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       mingw32-lib%{_name}%{soname} = %{version}

%description devel
The %{name}-devel package contains libraries and header files for developing
applications that use %{name}.

%_mingw32_debug_package

%prep
%autosetup -p1 -n %{_name}-%{version}

%build
%_mingw32_cmake \
    -DBUILD_SHARED_LIBS=ON \
    -DCMAKE_RELWITHDEBINFO_POSTFIX='' \
    -DVSGVR_XR_PLATFORM="OPENXR_SYSTEM" \
    -DVulkan_LIBRARY=%_mingw32_prefix/bin/vulkan-1.dll

%_mingw32_cmake_build

%install
%_mingw32_cmake_install

%files
%defattr(-,root,root,-)
#%%doc license.txt README.md
%{_mingw32_bindir}/*.exe
#%%{_mingw32_datadir}/vsgvr

%files -n mingw32-lib%{_name}%{soname}
%defattr(-,root,root,-)
%{_mingw32_bindir}/libvsgvr*.dll

%files devel
%defattr(-,root,root,-)
%{_mingw32_libdir}/libvsgvr*.a
%{_mingw32_libdir}/cmake
%{_mingw32_includedir}/vsgvr

%changelog
openSUSE Build Service is sponsored by