summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXuelian <xuelian.bai@samsung.com>2018-04-18 19:17:39 +0800
committerXuelian <xuelian.bai@samsung.com>2018-04-18 19:37:01 +0800
commit19f5b71162f065b4a635bc31e96be0b08bea67ef (patch)
tree4540f82def8a4baab9fbfc463b9bd5e63bab7104
parent6dfa5fbdabc02e243445426d2e1749bbbfae90df (diff)
downloadSPIRV-Tools-master.tar.gz
SPIRV-Tools-master.tar.bz2
SPIRV-Tools-master.zip
Change-Id: Ib1859a58df7042e17c4fdc90791c0feda714a156
-rw-r--r--CMakeLists.txt2
-rw-r--r--packaging/spirv-tools.manifest5
-rw-r--r--packaging/spirv-tools.spec68
-rw-r--r--source/CMakeLists.txt1
4 files changed, 75 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 60c606db..b44290e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -192,7 +192,7 @@ if (${SPIRV_CHECK_CONTEXT})
add_definitions(-DSPIRV_CHECK_CONTEXT)
endif()
-add_subdirectory(external)
+#add_subdirectory(external)
if (TARGET effcee)
add_definitions(-DSPIRV_EFFCEE)
diff --git a/packaging/spirv-tools.manifest b/packaging/spirv-tools.manifest
new file mode 100644
index 00000000..75b0fa5e
--- /dev/null
+++ b/packaging/spirv-tools.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/spirv-tools.spec b/packaging/spirv-tools.spec
new file mode 100644
index 00000000..b7f1eee4
--- /dev/null
+++ b/packaging/spirv-tools.spec
@@ -0,0 +1,68 @@
+Name: spirv-tools
+Version: 0.1
+Release: 0
+Summary: Khronos SPIRV Tools
+Group: Graphics & UI Framework/GL
+License: Apache2.0
+Source: %{name}-%{version}.tar.gz
+Source1001: %{name}.manifest
+
+BuildRequires: cmake
+BuildRequires: pkg-config
+BuildRequires: libtool
+BuildRequires: python
+BuildRequires: python-xml
+BuildRequires: spirv-headers
+
+%define BUILD_TYPE Debug
+
+%description
+Khronos SPIRV Tools
+
+%package devel
+Summary: Khronos SPIRV Tools
+Group: System/Libraries
+
+%description devel
+Khronos SPIRV Tools
+
+%prep
+%setup -q
+
+%build
+cp %{SOURCE1001} .
+
+# build SPIRV tools
+mkdir build
+cd build
+cmake ../
+make
+
+%install
+rm -rf %{buildroot}
+# release pkg
+mkdir -p %{buildroot}%{_libdir}/pkgconfig
+cd build
+cp -a source/libSPIRV* %{buildroot}%{_libdir}/
+cp -a source/opt/libSPIRV* %{buildroot}%{_libdir}/
+cp -a source/link/libSPIRV* %{buildroot}%{_libdir}/
+cp -f SPIRV-Tools.pc %{buildroot}%{_libdir}/pkgconfig/SPIRV-Tools.pc
+cp -f SPIRV-Tools-shared.pc %{buildroot}%{_libdir}/pkgconfig/SPIRV-Tools-shared.pc
+cd ..
+
+# devel pkg
+mkdir -p %{buildroot}%{_includedir}
+cp -a include/spirv-tools %{buildroot}%{_includedir}
+
+%files
+%manifest %{name}.manifest
+%license LICENSE
+%defattr(-,root,root,-)
+%{_libdir}/libSPIRV*
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/spirv-tools/*
+%{_libdir}/pkgconfig/SPIRV*.pc
+
+
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index f29a0d4f..1ab5436c 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -16,6 +16,7 @@ set(GRAMMAR_PROCESSING_SCRIPT "${spirv-tools_SOURCE_DIR}/utils/generate_grammar_
set(VIMSYNTAX_PROCESSING_SCRIPT "${spirv-tools_SOURCE_DIR}/utils/generate_vim_syntax.py")
set(XML_REGISTRY_PROCESSING_SCRIPT "${spirv-tools_SOURCE_DIR}/utils/generate_registry_tables.py")
set(LANG_HEADER_PROCESSING_SCRIPT "${spirv-tools_SOURCE_DIR}/utils/generate_language_headers.py")
+set(SPIRV_HEADER_INCLUDE_DIR "/usr/include")
# For now, assume the DebugInfo grammar file is in the current directory.
# It might migrate to SPIRV-Headers.