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

Fix the build when project is not created with Qt. #411

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion plugin/adsk/plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,21 @@ target_include_directories(${TARGET_NAME}
# -----------------------------------------------------------------------------
target_link_libraries(${TARGET_NAME}
PRIVATE
$<$<BOOL:${Qt5_FOUND}>:mayaUsdUI>
$<$<BOOL:${UFE_FOUND}>:${UFE_LIBRARY}>
)

if (${Qt5_FOUND})
target_link_libraries(${TARGET_NAME}
PRIVATE
mayaUsdUI
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we rely here on the fact that mayaUsdUI is dependent on MayaUsd?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can do this all on single line with:
$<IF:$<BOOL:${Qt5_FOUND}>,mayaUsdUI,mayaUsd>

)
else()
target_link_libraries(${TARGET_NAME}
PRIVATE
mayaUsd
)
endif()

# -----------------------------------------------------------------------------
# properties
# -----------------------------------------------------------------------------
Expand Down