CMake: Make BUILD_MODULE and BUILD_SHARED_LIBS non inclusive#459
CMake: Make BUILD_MODULE and BUILD_SHARED_LIBS non inclusive#459squeek502 merged 3 commits intoluvit:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
87c3d35 to
b023d9c
Compare
This comment has been minimized.
This comment has been minimized.
|
cc @teto. |
b023d9c to
0494414
Compare
|
Looks good, this is the direction I was thinking of going in as well. Looks like it needs some fixes to get LuaRocks builds working again--I'll work on that. |
|
Not late, This will break luvi build, we need do more work. @squeek502 |
Sorry, you're right. I jumped the gun on this one. |
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`
Updates CMake to be compatible with the changes in luvit/luv#459 and luvit/luv#461
Updates CMake to be compatible with the changes in luvit/luv#459 and luvit/luv#461
|
another issue we see in NixOS/nixpkgs#80528 (comment) |
|
@teto totally open to suggestions here. I'm not sure I fully understand what the issue is/what the possible fixes are. |
|
@squeek502 Our build system calls Where There are a couple of issues here which can be detected and handled somehow in
I'm not sure my self how to address it yet, but this is my best summarise so I think it's a good start. |
|
Oh actually, there's even 1 more thing I was thinking of, but consider this one as a nice-to-have: Since luarocks/luarocks#1160, luarocks/luarocks#509 and luarocks/luarocks#339 are unresolved, perhaps would it be possible to set cmake options via environmental variables? This would help us make the build even cleaner. |
|
basically we should avoid the scenario if we follow the definitions, it goes up to |
|
|
where is it defined ? is that some kind of default ? I only can find LUA_LIBDIR. |
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`
Running out of patience and in order to get my point better, here's a change I'm satisfied with it's results, here is the resulting
treefor all 3 configurations ofONandOFF:Fixes #457 and fixes NixOS/nixpkgs#80528 .
NOTE: I've had to create an additional
target-libluvwhich is distinguished from theluvtarget.