From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] cmake: bump to version 3.3.1
Date: Mon, 7 Sep 2015 16:26:03 +0100 [thread overview]
Message-ID: <55EDAC8B.7060805@imgtec.com> (raw)
In-Reply-To: <CAHXCMM+FrPaSsfW0zakOnbf92GrQPN4_REc219eJ0R=c9GTHHg@mail.gmail.com>
Dear Samuel Martin,
On 09/07/2015 04:21 PM, Samuel Martin wrote:
> Hi Gustavo, Vicente,
>
> On Mon, Sep 7, 2015 at 5:10 PM, Vicente Olivert Riera
> <Vincent.Riera@imgtec.com> wrote:
> [...]
>>>
>>> The host-cmake package is fine, but the target one fails for me at the
>>> configure phase:
>>>
>>> -- Could NOT find JsonCpp (missing: JsonCpp_LIBRARY JsonCpp_INCLUDE_DIR)
>>> CMake Error at CMakeLists.txt:399 (message):
>>> CMAKE_USE_SYSTEM_JSONCPP is ON but a JsonCpp is not found!
>>> Call Stack (most recent call first):
>>> CMakeLists.txt:533 (CMAKE_BUILD_UTILITIES)
>>>
>>> This is the defconfig I have used:
>>>
>>> BR2_mips=y
>>> BR2_TOOLCHAIN_EXTERNAL=y
>>> BR2_PACKAGE_CMAKE_CTEST=y
>>>
>>> I have tried to fix the problem applying this patch:
>>>
>>> diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk
>>> index da93fb3..0f0fd39 100644
>>> --- a/package/cmake/cmake.mk
>>> +++ b/package/cmake/cmake.mk
>>> @@ -20,6 +20,12 @@ CMAKE_CONF_OPTS = \
>>> -DCTEST_USE_XMLRPC=OFF \
>>> -DBUILD_CursesDialog=OFF
>>>
>>> +ifeq ($(BR2_PACKAGE_JSONCPP),y)
>>> +CMAKE_CONF_OPTS += -DCMAKE_USE_SYSTEM_JSONCPP=ON
>>> +else
>>> +CMAKE_CONF_OPTS += -DCMAKE_USE_SYSTEM_JSONCPP=OFF
>>> +endif
>>> +
>>> # Get rid of -I* options from $(HOST_CPPFLAGS) to prevent that a
>>> # header available in $(HOST_DIR)/usr/include is used instead of a
>>> # CMake internal header, e.g. lzma* headers of the xz package
>>>
>>> But it didn't worked. Perhaps you have a better idea.
>>>
>>> Regards,
>>>
>>> Vincent.
>>> _______________________________________________
>>> buildroot mailing list
>>> buildroot at busybox.net
>>> http://lists.busybox.net/mailman/listinfo/buildroot
>>>
>>
>> ok, I have fixed it. The changes should be done this way:
>>
>> ifeq ($(BR2_PACKAGE_JSONCPP),y)
>> CMAKE_CONF_OPTS += -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=ON
>> else
>> CMAKE_CONF_OPTS += -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=OFF
>
> This will build a static libjsoncpp bundled within cmake sources.
> For host package, we don't care, but for target I think we only use
> the system libraries.
> So, it should be an unconditional dependency:
>
> CMAKE_DEPENDENCIES += jsoncpp
> CMAKE_CONF_OPTS += -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=ON
well, in that case you only need to add jsoncpp to the current
CMAKE_DEPENDENCIES line, and also select BR2_PACKAGE_JSONCPP in the
Config.in:
diff --git a/package/cmake/Config.in b/package/cmake/Config.in
index f3f0f85..5b197e3 100644
--- a/package/cmake/Config.in
+++ b/package/cmake/Config.in
@@ -14,6 +14,7 @@ config BR2_PACKAGE_CMAKE_CTEST
bool "ctest"
select BR2_PACKAGE_CMAKE
select BR2_PACKAGE_ZLIB
+ select BR2_PACKAGE_JSONCPP
select BR2_PACKAGE_LIBCURL
select BR2_PACKAGE_LIBARCHIVE
select BR2_PACKAGE_EXPAT
diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk
index da93fb3..12f4cad 100644
--- a/package/cmake/cmake.mk
+++ b/package/cmake/cmake.mk
@@ -11,7 +11,7 @@ CMAKE_LICENSE = BSD-3c
CMAKE_LICENSE_FILES = Copyright.txt
HOST_CMAKE_DEPENDENCIES = host-pkgconf
-CMAKE_DEPENDENCIES = zlib libcurl libarchive expat bzip2 xz
+CMAKE_DEPENDENCIES = zlib jsoncpp libcurl libarchive expat bzip2 xz
CMAKE_CONF_OPTS = \
-DKWSYS_LFS_WORKS=TRUE \
Regards,
Vincent.
> Regards,
>
>
next prev parent reply other threads:[~2015-09-07 15:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-07 13:36 [Buildroot] [PATCH] cmake: bump to version 3.3.1 gustavo.zacarias at free-electrons.com
2015-09-07 14:43 ` Vicente Olivert Riera
2015-09-07 15:10 ` Vicente Olivert Riera
2015-09-07 15:21 ` Samuel Martin
2015-09-07 15:26 ` Vicente Olivert Riera [this message]
2015-09-07 16:24 ` Gustavo Zacarias
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55EDAC8B.7060805@imgtec.com \
--to=vincent.riera@imgtec.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox