intel-tbb: install pkgconfig file (#23977)
* intel-tbb: install pkgconfig file * intel-tbb: install pkgconfig file when @:2021.2.0 * intel-tbb: add blank line * intel-tbb: fix library name to refer * intel-tbb: fix library name to refer again * intel-tbb: use self.prefix.lib.pkgconfig
This commit is contained in:
parent
5a9e5ddb3d
commit
c426386f46
@ -298,3 +298,23 @@ def cmake_args(self):
|
|||||||
options.append('-DCMAKE_CXX_STANDARD=%s' %
|
options.append('-DCMAKE_CXX_STANDARD=%s' %
|
||||||
spec.variants['cxxstd'].value)
|
spec.variants['cxxstd'].value)
|
||||||
return options
|
return options
|
||||||
|
|
||||||
|
@run_after('install')
|
||||||
|
def install_pkgconfig(self):
|
||||||
|
# pkg-config generation is introduced in May 5, 2021.
|
||||||
|
# It must not be overwritten by spack-generated tbb.pc.
|
||||||
|
# https://github.com/oneapi-src/oneTBB/commit/478de5b1887c928e52f029d706af6ea640a877be
|
||||||
|
if self.spec.satisfies('@:2021.2.0', strict=True):
|
||||||
|
mkdirp(self.prefix.lib.pkgconfig)
|
||||||
|
|
||||||
|
with open(join_path(self.prefix.lib.pkgconfig, 'tbb.pc'), 'w') as f:
|
||||||
|
f.write('prefix={0}\n'.format(self.prefix))
|
||||||
|
f.write('exec_prefix=${prefix}\n')
|
||||||
|
f.write('libdir={0}\n'.format(self.prefix.lib))
|
||||||
|
f.write('includedir={0}\n'.format(self.prefix.include))
|
||||||
|
f.write('\n')
|
||||||
|
f.write('Name: Threading Building Blocks\n')
|
||||||
|
f.write('Description: Intel\'s parallelism library for C++\n')
|
||||||
|
f.write('Version: {0}\n'.format(self.spec.version))
|
||||||
|
f.write('Cflags: -I${includedir}\n')
|
||||||
|
f.write('Libs: -L${libdir} -ltbb -latomic\n')
|
||||||
|
Loading…
Reference in New Issue
Block a user