CGNS: Add setting of RPATH on Darwin (#9984)
* CGNS: Add setting of RPATH on Darwin This should go in the CGNS CMakeLists.txt, but it isn't there yet and won't be in previous versions, so best to handle it here. If building on darwin/MacOSX, need to set the RPATH so applications can find shared library correctly. * Restrict MACOSX_RPATH setting This has now been added to the CGNS distribution, so the setting of `CMAKE_MACOSX_RPATH` should be restricted to current and previous releases and not upcoming releases.
This commit is contained in:
parent
983e6b4a4a
commit
db1fb16840
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
import sys
|
||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
@ -72,4 +73,10 @@ def cmake_args(self):
|
|||||||
else:
|
else:
|
||||||
options.extend(['-DCGNS_ENABLE_HDF5=OFF'])
|
options.extend(['-DCGNS_ENABLE_HDF5=OFF'])
|
||||||
|
|
||||||
|
if self.version <= Version('3.3.1'):
|
||||||
|
if sys.platform == 'darwin':
|
||||||
|
options.extend([
|
||||||
|
'-DCMAKE_MACOSX_RPATH:BOOL=ON'
|
||||||
|
])
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
Loading…
Reference in New Issue
Block a user