Page 1 of 1

CMake error with wut - Unknown CMake Command

Posted: Mon Aug 12, 2024 6:32 pm
by TurnOffTheTV
I'm newer to C/C++ programming, and I still don't understand CMake or compilers (I usually use Xcode which handles all that for me) but this seems like a trivial issue fueled by inexperience. Basically, I followed all the installation instructions on the Getting Started page on the wiki, installing the wiiu-dev group and downloaded the helloworld_cpp sample from GitHub. When I ran "cmake ." it gave me the error "Unknown CMake command "wut_create_rpx"." which I kind of expected since I never told it where the devkitPro .cmake files were. So, how should I solve this?
Running MacOS if that wasn't clear.

Re: CMake error with wut - Unknown CMake Command

Posted: Mon Aug 12, 2024 11:56 pm
by fincs
You do need to pass the path to the Wii U cmake toolchain file:

Code: Select all

# Configure the project for Wii U (Release build)
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/WiiU.cmake -DCMAKE_BUILD_TYPE=Release

# Build the project
cmake --build build
Alternatively, if you have our catnip helper tool installed ([c]sudo dkp-pacman -S catnip[/c] if you don't), you can use the following command to automatically configure and build the project for Wii U:

Code: Select all

catnip build -T WiiU