Skip to content

Commit

Permalink
chore: minor cleanup (#1063)
Browse files Browse the repository at this point in the history
This does some minor cleanup to the CMake cpp-sdl example.
  • Loading branch information
henryiii committed Mar 27, 2024
1 parent 139d15e commit e04a2ce
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions examples/cpp-sdl/pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ authors = ["Bas Zalmstra <bas@prefix.dev>"]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]

[tasks]
[tasks.start]
# Start the built executable
start = { cmd = ".build/bin/sdl_example", depends_on = ["build"] }
cmd = ".build/bin/sdl_example"
depends_on = ["build"]

[dependencies]
sdl2 = "2.26.5.*"
Expand All @@ -18,24 +19,23 @@ cmake = "3.26.4.*"
cxx-compiler = "1.5.2.*"
ninja = "1.11.1.*"

[feature.build.tasks]
[feature.build.tasks.configure]
# Configures CMake
configure = { cmd = [
cmd = [
"cmake",
# Use the cross-platform Ninja generator
"-G",
"Ninja",
"-GNinja",
# The source is in the root directory
"-S",
".",
"-S.",
# We wanna build in the .build directory
"-B",
".build",
], inputs = ["CMakeLists.txt"], outputs = [".build/CMakeFiles/"] }
"-B.build",
]
inputs = ["CMakeLists.txt"]
outputs = [".build/CMakeFiles/"]

# Build the executable but make sure CMake is configured first.
[feature.build.tasks.build]
cmd = ["ninja", "-C", ".build"]
cmd = ["cmake", "--build", ".build"]
depends_on = ["configure"]
inputs = [
"CMakeLists.txt",
Expand Down

0 comments on commit e04a2ce

Please sign in to comment.