Skip to content

support building on OpenBSD #2198

@unix-supremacist

Description

@unix-supremacist

following https://github.com/HarbourMasters/Shipwright/blob/develop/BUILDING.md#linux (linux is the most similar)
when you get to cmake -H. -Bbuild-cmake -GNinja it can't find the system sdl2 it seems.

unix E[0] /home/unix/Source/Shipwright/ ➜ cmake -H. -Bbuild-cmake -GNinja
-- OpenBSD
-- Linking against dependent libraries statically
-- Using the multi-header code from /home/unix/Source/Shipwright/libultraship/extern/nlohmann-json/include/
-- Testing if -Werror=pointer-arith can be used -- compiles
-- Testing if -Werror=implicit-function-declaration can be used -- compiles
-- Testing if -fno-strict-aliasing can be used -- compiles
-- Using raylib's GLFW
-- Using X11 for window creation
-- Audio Backend: miniaudio
-- Building raylib static library
-- Generated build type: Debug
-- Compiling with the flags:
--   PLATFORM=PLATFORM_DESKTOP
--   GRAPHICS=GRAPHICS_API_OPENGL_33
-- Configuring done
CMake Error at libultraship/extern/CMakeLists.txt:73 (target_link_libraries):
  Target "ImGui" links to:

    SDL2::SDL2

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



CMake Error at soh/CMakeLists.txt:2100 (target_link_libraries):
  Target "soh" links to:

    SDL2::SDL2

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

the pkg is installed

unix E[0] /home/unix/Source/Shipwright/ ➜ pkg_info | grep sdl2
sdl2-2.0.20p0       cross-platform multimedia library

the cmake files for SDL2 seem to be in the proper /usr/local/lib/cmake/SDL2/ location.

unix E[0] /home/unix/Source/Shipwright/ ➜ ls /usr/local/lib/cmake/SDL2/
.                          ..                         sdl2-config-version.cmake  sdl2-config.cmake

i have no idea what could be causing this issue as it seems to be entirely dependency related, i might be missing something with how cmake handles dependencies but i'm not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions