Add dependency for SPIRV-Headers 69/176269/2 master tizen_20181206 accepted/tizen/5.0/unified/20181102.023356 accepted/tizen/unified/20180426.062558 submit/tizen/20180425.094529 submit/tizen_5.0/20181101.000005
authorXuelian <xuelian.bai@samsung.com>
Wed, 18 Apr 2018 11:17:39 +0000 (19:17 +0800)
committerXuelian <xuelian.bai@samsung.com>
Wed, 18 Apr 2018 11:37:01 +0000 (19:37 +0800)
Change-Id: Ib1859a58df7042e17c4fdc90791c0feda714a156

CMakeLists.txt
packaging/spirv-tools.manifest [new file with mode: 0644]
packaging/spirv-tools.spec [new file with mode: 0644]
source/CMakeLists.txt

index 60c606d..b44290e 100644 (file)
@@ -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 (file)
index 0000000..75b0fa5
--- /dev/null
@@ -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 (file)
index 0000000..b7f1eee
--- /dev/null
@@ -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
+
+
index f29a0d4..1ab5436 100644 (file)
@@ -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.