summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
-rw-r--r--packaging/spirv-cross.manifest5
-rw-r--r--packaging/spirv-cross.spec48
3 files changed, 57 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dbf85d5d..492fea17 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -468,16 +468,16 @@ if (SPIRV_CROSS_CLI)
find_package(PythonInterp)
find_program(spirv-cross-glslang NAMES glslangValidator
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/glslang-build/output/bin
- NO_DEFAULT_PATH)
+ /usr/bin)
find_program(spirv-cross-spirv-as NAMES spirv-as
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/spirv-tools-build/output/bin
- NO_DEFAULT_PATH)
+ /usr/bin)
find_program(spirv-cross-spirv-val NAMES spirv-val
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/spirv-tools-build/output/bin
- NO_DEFAULT_PATH)
+ /usr/bin)
find_program(spirv-cross-spirv-opt NAMES spirv-opt
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/spirv-tools-build/output/bin
- NO_DEFAULT_PATH)
+ /usr/bin)
if ((${spirv-cross-glslang} MATCHES "NOTFOUND") OR (${spirv-cross-spirv-as} MATCHES "NOTFOUND") OR (${spirv-cross-spirv-val} MATCHES "NOTFOUND") OR (${spirv-cross-spirv-opt} MATCHES "NOTFOUND"))
set(SPIRV_CROSS_ENABLE_TESTS OFF)
diff --git a/packaging/spirv-cross.manifest b/packaging/spirv-cross.manifest
new file mode 100644
index 00000000..75b0fa5e
--- /dev/null
+++ b/packaging/spirv-cross.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/spirv-cross.spec b/packaging/spirv-cross.spec
new file mode 100644
index 00000000..db42fdbb
--- /dev/null
+++ b/packaging/spirv-cross.spec
@@ -0,0 +1,48 @@
+Name: spirv-cross
+Version: 1.3.268
+Release: 0
+Summary: Khronos SPIRV-Cross
+Group: Graphics & UI Framework/GL
+License: MIT
+Source: %{name}-%{version}.tar.gz
+Source1001: %{name}.manifest
+
+BuildRequires: cmake
+BuildRequires: pkg-config
+BuildRequires: libtool
+BuildRequires: python3
+BuildRequires: glslang
+BuildRequires: spirv-tools
+
+%define BUILD_TYPE Debug
+
+%description
+SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader languages.
+
+%prep
+%setup -q
+
+%build
+cp %{SOURCE1001} .
+
+# build SPIRV headers
+mkdir build
+cd build
+cmake -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} -DCMAKE_INSTALL_DATADIR=%{_datadir} -DCMAKE_INSTALL_BINDIR=%{_bindir} ..
+make -j4
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_libdir} %{buildroot}%{_bindir} %{buildroot}%{_includedir}
+cp -ra ./build/*.a %{buildroot}%{_libdir}
+cp -ra ./build/spirv-cross %{buildroot}%{_bindir}
+cp -ra ./build/spirv-cross-* %{buildroot}%{_bindir}
+cp -ra ./include/* %{buildroot}%{_includedir}
+
+%files
+%manifest %{name}.manifest
+%license LICENSE
+%defattr(-,root,root,-)
+%{_bindir}/*
+%{_includedir}/*
+%{_libdir}/*.a