Skip to content

Conversation

@ofTheo
Copy link
Member

@ofTheo ofTheo commented Feb 26, 2025

closes #8273

this PR allows for % wildcard patterns for libs which weren't supported before in makefiles.
so this now works:
ADDON_LIBS=../ofxAssimpModelLoader/libs/assimp/lib/emscripten/%/libassimp.a

@dimitre
Copy link
Member

dimitre commented Feb 26, 2025

with this change a similar change in PG is needed.
if we just used usual folders it won't be needed even declare ADDON_LIBS because PG and Make will look there automatically

@ofTheo
Copy link
Member Author

ofTheo commented Feb 26, 2025

@dimitre yeah - I think its an edge case just of ofxAssimp as its relying on libs from ofxAssimpModelLoader.

PG solves this with ADDON_ADDITIONAL_LIBS = ../ofxAssimpModelLoader/libs which finds the libs as needed, but ADDON_ADDITIONAL_LIBS doesn't work with makefiles.

So it needs this set:

	ADDON_LIBS=../ofxAssimpModelLoader/libs/assimp/lib/emscripten/%/libassimp.a

Anyway yeah, probably best not to rely on the wild card.

The main issue is there is so much code in apothecary now doing the sub folder stuff it would be a lot of work to revert, so I just make the smallest possible fix now.

probably better to just have:

	ADDON_LIBS=../ofxAssimpModelLoader/libs/assimp/lib/emscripten/WASM/libassimp.a

@ofTheo
Copy link
Member Author

ofTheo commented Feb 26, 2025

@dimitre the wildcard pattern also fixes OpenCV
https://github.com/openframeworks/openFrameworks/blob/master/addons/ofxOpenCv/addon_config.mk#L154-L186

But again, this could be switched to WASM or this section could be removed and picked up by the folder parser.

@danoli3
Copy link
Member

danoli3 commented Feb 26, 2025

need the extra folder to support WASM64 as well, there is two targets
WASM
WASM64

Nice

@danoli3
Copy link
Member

danoli3 commented Feb 27, 2025

again not using subfolders was the root cause of the issue

@danoli3 danoli3 merged commit 74993cc into openframeworks:master Feb 27, 2025
15 checks passed
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.

Emscripten addons not linking

3 participants