diff options
author | Xuelian <xuelian.bai@samsung.com> | 2018-04-18 19:17:39 +0800 |
---|---|---|
committer | Xuelian Bai <xuelian.bai@samsung.com> | 2021-06-02 19:06:15 +0800 |
commit | 335a31729f10f3560158393ece39d5ca64a5a040 (patch) | |
tree | 36c7fe78d0229fe270027e78f45044e8da00b132 | |
parent | c2d5375fa7cc87c93f692e7200d5d974283d4391 (diff) | |
download | SPIRV-Tools-335a31729f10f3560158393ece39d5ca64a5a040.tar.gz SPIRV-Tools-335a31729f10f3560158393ece39d5ca64a5a040.tar.bz2 SPIRV-Tools-335a31729f10f3560158393ece39d5ca64a5a040.zip |
Add dependency for SPIRV-Headers
Change-Id: Ib1859a58df7042e17c4fdc90791c0feda714a156
-rw-r--r-- | packaging/spirv-tools.manifest | 5 | ||||
-rw-r--r-- | packaging/spirv-tools.spec | 68 | ||||
-rw-r--r-- | source/CMakeLists.txt | 1 |
3 files changed, 74 insertions, 0 deletions
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 8247f6f8..a7232012 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. |