Skip to content

Commit

Permalink
Apply Jan-Willem Blokland's CMake patches to build both static and sh…
Browse files Browse the repository at this point in the history
…ared

libraries, plus some other CMake extensions.
  • Loading branch information
PhilipHazel committed Jul 11, 2021
1 parent d70da76 commit 2410fbe
Show file tree
Hide file tree
Showing 6 changed files with 410 additions and 107 deletions.
Loading

1 comment on commit 2410fbe

@SpaceIm
Copy link
Contributor

@SpaceIm SpaceIm commented on 2410fbe Mar 7, 2022

Choose a reason for hiding this comment

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

Why this CMake antipattern (build both shared & static in one build)? Isn't it a breaking change to static lib names for Visual Studio?

Moreover, a custom CMake config file is weird while CMake has a module with nice macros to generate robust config files in few lines. Requiring to set some PCRE2_USE_STATIC_LIBS (side effect of the antipattern above) before a find_package() call if you want to be sure that static libs are properly found is quite tedious and error prone.
How downstream libraries can know in advance which flavor will be installed by their users? Answer: they can't know in advance.

Please sign in to comment.