2017-03-29 13:44:02 +00:00
|
|
|
## @package get_python_cmake_flags
|
|
|
|
|
# Module scripts.get_python_cmake_flags
|
2017-02-22 01:39:37 +00:00
|
|
|
##############################################################################
|
|
|
|
|
# Use this script to find your preferred python installation.
|
|
|
|
|
##############################################################################
|
|
|
|
|
#
|
|
|
|
|
# You can use the following to build with your preferred version of python
|
|
|
|
|
# if your installation is not being properly detected by CMake.
|
|
|
|
|
#
|
|
|
|
|
# mkdir -p build && cd build
|
2018-04-16 04:22:11 +00:00
|
|
|
# cmake $(python ../scripts/get_python_cmake_flags.py) ..
|
2017-02-22 01:39:37 +00:00
|
|
|
# make
|
|
|
|
|
#
|
|
|
|
|
|
2020-09-24 00:55:24 +00:00
|
|
|
|
2017-02-22 01:39:37 +00:00
|
|
|
import sys
|
2021-04-29 19:09:02 +00:00
|
|
|
import sysconfig
|
2017-02-22 01:39:37 +00:00
|
|
|
|
2024-07-15 06:56:25 +00:00
|
|
|
|
2018-05-08 07:34:42 +00:00
|
|
|
flags = [
|
2024-05-29 13:17:35 +00:00
|
|
|
f"-DPython_EXECUTABLE:FILEPATH={sys.executable}",
|
2018-05-08 07:34:42 +00:00
|
|
|
]
|
2017-02-22 01:39:37 +00:00
|
|
|
|
2018-05-08 07:34:42 +00:00
|
|
|
print(" ".join(flags), end="")
|