Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CMake files to use FindPython3 #2056

Merged
merged 3 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ jobs:
name: "Windows Clang"
runs-on: windows-latest
needs: clang-format
if: github.event_name == 'schedule'
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
env:
VCPKG_ROOT: C:/vcpkg
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg/bincache
Expand Down Expand Up @@ -284,7 +284,7 @@ jobs:

fedora:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
container: fedora:latest
steps:
- name: Install dependencies
Expand Down Expand Up @@ -320,7 +320,7 @@ jobs:

nix:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
steps:
- name: checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_custom_command(
${CMAKE_CURRENT_BINARY_DIR}/packhand_gen.h
${CMAKE_CURRENT_BINARY_DIR}/packhand_gen.cpp
COMMAND
${PYTHON_EXECUTABLE}
${Python3_EXECUTABLE}
${CMAKE_SOURCE_DIR}/common/generate_packets.py
"" # common/packets_gen.h
"" # common/packets_gen.c
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindSphinx.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Support for sphinx-build
include(FindPackageHandleStandardArgs)

if(PythonInterp_FOUND)
get_filename_component(_PYTHON_DIR "${PYTHON_EXECUTABLE}" DIRECTORY)
if (Python3_Interpreter_FOUND)
get_filename_component(_PYTHON_DIR "${Python3_EXECUTABLE}" DIRECTORY)
set(_PYTHON_PATHS
"${_PYTHON_DIR}"
"${_PYTHON_DIR}/bin"
Expand Down
2 changes: 1 addition & 1 deletion cmake/FreecivDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
check_function_exists(at_quick_exit HAVE_AT_QUICK_EXIT)

# Required to generate the network protocol implementation
find_package(PythonInterp 3 REQUIRED)
find_package(Python3 REQUIRED)

# Required as the main networking and utility library
find_package(Qt5 5.15 COMPONENTS Core Network REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ add_custom_command(
${CMAKE_CURRENT_BINARY_DIR}/packets_gen.h
${CMAKE_CURRENT_BINARY_DIR}/packets_gen.cpp
COMMAND
${PYTHON_EXECUTABLE}
${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/generate_packets.py
${CMAKE_CURRENT_BINARY_DIR}/packets_gen.h
${CMAKE_CURRENT_BINARY_DIR}/packets_gen.cpp
Expand Down
2 changes: 1 addition & 1 deletion server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ add_custom_command(
${CMAKE_CURRENT_BINARY_DIR}/hand_gen.h
${CMAKE_CURRENT_BINARY_DIR}/hand_gen.cpp
COMMAND
${PYTHON_EXECUTABLE}
${Python3_EXECUTABLE}
${CMAKE_SOURCE_DIR}/common/generate_packets.py
"" # common/packets_gen.h
"" # common/packets_gen.c
Expand Down
2 changes: 1 addition & 1 deletion utility/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/specenum_gen.h
COMMAND
${PYTHON_EXECUTABLE}
${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/generate_specenum.py
${CMAKE_CURRENT_BINARY_DIR}/specenum_gen.h
VERBATIM
Expand Down
Loading