mirror of
https://github.com/facebook/sapling.git
synced 2024-12-25 22:11:52 +03:00
on Windows, also emit a path containing runtime library dirs
Summary: Update the CMake build to emit a LIBRARY_DEP_DIRS.txt file in the build output directory. This file should contain additional directories that may contain runtime library dependencies for the generated build artifacts, one directory per line. This file will be parsed by getdeps.py so that it can set `$PATH` properly when running tests in order to find all of the necessary library dependencies. At the moment the runtime location of the Python DLL is the main thing that needs to be stored in this directory. CMake can find the Python location from the registry, even if that location is not in the user's `$PATH`. On its own getdeps.py won't be able to find the location of the Python DLL unless we explicitly give it this information through this file. Reviewed By: wez Differential Revision: D20688289 fbshipit-source-id: 078d07d860de8604c97bf6adede464c0d95fc079
This commit is contained in:
parent
0d4db87a26
commit
353e248dd4
@ -93,6 +93,14 @@ if(WIN32)
|
||||
get_target_property(python_dll Python3::Python LOCATION)
|
||||
install(FILES "${python_dll}" DESTINATION bin)
|
||||
endif()
|
||||
|
||||
# Also a emit a file listing additional directories containing runtime
|
||||
# library dependencies. On Windows this is needed to help figure out runtime
|
||||
# dependencies needed to run the generated build artifacts. This file can be
|
||||
# processed by getdeps.py
|
||||
get_filename_component(python_dll_dir "${python_dll}" DIRECTORY)
|
||||
file(TO_NATIVE_PATH "${python_dll_dir}" python_dll_dir)
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/LIBRARY_DEP_DIRS.txt" "${python_dll_dir}\n")
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
|
Loading…
Reference in New Issue
Block a user