PopcornFX / O3DEPopcornFXPlugin

PopcornFX plugin for O3DE
https://www.popcornfx.com/
Other
13 stars 12 forks source link

PopcornFX libs do not compile in Release config #66

Closed TheOneAbis closed 1 year ago

TheOneAbis commented 1 year ago

Upon attempting to build a game executable in O3DE with the popcornfx gem enabled, I get a lot of linker errors, as shown below:

image

These errors occur because PK_RETAIL is not defined in release mode when it should be. Inside of the code CMakeLists.txt, adding this genex should fix the issue:

set(PFX_COMPILE_DEFINITIONS $<IF:$, PK_RETAIL,> )

and then adding it under COMPILE_DEFINITIONS in the PopcornFX.Static target:

COMPILE_DEFINITIONS PUBLIC ${PFX_COMPILE_DEFINITIONS}

ValPKFX commented 1 year ago

Normally this should be defined in the FindPopcornFX.cmake in the PopcornFX package. But indeed, it is correctly defined in the linux package but missing from the windows package. This will be fixed in the next releases (2.15.13 and 2.17.4) and in the meantime I will merge your PR in development. Thank you!