Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake always chooses the basic library #61

Open
bebbo opened this issue Dec 28, 2022 · 4 comments
Open

cmake always chooses the basic library #61

bebbo opened this issue Dec 28, 2022 · 4 comments

Comments

@bebbo
Copy link

bebbo commented Dec 28, 2022

If you have multilibs installed, cmake should pick up the correct library.

choosen atm:

/opt/amiga/lib/libSDL_ttf.a

which is the 68000 variant.

correct would be:

/opt/amiga/lib/libm020/libm881/libSDL_ttf.a

or easier:

-lSDL_ttf

and the linker picks the correct version.

@bebbo
Copy link
Author

bebbo commented Dec 29, 2022

this helps:

find_library(SDL_LIBRARY libSDL.a PATHS "/opt/amiga/lib/libm020/libm881/")
find_library(SDL_MIXER_LIBRARY libSDL_mixer.a PATHS "/opt/amiga/lib/libm020/libm881/")
find_library(SDL_TTF_LIBRARY libSDL_ttf.a PATHS "/opt/amiga/lib/libm020/libm881/")
find_library(FREETYPE_LIBRARY libfreetype.a PATHS "/opt/amiga/lib/libm020/libm881/")
find_library(PNG_LIBRARY libpng.a PATHS "/opt/amiga/lib/libm020/libm881/")
find_library(ZLIB_LIBRARY libz.a PATHS "/opt/amiga/lib/libm020/libm881/")

note that libpng.a is needed if it's present when other libs are build.

This still picks up the sole version at /opt/amiga/lib/ if there is no lib for the given path.

@MBeijer
Copy link
Member

MBeijer commented Dec 29, 2022

There is this:
https://github.com/AmigaPorts/devilutionX/blob/master/Packaging/amiga/prep.sh

Which sets everything up.

Also this repo has fallen behind the official upstream by a lot. And fixes has been pushed to upstream to keep Amiga support.

@MBeijer
Copy link
Member

MBeijer commented Dec 29, 2022

The cmake toolchain is setup to prefer $PREFIX/usr for looking for includes and libraries.

@MBeijer
Copy link
Member

MBeijer commented Dec 29, 2022

could probably improve the toolchain file to choose the appropriate directory depending on choice, but suggestions for that would rather be in here: https://github.com/AmigaPorts/AmigaCMakeCrossToolchains

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

No branches or pull requests

2 participants