Skip to content

Comments

Added extra CMAKE flags for linking plugins statically#1452

Merged
farindk merged 1 commit intostrukturag:masterfrom
agruzdev:adjust-static-linking
Feb 18, 2025
Merged

Added extra CMAKE flags for linking plugins statically#1452
farindk merged 1 commit intostrukturag:masterfrom
agruzdev:adjust-static-linking

Conversation

@agruzdev
Copy link
Contributor

Currently for statically linked backends there are used only two variables: LIBDE265_INCLUDE_DIR and LIBDE265_LIBRARY, for example. This is not enough for multiconfig build systems, like MSVC, where we need to provide both 'debug' and 'release' libraries.

This commit adds support of optional cmake variables:

  • plugin_DEBUG_LIBRARY - if not empty, then target_link_libraries will be called twice:
target_link_libraries(heif PRIVATE debug ${${varName}_DEBUG_LIBRARY})
target_link_libraries(heif PRIVATE optimized ${${varName}_LIBRARIES})
  • plugin_LINK_DIRS - willl be passed to target_link_directories( )

This change is backward compatible. In case if the new variables empty, behaviour is not changed.

@farindk farindk merged commit 4ab2a22 into strukturag:master Feb 18, 2025
35 checks passed
@farindk
Copy link
Contributor

farindk commented Feb 18, 2025

Thanks

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.

2 participants