CMake: Add BUILD_STATIC_LIBS option#461
Merged
squeek502 merged 1 commit intoluvit:masterfrom Feb 29, 2020
Merged
Conversation
This adds on to the changes in luvit#459 to make it possible to build module, static, and shared libraries all at the same time if requested - To build the module, `-DBUILD_MODULE=On`; the target name for the module is `luv` - To build a static library, `-DBUILD_STATIC_LIBS=On`; the target name for the static lib is `libluv_a` (this matches how `libuv` names its targets; `uv` for shared and `uv_a` for static) - To build a shared library, `-DBUILD_SHARED_LIBS=On`; the target name for the shared lib is `libluv` These are able to be mixed/matched as needed. This is a breaking change (as was luvit#459) for users of CMake (e.g. luvi) who will now need to specify linking against `libluv`/`libluv_a` and turn on `BUILD_STATIC_LIBS`/`BUILD_SHARED_LIBS` before calling `add_subdirectory`
Member
Author
|
Some notes:
|
squeek502
added a commit
to squeek502/luvi
that referenced
this pull request
Feb 29, 2020
Updates CMake to be compatible with the changes in luvit/luv#459 and luvit/luv#461
squeek502
added a commit
to squeek502/luvi
that referenced
this pull request
Feb 29, 2020
Updates CMake to be compatible with the changes in luvit/luv#459 and luvit/luv#461
justinmk
pushed a commit
to neovim/neovim
that referenced
this pull request
Feb 29, 2020
- Fix an issue where CMAKE_BUILD_TYPE was not reflected during construction. - Remove the switch that uses the static library(-MTd, -MT) because it was specified in the CMakeLists.txt of luv when building on MSVC. related: luvit/luv#461
squeek502
added a commit
to squeek502/luv
that referenced
this pull request
Oct 20, 2020
Should have been added in luvit#461 when BUILD_STATIC_LIBS option was added
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@zhaozg this is a followup to #459 (comment)
This adds on to the changes in #459 to make it possible to build module, static, and shared libraries all at the same time if requested
-DBUILD_MODULE=On; the target name for the module isluv-DBUILD_STATIC_LIBS=On; the target name for the static lib islibluv_a(this matches howlibuvnames its targets [uvfor shared anduv_afor static])-DBUILD_SHARED_LIBS=On; the target name for the shared lib islibluvThese are able to be mixed/matched as needed.
This is a breaking change (as was #459) for users of CMake (e.g. luvi) who will now need to specify linking against
libluv/libluv_aand turn onBUILD_SHARED_LIBS/BUILD_STATIC_LIBSbefore callingadd_subdirectory