Open ArtemS2 opened 7 months ago
There is a requirement of sdl2_net in SoH. Either install it through apt, or if you do not need network capabilities (currently only used by CrowdControl), then you can pass in -DBUILD_CROWD_CONTROL=0
to cmake to skip it.
I tried to build with -DBUILD_CROWD_CONTROL=0 , but an error occurred during the build. build.log
/home/artem/builds/Shipwright/libultraship/src/controller/controldevice/controller/mapping/sdl/SDLMapping.cpp: In member function ‘bool LUS::SDLMapping::UsesSwitchLayout()’:
/home/artem/builds/Shipwright/libultraship/src/controller/controldevice/controller/mapping/sdl/SDLMapping.cpp:85:71: error: ‘SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR’ was not declared in this scope; did you mean ‘SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO’?
85 | return type == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO || type == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO
What version of SDL2 do you have? It might not be new enough to support the recent controller changes.
libsdl2-dev (2.0.20+dfsg-2ubuntu1.22.04.1)
Our build scripts use SDL2 2.26.1, so you are a bit behind. I recommend updating it.
This is the latest version of the library on my distribution. Can I use this repository to update securely - https://github.com/libsdl-org/SDL?
Yes. You can also reference how we do it from our build scripts. But ours is for x64, so the steps may be different for arm. I'm sure there are instructions on SDLs GitHub/site regarding building.
-- Linux Ubuntu 22.04 jammy -- Linking against dependent libraries statically -- Using the multi-header code from /home/artem/builds/Shipwright/libultraship/extern/nlohmann-json/include/ Searching for Boost installation Boost found in /usr/include CMake Warning at soh/CMakeLists.txt:358 (find_package): By not providing "FindSDL2_net.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "SDL2_net", but CMake did not find one.
Could not find a package configuration file provided by "SDL2_net" with any of the following names:
Add the installation prefix of "SDL2_net" to CMAKE_PREFIX_PATH or set "SDL2_net_DIR" to a directory containing one of the above files. If "SDL2_net" provides a separate development package or SDK, be sure it has been installed.
-- Configuring done CMake Error at soh/CMakeLists.txt:266 (add_executable): Target "soh" links to target "SDL2_net::SDL2_net" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?