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
PhysX Gem can't be used as build dependency in engine SDK #1971
Comments
@amznestebanpapp I tried two approaches which haven't completely succeeded at solving this issue. The first was to replace the call to call to WRITE out the generated CMakeLists.txt with a GENERATE command in the Install_common.cmake, but that ran into the issue, This also has the issue that O3DE specifies generator expressions as part of ly_add_target calls, and they shouldn't be resolved by the INSTALL build. Those calls would need to be installed by the Project build. My second approach was to add the Gem::LmbrCentral should be an alias of the global LmbrCentral target so it should be able to be seen by other Gem CMakeLists.txt files, but that doesn't seem to be the case. I added this blurb to the installed layout get_property(is_global_alias TARGET Gem::LmbrCentral PROPERTY ALIAS_GLOBAL)
get_property(is_global_imported TARGET LmbrCentral PROPERTY IMPORTED_GLOBAL)
message(STATUS "The Gem::LmbrCentral target has an ALIAS_GLOBAL value of ${is_global_alias}")
message(STATUS "The LmbrCentral target has an IMPORTED_GLOBAL value of ${is_global_imported}")
-- The Gem::LmbrCentral target has an ALIAS_GLOBAL value of TRUE
-- The LmbrCentral target has an IMPORTED_GLOBAL value of TRUE |
We talked with @lumberyard-employee-dm offline and found the root cause of the issue, have a fix for it |
Describe the bug
If the PhysX Gem is added as a build dependency in CMakeLists.txt, generating the project files with CMake fail with the following error:
To Reproduce
Steps to reproduce the behavior:
Gem::PhysX
to BUILD_DEPENDENCIES:(Doesn't matter if it's in
<project>
or<project>.Static
TargetExpected behavior
Successful cmake configure and build
Additional context
A workaround is commenting out a line in \o3de-install\Gems\PhysX\Code\CMakeLists.txt (4th last line):
There are other references to
Gem::LmbrCentral,INTERFACE_LINK_LIBRARIES
, but it looks like this line is the only one that causes the error.SDK build of the development branch, commit ec02696.
The text was updated successfully, but these errors were encountered: