Skip to content

[build][cmake] Improve cmake config file generation#4541

Merged
raysan5 merged 2 commits into
raysan5:masterfrom
mobius3:master
Nov 27, 2024
Merged

[build][cmake] Improve cmake config file generation#4541
raysan5 merged 2 commits into
raysan5:masterfrom
mobius3:master

Conversation

@mobius3
Copy link
Copy Markdown
Contributor

@mobius3 mobius3 commented Nov 26, 2024

This allows for finding raylib on a non-standard location (eg, not in /usr/lib{,64}) when building via cmake.

The current raylib-config.cmake is a find script, not a config one.

This allows for finding raylib on a non-standard location (eg, not in /usr/lib{,64})
@raysan5 raysan5 merged commit c53dd8a into raysan5:master Nov 27, 2024
@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Nov 27, 2024

@mobius3 Thanks for the review, it looks ok to me but I'm not a CMake expert...

@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Nov 28, 2024

@mobius3 It seems this change broke the CodeQL system:

[  9%] Linking C executable audio_mixed_processor
/usr/bin/ld: ../raylib/libraylib.a(raudio.c.o): in function `ma_context_uninit__alsa':
raudio.c:(.text+0x3f76): undefined reference to `dlclose'
/usr/bin/ld: ../raylib/libraylib.a(raudio.c.o): in function `ma_context_uninit__pulse':
raudio.c:(.text+0x120f9): undefined reference to `dlclose'
/usr/bin/ld: ../raylib/libraylib.a(raudio.c.o): in function `ma_context_init__pulse':
raudio.c:(.text+0x25d8e): undefined reference to `dlopen'
/usr/bin/ld: raudio.c:(.text+0x25dd1): undefined reference to `dlsym'
/usr/bin/ld: raudio.c:(.text+0x25e1b): undefined reference to `dlsym'
/usr/bin/ld: raudio.c:(.text+0x25e65): undefined reference to `dlsym'
/usr/bin/ld: raudio.c:(.text+0x25eaf): undefined reference to `dlsym'
/usr/bin/ld: raudio.c:(.text+0x25ef9): undefined reference to `dlsym'
/usr/bin/ld: ../raylib/libraylib.a(raudio.c.o):raudio.c:(.text+0x25f43): more undefined references to `dlsym' follow
/usr/bin/ld: ../raylib/libraylib.a(raudio.c.o): in function `ma_context_init__pulse':
raudio.c:(.text+0x2715a): undefined reference to `dlclose'
/usr/bin/ld: ../raylib/libraylib.a(raudio.c.o): in function `ma_context_init__alsa':
raudio.c:(.text+0x27b8e): undefined reference to `dlopen'
/usr/bin/ld: raudio.c:(.text+0x27bd1): undefined reference to `dlsym'
/usr/bin/ld: raudio.c:(.text+0x27c1b): undefined reference to `dlsym'
/usr/bin/ld: raudio.c:(.text+0x27c65): undefined reference to `dlsym'
/usr/bin/ld: raudio.c:(.text+0x27caf): undefined reference to `dlsym'
/usr/bin/ld: raudio.c:(.text+0x27cf9): undefined reference to `dlsym'
/usr/bin/ld: ../raylib/libraylib.a(raudio.c.o):raudio.c:(.text+0x27d43): more undefined references to `dlsym' follow
/usr/bin/ld: ../raylib/libraylib.a(raudio.c.o): in function `ma_dlopen':
raudio.c:(.text+0x2b16e): undefined reference to `dlopen'
/usr/bin/ld: ../raylib/libraylib.a(raudio.c.o): in function `ma_dlsym':
raudio.c:(.text+0x2b1ef): undefined reference to `dlsym'
/usr/bin/ld: ../raylib/libraylib.a(raudio.c.o): in function `ma_dlclose':
raudio.c:(.text+0x2b1b8): undefined reference to `dlclose'
/usr/bin/ld: ../raylib/libraylib.a(posix_module.c.o): in function `_glfwPlatformLoadModule':
posix_module.c:(.text+0xa): undefined reference to `dlopen'
/usr/bin/ld: ../raylib/libraylib.a(posix_module.c.o): in function `_glfwPlatformFreeModule':
posix_module.c:(.text+0x15): undefined reference to `dlclose'
/usr/bin/ld: ../raylib/libraylib.a(posix_module.c.o): in function `_glfwPlatformGetModuleSymbol':
posix_module.c:(.text+0x25): undefined reference to `dlsym'
collect2: error: ld returned 1 exit status
make[2]: *** [examples/CMakeFiles/audio_mixed_processor.dir/build.make:103: examples/audio_mixed_processor] Error 1
make[1]: *** [CMakeFiles/Makefile2:752: examples/CMakeFiles/audio_mixed_processor.dir/all] Error 2
make: *** [Makefile:[166](https://github.com/raysan5/raylib/actions/runs/12056926099/job/33620456819#step:7:167): all] Error 2

Ref: https://github.com/raysan5/raylib/actions/runs/12056926099/job/33620456819

raysan5 added a commit that referenced this pull request Nov 28, 2024
@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Nov 28, 2024

Just reverted this PR to avoid following PRs to be added over a potentially breaking change (or at least not passing CI tests)

@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Nov 28, 2024

Not sure if the issue was related but just noticed another PR: #4547

Maybe the issue was related?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants