aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2023-05-27 12:16:29 +0100
committerJoão Valverde <j@v6e.pt>2023-05-27 12:49:29 +0100
commitf653e52e0fbb3c5c686af14c0f96e3fa8c59e8ff (patch)
tree468835cff44c3416451804481a53c521639ed2ce /cmake/modules
parent78efc8d7fa837bebb0a3fc8d791330b45ce417fa (diff)
CMake: Try to use FindPython3.cmake again
Use FindPython3.cmake instead of the deprecated FindPythonInterp.cmake, to make sure we actually find Python3. Don't use the module with MSYS2 because it is buggy and exhibits broken behaviour. Run it earlier in the configuration, just as a precaution, so other indirect calls to find python don't happen earlier.
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/FindAsciidoctor.cmake2
-rw-r--r--cmake/modules/UseAsn2Wrs.cmake6
-rw-r--r--cmake/modules/UseMakePluginReg.cmake2
-rw-r--r--cmake/modules/UseMakeTaps.cmake2
4 files changed, 6 insertions, 6 deletions
diff --git a/cmake/modules/FindAsciidoctor.cmake b/cmake/modules/FindAsciidoctor.cmake
index 124cc6999f..b317117a2f 100644
--- a/cmake/modules/FindAsciidoctor.cmake
+++ b/cmake/modules/FindAsciidoctor.cmake
@@ -127,7 +127,7 @@ if(ASCIIDOCTOR_EXECUTABLE)
ADD_CUSTOM_COMMAND(
OUTPUT
${_output_txt}
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/html2text.py
+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/html2text.py
${_output_html}
> ${_output_txt}
DEPENDS
diff --git a/cmake/modules/UseAsn2Wrs.cmake b/cmake/modules/UseAsn2Wrs.cmake
index d619aa02a9..271126c1a3 100644
--- a/cmake/modules/UseAsn2Wrs.cmake
+++ b/cmake/modules/UseAsn2Wrs.cmake
@@ -37,7 +37,7 @@ function(ASN2WRS)
# Creates a dissector in the source directory and store the timestamp.
add_custom_command(
OUTPUT packet-${PROTOCOL_NAME}-stamp
- COMMAND "${PYTHON_EXECUTABLE}"
+ COMMAND "${Python3_EXECUTABLE}"
${CMAKE_SOURCE_DIR}/tools/asn2wrs.py
${A2W_FLAGS}
${PROTO_OPT}
@@ -47,7 +47,7 @@ function(ASN2WRS)
-O "${A2W_OUTPUT_DIR}"
${EXT_ASN_FILE_LIST} ${ASN_FILE_LIST} ${EXT_ASN_FILE_LIST_LATE}
COMMAND
- "${PYTHON_EXECUTABLE}" -c
+ "${Python3_EXECUTABLE}" -c
"import shutil, sys; x,s,d=sys.argv; open(d, 'w'); shutil.copystat(s, d)"
"${A2W_OUTPUT_DIR}/packet-${PROTOCOL_NAME}.c"
packet-${PROTOCOL_NAME}-stamp
@@ -66,7 +66,7 @@ function(ASN2WRS)
foreach(_asn2wrs_export_file IN LISTS EXPORT_FILES)
add_custom_command(
OUTPUT ${_asn2wrs_export_file}
- COMMAND "${PYTHON_EXECUTABLE}"
+ COMMAND "${Python3_EXECUTABLE}"
${CMAKE_SOURCE_DIR}/tools/asn2wrs.py
-E
${A2W_FLAGS}
diff --git a/cmake/modules/UseMakePluginReg.cmake b/cmake/modules/UseMakePluginReg.cmake
index fe5738110e..0c7198d8f4 100644
--- a/cmake/modules/UseMakePluginReg.cmake
+++ b/cmake/modules/UseMakePluginReg.cmake
@@ -4,7 +4,7 @@ function(register_plugin_files _outputfile _registertype)
add_custom_command(
OUTPUT
${_outputfile}
- COMMAND ${PYTHON_EXECUTABLE}
+ COMMAND ${Python3_EXECUTABLE}
${CMAKE_SOURCE_DIR}/tools/make-plugin-reg.py
${CMAKE_CURRENT_SOURCE_DIR}
${_registertype}
diff --git a/cmake/modules/UseMakeTaps.cmake b/cmake/modules/UseMakeTaps.cmake
index aed93183ce..56fd628a80 100644
--- a/cmake/modules/UseMakeTaps.cmake
+++ b/cmake/modules/UseMakeTaps.cmake
@@ -5,7 +5,7 @@ MACRO(REGISTER_TAP_FILES _outputfile)
OUTPUT
${_outputfile}
COMMAND
- ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/make-regs.py taps ${_outputfile} ${_sources}
+ ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/make-regs.py taps ${_outputfile} ${_sources}
DEPENDS
${CMAKE_SOURCE_DIR}/tools/make-regs.py
${_sources}