Cmake: improve ncurses detection (#25776)
* Optionally enable ccmake in cmake Renames ncurses variant to `ccmake` since that's how users know it, and explicitly enable/disable `BUILD_CursesDialog`. * Make cmake locate its dependencies with CMAKE_PREFIX_PATH, and set rpath flags too * Undo variant name & defaults change
This commit is contained in:
parent
47b16b39a3
commit
c33382b607
@ -5,6 +5,8 @@
|
||||
|
||||
import re
|
||||
|
||||
import spack.build_environment
|
||||
|
||||
|
||||
class Cmake(Package):
|
||||
"""A cross-platform, open-source build system. CMake is a family of
|
||||
@ -277,6 +279,17 @@ def bootstrap_args(self):
|
||||
if '+ownlibs' in spec:
|
||||
args.append('-DCMAKE_USE_OPENSSL=%s' % str('+openssl' in spec))
|
||||
|
||||
args.append('-DBUILD_CursesDialog=%s' % str('+ncurses' in spec))
|
||||
|
||||
# Make CMake find its own dependencies.
|
||||
rpaths = spack.build_environment.get_rpaths(self)
|
||||
prefixes = spack.build_environment.get_cmake_prefix_path(self)
|
||||
args.extend([
|
||||
'-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF',
|
||||
'-DCMAKE_INSTALL_RPATH={0}'.format(";".join(str(v) for v in rpaths)),
|
||||
'-DCMAKE_PREFIX_PATH={0}'.format(";".join(str(v) for v in prefixes))
|
||||
])
|
||||
|
||||
return args
|
||||
|
||||
def bootstrap(self, spec, prefix):
|
||||
|
Loading…
Reference in New Issue
Block a user