How do I fix "Unknown CMake command 'wut_create_rpx'"?

nulcow

New Member
OP
Newbie
Joined
Jul 29, 2023
Messages
1
Trophies
0
Age
14
Location
Florida, (unfortunately)
XP
20
Country
United States
Here is my CMake file (slightly modified from a sample application):

C-like:
cmake_minimum_required(VERSION 3.2)
set(CMAKE_TOOLCHAIN_FILE /opt/devkitpro/wut/share/wut.toolchain.cmake)


project(helloworld C)
include("/opt/devkitpro/cmake/WiiU.cmake" REQUIRED) # used to be "/opt/devkitpro/wut/share/wut.cmake" but the software told me to not use that.


add_executable(helloworld
    main.c)


target_compile_options(helloworld PRIVATE -Wall)


wut_create_rpx(helloworld) # problem starts here

I have everything I need installed, and the directory structure is set up correctly.
 

mesid72888

New Member
Newbie
Joined
Aug 6, 2023
Messages
1
Trophies
0
Age
34
XP
12
Country
Brazil
Firstly, fix your CMakeLists.txt:

C-like:
cmake_minimum_required(VERSION 3.20)
project(helloworld C)

add_executable(${PROJECT_NAME} main.c)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall)
wut_create_rpx(${PROJECT_NAME})

That's all that is necessary, the other lines will just get in your way.

Then:
Bash:
cmake -B build -S . -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/WiiU.cmake
ninja -C build

Everything DevKitPro related was always a mess and will probably always be, examples of how to use the CMake system properly should have been there for ages. As a note, you don't really need to use Linux or MSYS2 for that matter, you can just mod a thing or two (depending on the platform) and the CMake tool chain will work out of the box on Windows in whatever IDE you use, no Linux tools required. But they put Linux only stuff there on purpose, because who knows.

Good luck on your development endeavors!~
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: This parrot is no more it has ceased to be!