Propagate CMake generator to scikit-build-core.

This commit is contained in:
Marcel Pi 2024-09-04 15:30:38 +02:00
parent 908c203fca
commit cd067cd9cf
2 changed files with 15 additions and 1 deletions

View File

@ -36,6 +36,18 @@ set (
${CMAKE_CURRENT_SOURCE_DIR}/carla
)
set (
CARLA_PYTHON_API_CMAKE_ARGS
"\t'-G${CMAKE_GENERATOR}'"
)
if (CMAKE_TOOLCHAIN_FILE)
set (
CARLA_PYTHON_API_CMAKE_ARGS
"${CARLA_PYTHON_API_CMAKE_ARGS},\n\'\t--toolchain=${CMAKE_TOOLCHAIN_FILE}\'"
)
endif ()
carla_two_step_configure_file (
${CARLA_PYTHON_API_CARLA_PATH}/pyproject.toml
${CARLA_PYTHON_API_CARLA_PATH}/pyproject.toml.in

View File

@ -7,8 +7,10 @@ wheel.packages = ['carla']
cmake.version = '>=@CMAKE_MAJOR_VERSION@.@CMAKE_MINOR_VERSION@'
cmake.build-type = '@CMAKE_BUILD_TYPE@'
cmake.args = [
'-DCMAKE_TOOLCHAIN_FILE=@CMAKE_TOOLCHAIN_FILE@'
@CARLA_PYTHON_API_CMAKE_ARGS@
]
ninja.version=">=1.10"
ninja.make-fallback=true
[project]
name = 'carla'