Merge pull request #291807 from liketechnik/fix/paho-mqtt-c-static
paho-mqtt-c(pp): pass static/shared build to cmake
This commit is contained in:
commit
816cae3ee3
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, openssl }:
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, openssl, enableStatic ? stdenv.hostPlatform.isStatic, enableShared ? !stdenv.hostPlatform.isStatic }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "paho.mqtt.c";
|
||||
@ -21,7 +21,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
|
||||
cmakeFlags = [ "-DPAHO_WITH_SSL=TRUE" ];
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "PAHO_WITH_SSL" true)
|
||||
(lib.cmakeBool "PAHO_BUILD_STATIC" enableStatic)
|
||||
(lib.cmakeBool "PAHO_BUILD_SHARED" enableShared)
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Eclipse Paho MQTT C Client Library";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, openssl, paho-mqtt-c }:
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, openssl, paho-mqtt-c, enableStatic ? stdenv.hostPlatform.isStatic, enableShared ? !stdenv.hostPlatform.isStatic }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "paho.mqtt.cpp";
|
||||
@ -15,6 +15,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ openssl paho-mqtt-c ];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "PAHO_WITH_SSL" true)
|
||||
(lib.cmakeBool "PAHO_BUILD_STATIC" enableStatic)
|
||||
(lib.cmakeBool "PAHO_BUILD_SHARED" enableShared)
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Eclipse Paho MQTT C++ Client Library";
|
||||
homepage = "https://www.eclipse.org/paho/";
|
||||
|
Loading…
Reference in New Issue
Block a user