* [Buildroot] [PATCH 1/8 v2] package/libftdi: fix libftdi.pc
2015-01-25 21:13 [Buildroot] [PATCH 0/8] Misc. fixes around libftdi Samuel Martin
@ 2015-01-25 21:13 ` Samuel Martin
2015-02-01 22:31 ` Thomas Petazzoni
2015-01-25 21:13 ` [Buildroot] [PATCH 2/8] package/libiio: update cmake code for libxml2 detection Samuel Martin
` (6 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Samuel Martin @ 2015-01-25 21:13 UTC (permalink / raw)
To: buildroot
This patch fixes libftdi pkg-config module, so that packages linking
against libftdi correctly have all needed CFLAGS and LIBS defined,
especially when running a static build.
Fixes:
http://autobuild.buildroot.org/results/e90/e90b4d5ad79d99487f21c9d18581e8eba7034501/
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
change v1->v2:
- libusb as "Require" (ThomasP)
---
...bftdi.pc-requires-libusb-fix-static-build.patch | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 package/libftdi/0002-libftdi.pc-requires-libusb-fix-static-build.patch
diff --git a/package/libftdi/0002-libftdi.pc-requires-libusb-fix-static-build.patch b/package/libftdi/0002-libftdi.pc-requires-libusb-fix-static-build.patch
new file mode 100644
index 0000000..ee47af6
--- /dev/null
+++ b/package/libftdi/0002-libftdi.pc-requires-libusb-fix-static-build.patch
@@ -0,0 +1,27 @@
+From d3d6ca63cb86727533d7d83c98e70002bb04f343 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Wed, 21 Jan 2015 11:18:59 +0100
+Subject: [PATCH] libftdi.pc: requires libusb (fix static build)
+
+---
+ libftdi.pc.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libftdi.pc.in b/libftdi.pc.in
+index 2061b91..57f0a09 100644
+--- a/libftdi.pc.in
++++ b/libftdi.pc.in
+@@ -5,8 +5,8 @@ includedir=@includedir@
+
+ Name: libftdi
+ Description: Library to program and control the FTDI USB controller
+-Requires:
++Requires: libusb
+ Version: @VERSION@
+-Libs: -L${libdir} -lftdi -lusb
++Libs: -L${libdir} -lftdi
+ Cflags: -I${includedir}
+
+--
+2.1.0
+
--
2.2.2
^ permalink raw reply related [flat|nested] 16+ messages in thread* [Buildroot] [PATCH 1/8 v2] package/libftdi: fix libftdi.pc
2015-01-25 21:13 ` [Buildroot] [PATCH 1/8 v2] package/libftdi: fix libftdi.pc Samuel Martin
@ 2015-02-01 22:31 ` Thomas Petazzoni
0 siblings, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2015-02-01 22:31 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 25 Jan 2015 22:13:48 +0100, Samuel Martin wrote:
> This patch fixes libftdi pkg-config module, so that packages linking
> against libftdi correctly have all needed CFLAGS and LIBS defined,
> especially when running a static build.
>
> Fixes:
> http://autobuild.buildroot.org/results/e90/e90b4d5ad79d99487f21c9d18581e8eba7034501/
>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Applied, thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2/8] package/libiio: update cmake code for libxml2 detection
2015-01-25 21:13 [Buildroot] [PATCH 0/8] Misc. fixes around libftdi Samuel Martin
2015-01-25 21:13 ` [Buildroot] [PATCH 1/8 v2] package/libftdi: fix libftdi.pc Samuel Martin
@ 2015-01-25 21:13 ` Samuel Martin
2015-01-27 21:16 ` Arnout Vandecappelle
2015-02-14 21:15 ` Thomas Petazzoni
2015-01-25 21:13 ` [Buildroot] [PATCH 3/8] package/libftdi: bump to version 0.20 Samuel Martin
` (5 subsequent siblings)
7 siblings, 2 replies; 16+ messages in thread
From: Samuel Martin @ 2015-01-25 21:13 UTC (permalink / raw)
To: buildroot
Only check for libxml2 when it is needed.
This prevents CMake from falling back on the libxml2-config.cmake
installed on the host system (i.e. when libxml2 >=2.9.2 is part of the
host system), but not enabled as a target package (i.e. not existing in
the staging tree).
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
...l2-detection-try-first-the-CMake-module-f.patch | 40 +++++++++++++---------
1 file changed, 23 insertions(+), 17 deletions(-)
diff --git a/package/libiio/0002-cmake-libxml2-detection-try-first-the-CMake-module-f.patch b/package/libiio/0002-cmake-libxml2-detection-try-first-the-CMake-module-f.patch
index 9f44169..43dcf62 100644
--- a/package/libiio/0002-cmake-libxml2-detection-try-first-the-CMake-module-f.patch
+++ b/package/libiio/0002-cmake-libxml2-detection-try-first-the-CMake-module-f.patch
@@ -1,4 +1,4 @@
-From 4f849e1d2287206cfb7ff0fdeca96c22383b0d53 Mon Sep 17 00:00:00 2001
+From 238ce46fec88f5cba092ed4d8b52104eb2e31af2 Mon Sep 17 00:00:00 2001
From: Samuel Martin <s.martin49@gmail.com>
Date: Mon, 29 Dec 2014 19:05:13 +0100
Subject: [PATCH] cmake: libxml2 detection: try first the CMake module from
@@ -7,36 +7,42 @@ Subject: [PATCH] cmake: libxml2 detection: try first the CMake module from
Libxml2 >=2.9.2 provides its own CMake module, so check for it before
falling back on the CMake's module FindLibXml2.cmake.
+Also, only check for libxml2 when needed (i.e. network backend is
+enabled). This prevents CMake from finding the libxml2-config.cmake
+when is installed on the host system, but not in the staging tree.
+
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
- CMakeLists.txt | 14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
+ CMakeLists.txt | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 393fee3..b4f1d26 100644
+index dcc6617..810b329 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -38,7 +38,19 @@ endif()
+@@ -53,7 +53,21 @@ endif()
find_library(AVAHI_CLIENT_LIBRARIES avahi-client)
find_library(AVAHI_COMMON_LIBRARIES avahi-common)
find_library(PTHREAD_LIBRARIES pthread)
-include(FindLibXml2)
+
-+# Since libxml2-2.9.2, libxml2 provides its own LibXml2-config.cmake, with all
-+# variables correctly set.
-+# So, try first to find the CMake module provided by libxml2 package, then fallback
-+# on the CMake's FindLibXml2.cmake module (which can lack some definition, especially
-+# in static build case).
-+find_package(LibXml2 QUIET NO_MODULE)
-+if(DEFINED LIBXML2_VERSION_STRING)
-+ set(LIBXML2_FOUND ON)
-+ set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS})
-+else()
-+ include(FindLibXml2)
++if(WITH_NETWORK_BACKEND)
++ # Since libxml2-2.9.2, libxml2 provides its own LibXml2-config.cmake, with all
++ # variables correctly set.
++ # So, try first to find the CMake module provided by libxml2 package, then fallback
++ # on the CMake's FindLibXml2.cmake module (which can lack some definition, especially
++ # in static build case).
++ find_package(LibXml2 QUIET NO_MODULE)
++ if(DEFINED LIBXML2_VERSION_STRING)
++ set(LIBXML2_FOUND ON)
++ set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS})
++ else()
++ include(FindLibXml2)
++ endif()
+endif()
set(LIBIIO_CFILES channel.c device.c context.c buffer.c utilities.c)
set(LIBIIO_HEADERS iio.h)
--
-2.2.1
+2.2.2
--
2.2.2
^ permalink raw reply related [flat|nested] 16+ messages in thread* [Buildroot] [PATCH 2/8] package/libiio: update cmake code for libxml2 detection
2015-01-25 21:13 ` [Buildroot] [PATCH 2/8] package/libiio: update cmake code for libxml2 detection Samuel Martin
@ 2015-01-27 21:16 ` Arnout Vandecappelle
2015-03-02 20:35 ` Samuel Martin
2015-02-14 21:15 ` Thomas Petazzoni
1 sibling, 1 reply; 16+ messages in thread
From: Arnout Vandecappelle @ 2015-01-27 21:16 UTC (permalink / raw)
To: buildroot
On 25/01/15 22:13, Samuel Martin wrote:
> Only check for libxml2 when it is needed.
>
> This prevents CMake from falling back on the libxml2-config.cmake
> installed on the host system (i.e. when libxml2 >=2.9.2 is part of the
> host system), but not enabled as a target package (i.e. not existing in
> the staging tree).
This is worrisome... I would hope that our cmake could be convinced never to
look in /usr/share/cmake when cross-compiling...
Regards,
Arnout
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[snip]
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2/8] package/libiio: update cmake code for libxml2 detection
2015-01-27 21:16 ` Arnout Vandecappelle
@ 2015-03-02 20:35 ` Samuel Martin
0 siblings, 0 replies; 16+ messages in thread
From: Samuel Martin @ 2015-03-02 20:35 UTC (permalink / raw)
To: buildroot
Hi Arnout, all,
On Tue, Jan 27, 2015 at 10:16 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 25/01/15 22:13, Samuel Martin wrote:
>> Only check for libxml2 when it is needed.
>>
>> This prevents CMake from falling back on the libxml2-config.cmake
>> installed on the host system (i.e. when libxml2 >=2.9.2 is part of the
>> host system), but not enabled as a target package (i.e. not existing in
>> the staging tree).
>
> This is worrisome... I would hope that our cmake could be convinced never to
> look in /usr/share/cmake when cross-compiling...
I finally found some time to check the cmake thing, and it turns out
that it is possible to control cmake to not searching outside of the
sysroot.
I'll cook a patch doing it and respin the series shortly, and reject this patch.
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2/8] package/libiio: update cmake code for libxml2 detection
2015-01-25 21:13 ` [Buildroot] [PATCH 2/8] package/libiio: update cmake code for libxml2 detection Samuel Martin
2015-01-27 21:16 ` Arnout Vandecappelle
@ 2015-02-14 21:15 ` Thomas Petazzoni
2015-02-14 23:33 ` Samuel Martin
1 sibling, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2015-02-14 21:15 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 25 Jan 2015 22:13:49 +0100, Samuel Martin wrote:
> Only check for libxml2 when it is needed.
>
> This prevents CMake from falling back on the libxml2-config.cmake
> installed on the host system (i.e. when libxml2 >=2.9.2 is part of the
> host system), but not enabled as a target package (i.e. not existing in
> the staging tree).
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
> ...l2-detection-try-first-the-CMake-module-f.patch | 40 +++++++++++++---------
> 1 file changed, 23 insertions(+), 17 deletions(-)
Is this fixing a bug happening in practice? I.e should it be applied to
master or next?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2/8] package/libiio: update cmake code for libxml2 detection
2015-02-14 21:15 ` Thomas Petazzoni
@ 2015-02-14 23:33 ` Samuel Martin
0 siblings, 0 replies; 16+ messages in thread
From: Samuel Martin @ 2015-02-14 23:33 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Sat, Feb 14, 2015 at 10:15 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Samuel Martin,
>
> On Sun, 25 Jan 2015 22:13:49 +0100, Samuel Martin wrote:
>> Only check for libxml2 when it is needed.
>>
>> This prevents CMake from falling back on the libxml2-config.cmake
>> installed on the host system (i.e. when libxml2 >=2.9.2 is part of the
>> host system), but not enabled as a target package (i.e. not existing in
>> the staging tree).
>>
>> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
>> ---
>> ...l2-detection-try-first-the-CMake-module-f.patch | 40 +++++++++++++---------
>> 1 file changed, 23 insertions(+), 17 deletions(-)
>
> Is this fixing a bug happening in practice? I.e should it be applied to
> master or next?
This patch does fix a bug here (that's why i explain the case triggering it).
For the branch to apply it, I let you judge, but libxml2-2.9.2 will
become more and more common. Archlinux already has it, the next
release of Ubuntu-15.04 and Fedora-22 include it (but debian Jessy
does not yet includes it); so if there is currently a few people
triggering this bug, they may be more by the time we release the
buildroot-2015.05.
BTW, I still have to check WRT Arnout's comment (how to tell cmake to
never look at /usr/share/cmake when cross-compiling).
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 3/8] package/libftdi: bump to version 0.20
2015-01-25 21:13 [Buildroot] [PATCH 0/8] Misc. fixes around libftdi Samuel Martin
2015-01-25 21:13 ` [Buildroot] [PATCH 1/8 v2] package/libftdi: fix libftdi.pc Samuel Martin
2015-01-25 21:13 ` [Buildroot] [PATCH 2/8] package/libiio: update cmake code for libxml2 detection Samuel Martin
@ 2015-01-25 21:13 ` Samuel Martin
2015-01-25 21:13 ` [Buildroot] [PATCH 4/8] package/libftdi1: new package Samuel Martin
` (4 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Samuel Martin @ 2015-01-25 21:13 UTC (permalink / raw)
To: buildroot
Also add *.hash file.
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/libftdi/libftdi.hash | 2 ++
package/libftdi/libftdi.mk | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 package/libftdi/libftdi.hash
diff --git a/package/libftdi/libftdi.hash b/package/libftdi/libftdi.hash
new file mode 100644
index 0000000..5d9f876
--- /dev/null
+++ b/package/libftdi/libftdi.hash
@@ -0,0 +1,2 @@
+# Locally computed (after checking the signature from http://www.intra2net.com/en/developer/libftdi/download.php)
+sha256 3176d5b5986438f33f5208e690a8bfe90941be501cc0a72118ce3d338d4b838e libftdi-0.20.tar.gz
diff --git a/package/libftdi/libftdi.mk b/package/libftdi/libftdi.mk
index 22d2616..8370b0a 100644
--- a/package/libftdi/libftdi.mk
+++ b/package/libftdi/libftdi.mk
@@ -4,7 +4,7 @@
#
################################################################################
-LIBFTDI_VERSION = 0.19
+LIBFTDI_VERSION = 0.20
LIBFTDI_SITE = http://www.intra2net.com/en/developer/libftdi/download
LIBFTDI_DEPENDENCIES = libusb-compat libusb
LIBFTDI_INSTALL_STAGING = YES
--
2.2.2
^ permalink raw reply related [flat|nested] 16+ messages in thread* [Buildroot] [PATCH 4/8] package/libftdi1: new package
2015-01-25 21:13 [Buildroot] [PATCH 0/8] Misc. fixes around libftdi Samuel Martin
` (2 preceding siblings ...)
2015-01-25 21:13 ` [Buildroot] [PATCH 3/8] package/libftdi: bump to version 0.20 Samuel Martin
@ 2015-01-25 21:13 ` Samuel Martin
2015-01-27 22:10 ` Arnout Vandecappelle
2015-01-25 21:13 ` [Buildroot] [PATCH 5/8] package/avrdude: depends on libftdi1 instead of libftdi Samuel Martin
` (3 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Samuel Martin @ 2015-01-25 21:13 UTC (permalink / raw)
To: buildroot
From: Daniel Sangue <daniel.sangue@sangue.ch>
This version of libftdi can coexists beside the 0.x version.
Signed-off-by: Daniel Sangue <daniel.sangue@sangue.ch>
[Samuel Martin:
- libftdi1.mk: bump to version 1.2 and add hash
- cleanup uneeded libusb-compat stuff
- Config.in: add comment when ftdipp1 deps are not met
- fix typos in variable names and legit CMake options for *_CONF_OPTS
- add support for python bindings and ftdi_eeprom
- fix static build
- fix build with toolchain w/o C++ support
]
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
change v1->v2
- rebase on top of master
- libftdi1.mk: bump to version 1.2
- add hash
- Config.in: cleanup deps for ftdipp1
- Config.in: add comment when ftdipp1 deps are not met
- libftdi1.mk: fix typos in LIBFTDI1_CONF_OPTS variable name
- libftdi1.mk: use proper CMake options for *_CONF_OPTS
- libftdi1.mk: update libftdi1 deps and conf. opts.
- libftdi1.mk: add support for python bindings and ftdi_eeprom
- libftdi1.mk: add patch fixing static build
- libftdi1.mk: add patch fixing FindUSB1.cmake module (for static build)
- libftdi1.mk: add patch correctly disabling ftdipp when the toolchain
does not install libstdc++
- reword commit message
---
package/Config.in | 1 +
...he-standard-CMake-flag-to-drive-the-share.patch | 96 ++++++++++++++++++++++
.../libftdi1/0002-cmake-fix-FindUSB1.cmake.patch | 34 ++++++++
...o-not-check-for-g-when-FTDIPP-is-disabled.patch | 46 +++++++++++
package/libftdi1/Config.in | 37 +++++++++
package/libftdi1/libftdi1.hash | 2 +
package/libftdi1/libftdi1.mk | 38 +++++++++
7 files changed, 254 insertions(+)
create mode 100644 package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
create mode 100644 package/libftdi1/0002-cmake-fix-FindUSB1.cmake.patch
create mode 100644 package/libftdi1/0003-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch
create mode 100644 package/libftdi1/Config.in
create mode 100644 package/libftdi1/libftdi1.hash
create mode 100644 package/libftdi1/libftdi1.mk
diff --git a/package/Config.in b/package/Config.in
index 5f6ebc2..443030a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -721,6 +721,7 @@ menu "Hardware handling"
source "package/libcec/Config.in"
source "package/libfreefare/Config.in"
source "package/libftdi/Config.in"
+ source "package/libftdi1/Config.in"
source "package/libhid/Config.in"
source "package/libiio/Config.in"
source "package/libinput/Config.in"
diff --git a/package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch b/package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
new file mode 100644
index 0000000..487fc28
--- /dev/null
+++ b/package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
@@ -0,0 +1,96 @@
+From 7e57ff280b55b45e74329b9988279e8831d32eab Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 25 Jan 2015 09:45:04 +0100
+Subject: [PATCH 1/2] cmake: use the standard CMake flag to drive the shared
+ object build
+
+Remove the STATICLIBS CMake option (and the code handling it) and let
+the standard CMake flags drive the shared object build.
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ CMakeLists.txt | 2 --
+ ftdipp/CMakeLists.txt | 15 +--------------
+ src/CMakeLists.txt | 13 +------------
+ 3 files changed, 2 insertions(+), 28 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 74f80f4..0ba0b08 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -46,8 +46,6 @@ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development")
+ set(CPACK_COMPONENT_STATICLIBS_GROUP "Development")
+ set(CPACK_COMPONENT_HEADERS_GROUP "Development")
+
+-option ( STATICLIBS "Build static libraries" ON )
+-
+ # guess LIB_SUFFIX, don't take debian multiarch into account
+ if ( NOT DEFINED LIB_SUFFIX )
+ if( CMAKE_SYSTEM_NAME MATCHES "Linux"
+diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt
+index 7500211..27e7884 100644
+--- a/ftdipp/CMakeLists.txt
++++ b/ftdipp/CMakeLists.txt
+@@ -23,8 +23,7 @@ if (FTDIPP)
+ set(FTDI_BUILD_CPP True PARENT_SCOPE)
+ message(STATUS "Building libftdi1++")
+
+- # Shared library
+- add_library(ftdipp1 SHARED ${cpp_sources})
++ add_library(ftdipp1 ${cpp_sources})
+
+ math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases
+ set_target_properties(ftdipp1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
+@@ -41,18 +40,6 @@ if (FTDIPP)
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
+ )
+-
+- # Static library
+- if ( STATICLIBS )
+- add_library(ftdipp1-static STATIC ${cpp_sources})
+- set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME "ftdipp1")
+- set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+-
+- install ( TARGETS ftdipp1-static
+- ARCHIVE DESTINATION lib${LIB_SUFFIX}
+- COMPONENT staticlibs
+- )
+- endif ()
+
+ install ( FILES ${cpp_headers}
+ DESTINATION include/${PROJECT_NAME}
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 9fd86a6..501d4a8 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -21,7 +21,7 @@ configure_file(ftdi_version_i.h.in "${CMAKE_CURRENT_BINARY_DIR}/ftdi_version_i.h
+ set(c_sources ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.c ${CMAKE_CURRENT_SOURCE_DIR}/ftdi_stream.c CACHE INTERNAL "List of c sources" )
+ set(c_headers ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.h CACHE INTERNAL "List of c headers" )
+
+-add_library(ftdi1 SHARED ${c_sources})
++add_library(ftdi1 ${c_sources})
+
+ math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases
+ set_target_properties(ftdi1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
+@@ -38,17 +38,6 @@ install ( TARGETS ftdi1
+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
+ )
+
+-if ( STATICLIBS )
+- add_library(ftdi1-static STATIC ${c_sources})
+- target_link_libraries(ftdi1-static ${LIBUSB_LIBRARIES})
+- set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1")
+- set_target_properties(ftdi1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+- install ( TARGETS ftdi1-static
+- ARCHIVE DESTINATION lib${LIB_SUFFIX}
+- COMPONENT staticlibs
+- )
+-endif ()
+-
+ install ( FILES ${c_headers}
+ DESTINATION include/${PROJECT_NAME}
+ COMPONENT headers
+--
+2.2.2
+
diff --git a/package/libftdi1/0002-cmake-fix-FindUSB1.cmake.patch b/package/libftdi1/0002-cmake-fix-FindUSB1.cmake.patch
new file mode 100644
index 0000000..5619a0c
--- /dev/null
+++ b/package/libftdi1/0002-cmake-fix-FindUSB1.cmake.patch
@@ -0,0 +1,34 @@
+From 81275d75ae88fe8ab1915d3ba260ea935e63c362 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 25 Jan 2015 10:01:17 +0100
+Subject: [PATCH 2/2] cmake: fix FindUSB1.cmake
+
+Make sure all ldflags are correctly set, especially for static build.
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ cmake/FindUSB1.cmake | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/FindUSB1.cmake b/cmake/FindUSB1.cmake
+index b90e297..e7f1b3c 100644
+--- a/cmake/FindUSB1.cmake
++++ b/cmake/FindUSB1.cmake
+@@ -26,8 +26,12 @@ else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
+ PATH_SUFFIXES libusb-1.0
+ PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS})
+
+- FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0
+- PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
++ set(LIBUSB_LIBRARIES ${PC_LIBUSB_STATIC_LDFLAGS} ${PC_LIBUSB_STATIC_LDFLAGS_OTHER})
++ foreach(libname ${PC_LIBUSB_STATIC_LIBRARIES})
++ FIND_LIBRARY(lib NAMES ${libname}
++ PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
++ list(APPEND LIBUSB_LIBRARIES ${lib})
++ endforeach()
+
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR)
+--
+2.2.2
+
diff --git a/package/libftdi1/0003-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch b/package/libftdi1/0003-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch
new file mode 100644
index 0000000..be0913d
--- /dev/null
+++ b/package/libftdi1/0003-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch
@@ -0,0 +1,46 @@
+From c215d5ecd985b57700e817920d0e99112b4a571b Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 25 Jan 2015 13:35:24 +0100
+Subject: [PATCH] cmake: do not check for g++ when FTDIPP is disabled
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ CMakeLists.txt | 6 ++++--
+ ftdipp/CMakeLists.txt | 1 +
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0ba0b08..e880211 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ # Project
+-project(libftdi1)
++project(libftdi1 C)
+ set(MAJOR_VERSION 1)
+ set(MINOR_VERSION 2)
+ set(PACKAGE libftdi1)
+@@ -145,7 +145,9 @@ else(DOCUMENTATION AND DOXYGEN_FOUND)
+ endif(DOCUMENTATION AND DOXYGEN_FOUND)
+
+ add_subdirectory(src)
+-add_subdirectory(ftdipp)
++if(FTDIPP)
++ add_subdirectory(ftdipp)
++endif()
+ add_subdirectory(python)
+ add_subdirectory(ftdi_eeprom)
+ add_subdirectory(examples)
+diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt
+index 27e7884..2d080f4 100644
+--- a/ftdipp/CMakeLists.txt
++++ b/ftdipp/CMakeLists.txt
+@@ -1,4 +1,5 @@
+ # Check
++project(libftdipp1 C CXX)
+ set(FTDI_BUILD_CPP False PARENT_SCOPE)
+
+ option ( FTDIPP "Build C++ binding library libftdi1++" ON )
+--
+2.2.2
+
diff --git a/package/libftdi1/Config.in b/package/libftdi1/Config.in
new file mode 100644
index 0000000..1bb0bfd
--- /dev/null
+++ b/package/libftdi1/Config.in
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_LIBFTDI1
+ bool "libftdi1"
+ depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
+ select BR2_PACKAGE_LIBUSB
+ help
+ Userspace access to FTDI USB interface chips (version 1.x)
+
+ http://www.intra2net.com/en/developer/libftdi/index.php
+
+if BR2_PACKAGE_LIBFTDI1
+
+config BR2_PACKAGE_LIBTFDI1_LIBFTDIPP1
+ depends on BR2_INSTALL_LIBSTDCPP # boost
+ depends on BR2_LARGEFILE # boost
+ depends on BR2_TOOLCHAIN_HAS_THREADS # boost
+ select BR2_PACKAGE_BOOST
+ bool "libfdtipp1"
+ help
+ C++ bindings for libftdi
+
+comment "libfdtipp1 needs a toolchain w/ C++, largefile, threads"
+ depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_LIBTFDI1_PYTHON_BINDINGS
+ depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
+ bool "python bindings"
+ help
+ Python bindings for libftdi
+
+config BR2_PACKAGE_LIBTFDI1_FDTI_EEPROM
+ select BR2_PACKAGE_LIBCONFUSE
+ bool "ftdi_eeprom tool"
+
+endif # BR2_PACKAGE_LIBFTDI1
+
+comment "libftdi1 needs a toolchain w/ threads"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/libftdi1/libftdi1.hash b/package/libftdi1/libftdi1.hash
new file mode 100644
index 0000000..e53bc8f
--- /dev/null
+++ b/package/libftdi1/libftdi1.hash
@@ -0,0 +1,2 @@
+# Locally computed (after checking the signature from http://www.intra2net.com/en/developer/libftdi/download.php)
+sha256 a6ea795c829219015eb372b03008351cee3fb39f684bff3bf8a4620b558488d6 libftdi1-1.2.tar.bz2
diff --git a/package/libftdi1/libftdi1.mk b/package/libftdi1/libftdi1.mk
new file mode 100644
index 0000000..59b1732
--- /dev/null
+++ b/package/libftdi1/libftdi1.mk
@@ -0,0 +1,38 @@
+################################################################################
+#
+# libftdi1
+#
+################################################################################
+
+LIBFTDI1_VERSION = 1.2
+LIBFTDI1_SOURCE = libftdi1-$(LIBFTDI1_VERSION).tar.bz2
+LIBFTDI1_SITE = http://www.intra2net.com/en/developer/libftdi/download/
+LIBFTDI1_INSTALL_STAGING = YES
+LIBFTDI1_DEPENDENCIES = libusb
+LIBFTDI1_CONF_OPTS = -DDOCUMENTATION=OFF -DEXAMPLES=OFF
+
+ifeq ($(BR2_PACKAGE_LIBTFDI1_LIBFTDIPP1),y)
+LIBFTDI1_DEPENDENCIES += boost
+LIBFTDI1_CONF_OPTS += -DFTDIPP=ON
+else
+LIBFTDI1_CONF_OPTS += -DFTDIPP=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_LIBTFDI1_PYTHON_BINDINGS),y)
+LIBFTDI1_DEPENDENCIES += $(if BR2_PACKAGE_PYTHON,python,python3) host-swig
+LIBFTDI1_CONF_OPTS += -DPYTHON_BINDINGS=ON
+else
+LIBFTDI1_CONF_OPTS += -DPYTHON_BINDINGS=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_LIBTFDI1_FDTI_EEPROM),y)
+# ftdi_eeprom optionally depends on libintl, so make sure gettext is built
+# _before_ libfitdi1 when gettext is enbaled.
+LIBFTDI1_DEPENDENCIES += libconfuse $(if $(BR2_PACKAGE_GETTEXT),gettext)
+LIBFTDI1_CONF_OPTS += -DFTDI_EEPROM=ON
+else
+LIBFTDI1_CONF_OPTS += -DFTDI_EEPROM=OFF
+endif
+
+$(eval $(cmake-package))
+
--
2.2.2
^ permalink raw reply related [flat|nested] 16+ messages in thread* [Buildroot] [PATCH 4/8] package/libftdi1: new package
2015-01-25 21:13 ` [Buildroot] [PATCH 4/8] package/libftdi1: new package Samuel Martin
@ 2015-01-27 22:10 ` Arnout Vandecappelle
0 siblings, 0 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2015-01-27 22:10 UTC (permalink / raw)
To: buildroot
On 25/01/15 22:13, Samuel Martin wrote:
> From: Daniel Sangue <daniel.sangue@sangue.ch>
>
> This version of libftdi can coexists beside the 0.x version.
Perhaps this can be mentioned in the help text as well.
[snip]
> diff --git a/package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch b/package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
> new file mode 100644
> index 0000000..487fc28
> --- /dev/null
> +++ b/package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
> @@ -0,0 +1,96 @@
> +From 7e57ff280b55b45e74329b9988279e8831d32eab Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +Date: Sun, 25 Jan 2015 09:45:04 +0100
> +Subject: [PATCH 1/2] cmake: use the standard CMake flag to drive the shared
> + object build
> +
> +Remove the STATICLIBS CMake option (and the code handling it) and let
> +the standard CMake flags drive the shared object build.
Can upstream be convinced to take this patch?
[snip]
> diff --git a/package/libftdi1/Config.in b/package/libftdi1/Config.in
> new file mode 100644
> index 0000000..1bb0bfd
> --- /dev/null
> +++ b/package/libftdi1/Config.in
> @@ -0,0 +1,37 @@
> +config BR2_PACKAGE_LIBFTDI1
> + bool "libftdi1"
> + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
> + select BR2_PACKAGE_LIBUSB
> + help
> + Userspace access to FTDI USB interface chips (version 1.x)
> +
> + http://www.intra2net.com/en/developer/libftdi/index.php
> +
> +if BR2_PACKAGE_LIBFTDI1
> +
> +config BR2_PACKAGE_LIBTFDI1_LIBFTDIPP1
> + depends on BR2_INSTALL_LIBSTDCPP # boost
> + depends on BR2_LARGEFILE # boost
> + depends on BR2_TOOLCHAIN_HAS_THREADS # boost
> + select BR2_PACKAGE_BOOST
> + bool "libfdtipp1"
> + help
> + C++ bindings for libftdi
> +
> +comment "libfdtipp1 needs a toolchain w/ C++, largefile, threads"
> + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
> +
> +config BR2_PACKAGE_LIBTFDI1_PYTHON_BINDINGS
> + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
> + bool "python bindings"
> + help
> + Python bindings for libftdi
I wonder if it's worthwhile to make this configurable. Do the bindings occupy
significant space or take a long time to build?
But basically I have no important comments, so
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Regards,
Arnout
> +
> +config BR2_PACKAGE_LIBTFDI1_FDTI_EEPROM
> + select BR2_PACKAGE_LIBCONFUSE
> + bool "ftdi_eeprom tool"
> +
> +endif # BR2_PACKAGE_LIBFTDI1
> +
> +comment "libftdi1 needs a toolchain w/ threads"
> + depends on !BR2_TOOLCHAIN_HAS_THREADS
[snip]
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 5/8] package/avrdude: depends on libftdi1 instead of libftdi
2015-01-25 21:13 [Buildroot] [PATCH 0/8] Misc. fixes around libftdi Samuel Martin
` (3 preceding siblings ...)
2015-01-25 21:13 ` [Buildroot] [PATCH 4/8] package/libftdi1: new package Samuel Martin
@ 2015-01-25 21:13 ` Samuel Martin
2015-01-25 21:13 ` [Buildroot] [PATCH 6/8] package/openocd: " Samuel Martin
` (2 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Samuel Martin @ 2015-01-25 21:13 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/avrdude/avrdude.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/avrdude/avrdude.mk b/package/avrdude/avrdude.mk
index 03d6490..a4e0ebd 100644
--- a/package/avrdude/avrdude.mk
+++ b/package/avrdude/avrdude.mk
@@ -17,8 +17,8 @@ AVRDUDE_DEPENDENCIES = elfutils libusb libusb-compat ncurses \
AVRDUDE_LICENSE = GPLv2+
AVRDUDE_LICENSE_FILES = avrdude/COPYING
-ifeq ($(BR2_PACKAGE_LIBFTDI),y)
-AVRDUDE_DEPENDENCIES += libftdi
+ifeq ($(BR2_PACKAGE_LIBFTDI1),y)
+AVRDUDE_DEPENDENCIES += libftdi1
endif
# if /etc/avrdude.conf exists, the installation process creates a
--
2.2.2
^ permalink raw reply related [flat|nested] 16+ messages in thread* [Buildroot] [PATCH 6/8] package/openocd: depends on libftdi1 instead of libftdi
2015-01-25 21:13 [Buildroot] [PATCH 0/8] Misc. fixes around libftdi Samuel Martin
` (4 preceding siblings ...)
2015-01-25 21:13 ` [Buildroot] [PATCH 5/8] package/avrdude: depends on libftdi1 instead of libftdi Samuel Martin
@ 2015-01-25 21:13 ` Samuel Martin
2015-01-25 21:13 ` [Buildroot] [PATCH 7/8] package/cmake: bump to version 3.1.1 Samuel Martin
2015-01-25 21:13 ` [Buildroot] [PATCH 8/8] package/cmake: only build what is necessary Samuel Martin
7 siblings, 0 replies; 16+ messages in thread
From: Samuel Martin @ 2015-01-25 21:13 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/openocd/Config.in | 8 ++++----
package/openocd/openocd.mk | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/package/openocd/Config.in b/package/openocd/Config.in
index 7c140c7..2db17fa 100644
--- a/package/openocd/Config.in
+++ b/package/openocd/Config.in
@@ -121,7 +121,7 @@ config BR2_PACKAGE_OPENOCD_PARPORT
config BR2_PACKAGE_OPENOCD_FT2XXX
bool "FT2232 based devices (DEPRECATED)"
- select BR2_PACKAGE_LIBFTDI
+ select BR2_PACKAGE_LIBFTDI1
depends on BR2_TOOLCHAIN_HAS_THREADS # libftdi -> libusb
depends on BR2_ARCH_HAS_ATOMICS
help
@@ -135,7 +135,7 @@ config BR2_PACKAGE_OPENOCD_VPI
config BR2_PACKAGE_OPENOCD_UBLASTER
bool "Altera USB-Blaster"
- select BR2_PACKAGE_LIBFTDI
+ select BR2_PACKAGE_LIBFTDI1
depends on BR2_TOOLCHAIN_HAS_THREADS # libftdi -> libusb
depends on BR2_ARCH_HAS_ATOMICS
help
@@ -176,7 +176,7 @@ config BR2_PACKAGE_OPENOCD_GW16012
config BR2_PACKAGE_OPENOCD_PRESTO
bool "ASIX Presto Programmer"
- select BR2_PACKAGE_LIBFTDI
+ select BR2_PACKAGE_LIBFTDI1
depends on BR2_TOOLCHAIN_HAS_THREADS # libftdi -> libusb
depends on BR2_ARCH_HAS_ATOMICS
help
@@ -185,7 +185,7 @@ config BR2_PACKAGE_OPENOCD_PRESTO
config BR2_PACKAGE_OPENOCD_OPENJTAG
bool "OpenJTAG Programmer"
- select BR2_PACKAGE_LIBFTDI
+ select BR2_PACKAGE_LIBFTDI1
depends on BR2_TOOLCHAIN_HAS_THREADS # libftdi -> libusb
depends on BR2_ARCH_HAS_ATOMICS
help
diff --git a/package/openocd/openocd.mk b/package/openocd/openocd.mk
index fd7e09f..4023af8 100644
--- a/package/openocd/openocd.mk
+++ b/package/openocd/openocd.mk
@@ -23,7 +23,7 @@ OPENOCD_CONF_OPTS = \
# the dependencies they need.
OPENOCD_DEPENDENCIES = \
- $(if $(BR2_PACKAGE_LIBFTDI),libftdi) \
+ $(if $(BR2_PACKAGE_LIBFTDI),libftdi1) \
$(if $(BR2_PACKAGE_LIBUSB),libusb) \
$(if $(BR2_PACKAGE_LIBUSB_COMPAT),libusb-compat) \
$(if $(BR2_PACKAGE_LIBHID),libhid)
--
2.2.2
^ permalink raw reply related [flat|nested] 16+ messages in thread* [Buildroot] [PATCH 7/8] package/cmake: bump to version 3.1.1
2015-01-25 21:13 [Buildroot] [PATCH 0/8] Misc. fixes around libftdi Samuel Martin
` (5 preceding siblings ...)
2015-01-25 21:13 ` [Buildroot] [PATCH 6/8] package/openocd: " Samuel Martin
@ 2015-01-25 21:13 ` Samuel Martin
2015-01-25 21:13 ` [Buildroot] [PATCH 8/8] package/cmake: only build what is necessary Samuel Martin
7 siblings, 0 replies; 16+ messages in thread
From: Samuel Martin @ 2015-01-25 21:13 UTC (permalink / raw)
To: buildroot
Also add *.hash.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/cmake/cmake.hash | 2 ++
package/cmake/cmake.mk | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
create mode 100644 package/cmake/cmake.hash
diff --git a/package/cmake/cmake.hash b/package/cmake/cmake.hash
new file mode 100644
index 0000000..e13b6e9
--- /dev/null
+++ b/package/cmake/cmake.hash
@@ -0,0 +1,2 @@
+# Locally computed
+# sha256 b58694e545d51cde5756a894f53107e3d9e469360e1d92e7f6892b55ebc0bebf cmake-3.1.1.tar.gz
diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk
index e09fddf..14d5a4e 100644
--- a/package/cmake/cmake.mk
+++ b/package/cmake/cmake.mk
@@ -4,8 +4,8 @@
#
################################################################################
-CMAKE_VERSION_MAJOR = 3.0
-CMAKE_VERSION = $(CMAKE_VERSION_MAJOR).2
+CMAKE_VERSION_MAJOR = 3.1
+CMAKE_VERSION = $(CMAKE_VERSION_MAJOR).1
CMAKE_SITE = http://www.cmake.org/files/v$(CMAKE_VERSION_MAJOR)
CMAKE_LICENSE = BSD-3c
CMAKE_LICENSE_FILES = Copyright.txt
--
2.2.2
^ permalink raw reply related [flat|nested] 16+ messages in thread* [Buildroot] [PATCH 8/8] package/cmake: only build what is necessary
2015-01-25 21:13 [Buildroot] [PATCH 0/8] Misc. fixes around libftdi Samuel Martin
` (6 preceding siblings ...)
2015-01-25 21:13 ` [Buildroot] [PATCH 7/8] package/cmake: bump to version 3.1.1 Samuel Martin
@ 2015-01-25 21:13 ` Samuel Martin
2015-03-04 23:30 ` Romain Naour
7 siblings, 1 reply; 16+ messages in thread
From: Samuel Martin @ 2015-01-25 21:13 UTC (permalink / raw)
To: buildroot
Add a patch allowing to select the binaries to be built.
After applying this change, the time to build host-cmake is roughly
25% shorter.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Here is the actual results of the build I run on my machine:
4x Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz
8GB RAM
SSD
w/o the patch, automatic job-level (i.e. 5 in my case):
675.36user 29.59system 4:21.72elapsed 269%CPU
686.98user 31.07system 4:26.85elapsed 269%CPU
694.84user 31.11system 4:35.42elapsed 263%CPU
697.24user 31.19system 4:32.17elapsed 267%CPU
686.62user 30.89system 4:23.00elapsed 272%CPU
696.28user 31.33system 4:29.15elapsed 270%CPU
677.73user 30.18system 4:15.15elapsed 277%CPU
692.62user 31.45system 4:47.56elapsed 251%CPU
679.78user 31.53system 4:20.99elapsed 272%CPU
685.63user 32.10system 4:28.15elapsed 267%CPU
w/o the patch, w/ BR2_JLEVEL=1:
340.58user 18.57system 6:19.26elapsed 94%CPU
337.48user 18.70system 6:16.41elapsed 94%CPU
335.39user 18.53system 6:13.74elapsed 94%CPU
335.93user 17.94system 6:13.84elapsed 94%CPU
335.49user 18.19system 6:13.67elapsed 94%CPU
w/ the patch, automatic job-level (i.e. 5 in my case):
494.96user 23.91system 3:13.87elapsed 267%CPU
506.90user 24.37system 3:16.83elapsed 269%CPU
504.37user 24.42system 3:17.57elapsed 267%CPU
499.79user 24.19system 3:04.50elapsed 284%CPU
507.02user 23.67system 3:04.93elapsed 286%CPU
510.93user 24.43system 3:08.19elapsed 284%CPU
512.43user 24.16system 3:08.53elapsed 284%CPU
510.80user 24.65system 3:08.64elapsed 283%CPU
512.28user 24.38system 3:09.62elapsed 283%CPU
514.90user 24.46system 3:08.96elapsed 285%CPU
w/ the patch, w/ BR2_JLEVEL=1:
244.56user 14.88system 4:36.88elapsed 93%CPU
247.02user 15.43system 4:39.89elapsed 93%CPU
247.14user 15.04system 4:39.76elapsed 93%CPU
246.32user 14.75system 4:38.93elapsed 93%CPU
247.53user 14.64system 4:40.27elapsed 93%CPU
---
...-allow-to-select-what-program-to-be-built.patch | 231 +++++++++++++++++++++
package/cmake/cmake.mk | 4 +
2 files changed, 235 insertions(+)
create mode 100644 package/cmake/0001-CMake-allow-to-select-what-program-to-be-built.patch
diff --git a/package/cmake/0001-CMake-allow-to-select-what-program-to-be-built.patch b/package/cmake/0001-CMake-allow-to-select-what-program-to-be-built.patch
new file mode 100644
index 0000000..d6e53da
--- /dev/null
+++ b/package/cmake/0001-CMake-allow-to-select-what-program-to-be-built.patch
@@ -0,0 +1,231 @@
+From 9aeb3ea5f9c69bbc9a69672762d5fae939c3fd8c Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 25 Jan 2015 18:11:13 +0100
+Subject: [PATCH] CMake: allow to select what program to be built
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ CMakeLists.txt | 24 ++++++++++++++++++++++++
+ Source/CMakeLists.txt | 33 ++++++++++++++++++++++++++++++++-
+ 2 files changed, 56 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 71850de..cb9375e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -43,6 +43,16 @@ if(CMAKE_ENCODING_UTF8)
+ set(KWSYS_ENCODING_DEFAULT_CODEPAGE CP_UTF8)
+ endif()
+
++# options to select what programs to be built
++option(BUILD_CMAKE "Build cmake program" ON)
++mark_as_advanced(BUILD_CMAKE)
++
++option(BUILD_CTEST "Build ctest program" ON)
++mark_as_advanced(BUILD_CTEST)
++
++option(BUILD_CPACK "Build cpack program" ON)
++mark_as_advanced(BUILD_CPACK)
++
+ #-----------------------------------------------------------------------
+ # a macro to deal with system libraries, implemented as a macro
+ # simply to improve readability of the main script
+@@ -241,6 +251,7 @@ macro (CMAKE_BUILD_UTILITIES)
+
+ #---------------------------------------------------------------------
+ # Build zlib library for Curl, CMake, and CTest.
++ if(BUILD_CMAKE OR BUILD_CTEST OR NOT CMAKE_USE_SYSTEM_CURL)
+ set(CMAKE_ZLIB_HEADER "cm_zlib.h")
+ if(CMAKE_USE_SYSTEM_ZLIB)
+ find_package(ZLIB)
+@@ -256,9 +267,11 @@ macro (CMAKE_BUILD_UTILITIES)
+ add_subdirectory(Utilities/cmzlib)
+ CMAKE_SET_TARGET_FOLDER(cmzlib "Utilities/3rdParty")
+ endif()
++ endif()
+
+ #---------------------------------------------------------------------
+ # Build Curl library for CTest.
++ if(BUILD_CMAKE OR BUILD_CTEST)
+ if(CMAKE_USE_SYSTEM_CURL)
+ find_package(CURL)
+ if(NOT CURL_FOUND)
+@@ -284,9 +297,11 @@ macro (CMAKE_BUILD_UTILITIES)
+ CMAKE_SET_TARGET_FOLDER(cmcurl "Utilities/3rdParty")
+ CMAKE_SET_TARGET_FOLDER(LIBCURL "Utilities/3rdParty")
+ endif()
++ endif()
+
+ #---------------------------------------------------------------------
+ # Build Compress library for CTest.
++ if(BUILD_CMAKE OR BUILD_CTEST)
+ set(CMAKE_COMPRESS_INCLUDES
+ "${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmcompress")
+ set(CMAKE_COMPRESS_LIBRARIES "cmcompress")
+@@ -301,6 +316,7 @@ macro (CMAKE_BUILD_UTILITIES)
+ add_subdirectory(Utilities/cmbzip2)
+ CMAKE_SET_TARGET_FOLDER(cmbzip2 "Utilities/3rdParty")
+ endif()
++ endif()
+
+ #---------------------------------------------------------------------
+ # Build or use system liblzma for libarchive.
+@@ -321,6 +337,7 @@ macro (CMAKE_BUILD_UTILITIES)
+
+ #---------------------------------------------------------------------
+ # Build or use system libarchive for CMake and CTest.
++ if(BUILD_CMAKE OR BUILD_CTEST)
+ if(CMAKE_USE_SYSTEM_LIBARCHIVE)
+ find_package(LibArchive)
+ if(NOT LibArchive_FOUND)
+@@ -347,9 +364,11 @@ macro (CMAKE_BUILD_UTILITIES)
+ CMAKE_SET_TARGET_FOLDER(cmlibarchive "Utilities/3rdParty")
+ set(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES})
+ endif()
++ endif()
+
+ #---------------------------------------------------------------------
+ # Build expat library for CMake and CTest.
++ if(BUILD_CMAKE OR BUILD_CTEST)
+ if(CMAKE_USE_SYSTEM_EXPAT)
+ find_package(EXPAT)
+ if(NOT EXPAT_FOUND)
+@@ -364,9 +383,11 @@ macro (CMAKE_BUILD_UTILITIES)
+ add_subdirectory(Utilities/cmexpat)
+ CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty")
+ endif()
++ endif()
+
+ #---------------------------------------------------------------------
+ # Build XMLRPC library for CMake and CTest.
++ if(BUILD_CMAKE OR BUILD_CTEST)
+ if(CTEST_USE_XMLRPC)
+ find_package(XMLRPC QUIET REQUIRED libwww-client)
+ if(NOT XMLRPC_FOUND)
+@@ -376,6 +397,7 @@ macro (CMAKE_BUILD_UTILITIES)
+ set(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS})
+ set(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES})
+ endif()
++ endif()
+
+ #---------------------------------------------------------------------
+ # Use curses?
+@@ -583,7 +605,9 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
+ add_subdirectory(Utilities)
+ endif()
+
++if(BUILD_CTEST)
+ add_subdirectory(Tests)
++endif()
+
+ if(NOT CMake_TEST_EXTERNAL_CMAKE)
+ if(BUILD_TESTING)
+diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
+index f9405b3..2e14def 100644
+--- a/Source/CMakeLists.txt
++++ b/Source/CMakeLists.txt
+@@ -481,6 +481,7 @@ if(WIN32 AND NOT CYGWIN AND NOT BORLAND)
+ endif()
+
+ # create a library used by the command line and the GUI
++if(BUILD_CMAKE)
+ add_library(CMakeLib ${SRCS})
+ target_link_libraries(CMakeLib cmsys
+ ${CMAKE_EXPAT_LIBRARIES} ${CMAKE_ZLIB_LIBRARIES}
+@@ -496,6 +497,7 @@ endif()
+ if(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW)
+ target_link_libraries(CMakeLib rpcrt4)
+ endif()
++endif()
+
+ #
+ # CTestLib
+@@ -565,8 +567,10 @@ set(CTEST_SRCS cmCTest.cxx
+ )
+
+ # Build CTestLib
++if(BUILD_CTEST)
+ add_library(CTestLib ${CTEST_SRCS})
+ target_link_libraries(CTestLib CMakeLib ${CMAKE_CURL_LIBRARIES} ${CMAKE_XMLRPC_LIBRARIES})
++endif()
+
+ #
+ # Sources for CPack
+@@ -628,9 +632,12 @@ if(APPLE)
+ endif()
+
+ # Build CPackLib
++if(BUILD_CPACK)
+ add_library(CPackLib ${CPACK_SRCS})
+ target_link_libraries(CPackLib CMakeLib)
++endif()
+
++if(BUILD_CMAKE)
+ if(APPLE)
+ add_executable(cmakexbuild cmakexbuild.cxx)
+ target_link_libraries(cmakexbuild CMakeLib)
+@@ -639,36 +646,60 @@ if(APPLE)
+ target_link_libraries(OSXScriptLauncher cmsys)
+ target_link_libraries(OSXScriptLauncher "-framework CoreFoundation")
+ endif()
++endif()
+
+ # Build CMake executable
++if(BUILD_CMAKE)
+ add_executable(cmake cmakemain.cxx cmcmd.cxx cmcmd.h)
+ target_link_libraries(cmake CMakeLib)
++endif()
+
+ # Build CTest executable
++if(BUILD_CTEST)
+ add_executable(ctest ctest.cxx)
+ target_link_libraries(ctest CTestLib)
++endif()
+
+ # Build CPack executable
++if(BUILD_CPACK)
+ add_executable(cpack CPack/cpack.cxx)
+ target_link_libraries(cpack CPackLib)
++endif()
+
+ # Curses GUI
++if(BUILD_CMAKE)
+ if(BUILD_CursesDialog)
+ include(${CMake_SOURCE_DIR}/Source/CursesDialog/CMakeLists.txt)
+ endif()
++endif()
+
+ # Qt GUI
+ option(BUILD_QtDialog "Build Qt dialog for CMake" FALSE)
++if(BUILD_CMAKE)
+ if(BUILD_QtDialog)
+ add_subdirectory(QtDialog)
+ endif()
++endif()
+
+ include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
+ include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
+
+-install(TARGETS cmake ctest cpack DESTINATION bin)
++if(BUILD_CMAKE)
++install(TARGETS cmake DESTINATION bin)
++endif()
++
++if(BUILD_CTEST)
++install(TARGETS ctest DESTINATION bin)
++endif()
++
++if(BUILD_CPACK)
++install(TARGETS cpack DESTINATION bin)
++endif()
++
++if(BUILD_CMAKE)
+ if(APPLE)
+ install(TARGETS cmakexbuild DESTINATION bin)
+ endif()
++endif()
+
+ install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include)
+--
+2.2.2
+
diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk
index 14d5a4e..664885f 100644
--- a/package/cmake/cmake.mk
+++ b/package/cmake/cmake.mk
@@ -22,6 +22,10 @@ define HOST_CMAKE_CONFIGURE_CMDS
-DCMAKE_CXX_FLAGS="$(HOST_CXXFLAGS)" \
-DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)" \
-DBUILD_CursesDialog=OFF \
+ -DBUILD_CMAKE=ON \
+ -DBUILD_CTEST=OFF \
+ -DBUILD_CPACK=OFF \
+ -DBUILD_TESTING=OFF \
)
endef
--
2.2.2
^ permalink raw reply related [flat|nested] 16+ messages in thread* [Buildroot] [PATCH 8/8] package/cmake: only build what is necessary
2015-01-25 21:13 ` [Buildroot] [PATCH 8/8] package/cmake: only build what is necessary Samuel Martin
@ 2015-03-04 23:30 ` Romain Naour
0 siblings, 0 replies; 16+ messages in thread
From: Romain Naour @ 2015-03-04 23:30 UTC (permalink / raw)
To: buildroot
Hi Samuel,
Le 25/01/2015 22:13, Samuel Martin a ?crit :
> Add a patch allowing to select the binaries to be built.
>
> After applying this change, the time to build host-cmake is roughly
> 25% shorter.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
>
> ---
Here are my results without and with your patch:
without the patch BR2_JLEVEL=1:
real 4m59.761s user 3m46.531s sys 0m24.404s
without the patch BR2_JLEVEL=5:
real 3m25.126s user 4m2.761s sys 0m24.406s
With the patch BR2_JLEVEL=1:
real 3m37.735s user 2m45.789s sys 0m18.675s
With the patch BR2_JLEVEL=5:
real 2m31.274s user 2m58.932s sys 0m18.779s
Reviewed-by: Romain Naour <romain.naour@openwide.fr>
Tested-by: Romain Naour <romain.naour@openwide.fr>
> Here is the actual results of the build I run on my machine:
>
> 4x Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz
> 8GB RAM
> SSD
>
> w/o the patch, automatic job-level (i.e. 5 in my case):
> 675.36user 29.59system 4:21.72elapsed 269%CPU
> 686.98user 31.07system 4:26.85elapsed 269%CPU
> 694.84user 31.11system 4:35.42elapsed 263%CPU
> 697.24user 31.19system 4:32.17elapsed 267%CPU
> 686.62user 30.89system 4:23.00elapsed 272%CPU
> 696.28user 31.33system 4:29.15elapsed 270%CPU
> 677.73user 30.18system 4:15.15elapsed 277%CPU
> 692.62user 31.45system 4:47.56elapsed 251%CPU
> 679.78user 31.53system 4:20.99elapsed 272%CPU
> 685.63user 32.10system 4:28.15elapsed 267%CPU
>
> w/o the patch, w/ BR2_JLEVEL=1:
> 340.58user 18.57system 6:19.26elapsed 94%CPU
> 337.48user 18.70system 6:16.41elapsed 94%CPU
> 335.39user 18.53system 6:13.74elapsed 94%CPU
> 335.93user 17.94system 6:13.84elapsed 94%CPU
> 335.49user 18.19system 6:13.67elapsed 94%CPU
>
> w/ the patch, automatic job-level (i.e. 5 in my case):
> 494.96user 23.91system 3:13.87elapsed 267%CPU
> 506.90user 24.37system 3:16.83elapsed 269%CPU
> 504.37user 24.42system 3:17.57elapsed 267%CPU
> 499.79user 24.19system 3:04.50elapsed 284%CPU
> 507.02user 23.67system 3:04.93elapsed 286%CPU
> 510.93user 24.43system 3:08.19elapsed 284%CPU
> 512.43user 24.16system 3:08.53elapsed 284%CPU
> 510.80user 24.65system 3:08.64elapsed 283%CPU
> 512.28user 24.38system 3:09.62elapsed 283%CPU
> 514.90user 24.46system 3:08.96elapsed 285%CPU
>
> w/ the patch, w/ BR2_JLEVEL=1:
> 244.56user 14.88system 4:36.88elapsed 93%CPU
> 247.02user 15.43system 4:39.89elapsed 93%CPU
> 247.14user 15.04system 4:39.76elapsed 93%CPU
> 246.32user 14.75system 4:38.93elapsed 93%CPU
> 247.53user 14.64system 4:40.27elapsed 93%CPU
> ---
> ...-allow-to-select-what-program-to-be-built.patch | 231 +++++++++++++++++++++
> package/cmake/cmake.mk | 4 +
> 2 files changed, 235 insertions(+)
> create mode 100644 package/cmake/0001-CMake-allow-to-select-what-program-to-be-built.patch
>
> diff --git a/package/cmake/0001-CMake-allow-to-select-what-program-to-be-built.patch b/package/cmake/0001-CMake-allow-to-select-what-program-to-be-built.patch
> new file mode 100644
> index 0000000..d6e53da
> --- /dev/null
> +++ b/package/cmake/0001-CMake-allow-to-select-what-program-to-be-built.patch
> @@ -0,0 +1,231 @@
> +From 9aeb3ea5f9c69bbc9a69672762d5fae939c3fd8c Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +Date: Sun, 25 Jan 2015 18:11:13 +0100
> +Subject: [PATCH] CMake: allow to select what program to be built
> +
> +Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> +---
> + CMakeLists.txt | 24 ++++++++++++++++++++++++
> + Source/CMakeLists.txt | 33 ++++++++++++++++++++++++++++++++-
> + 2 files changed, 56 insertions(+), 1 deletion(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 71850de..cb9375e 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -43,6 +43,16 @@ if(CMAKE_ENCODING_UTF8)
> + set(KWSYS_ENCODING_DEFAULT_CODEPAGE CP_UTF8)
> + endif()
> +
> ++# options to select what programs to be built
> ++option(BUILD_CMAKE "Build cmake program" ON)
> ++mark_as_advanced(BUILD_CMAKE)
> ++
> ++option(BUILD_CTEST "Build ctest program" ON)
> ++mark_as_advanced(BUILD_CTEST)
> ++
> ++option(BUILD_CPACK "Build cpack program" ON)
> ++mark_as_advanced(BUILD_CPACK)
> ++
> + #-----------------------------------------------------------------------
> + # a macro to deal with system libraries, implemented as a macro
> + # simply to improve readability of the main script
> +@@ -241,6 +251,7 @@ macro (CMAKE_BUILD_UTILITIES)
> +
> + #---------------------------------------------------------------------
> + # Build zlib library for Curl, CMake, and CTest.
> ++ if(BUILD_CMAKE OR BUILD_CTEST OR NOT CMAKE_USE_SYSTEM_CURL)
> + set(CMAKE_ZLIB_HEADER "cm_zlib.h")
> + if(CMAKE_USE_SYSTEM_ZLIB)
> + find_package(ZLIB)
> +@@ -256,9 +267,11 @@ macro (CMAKE_BUILD_UTILITIES)
> + add_subdirectory(Utilities/cmzlib)
> + CMAKE_SET_TARGET_FOLDER(cmzlib "Utilities/3rdParty")
> + endif()
> ++ endif()
> +
> + #---------------------------------------------------------------------
> + # Build Curl library for CTest.
> ++ if(BUILD_CMAKE OR BUILD_CTEST)
> + if(CMAKE_USE_SYSTEM_CURL)
> + find_package(CURL)
> + if(NOT CURL_FOUND)
> +@@ -284,9 +297,11 @@ macro (CMAKE_BUILD_UTILITIES)
> + CMAKE_SET_TARGET_FOLDER(cmcurl "Utilities/3rdParty")
> + CMAKE_SET_TARGET_FOLDER(LIBCURL "Utilities/3rdParty")
> + endif()
> ++ endif()
> +
> + #---------------------------------------------------------------------
> + # Build Compress library for CTest.
> ++ if(BUILD_CMAKE OR BUILD_CTEST)
> + set(CMAKE_COMPRESS_INCLUDES
> + "${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmcompress")
> + set(CMAKE_COMPRESS_LIBRARIES "cmcompress")
> +@@ -301,6 +316,7 @@ macro (CMAKE_BUILD_UTILITIES)
> + add_subdirectory(Utilities/cmbzip2)
> + CMAKE_SET_TARGET_FOLDER(cmbzip2 "Utilities/3rdParty")
> + endif()
> ++ endif()
> +
> + #---------------------------------------------------------------------
> + # Build or use system liblzma for libarchive.
> +@@ -321,6 +337,7 @@ macro (CMAKE_BUILD_UTILITIES)
> +
> + #---------------------------------------------------------------------
> + # Build or use system libarchive for CMake and CTest.
> ++ if(BUILD_CMAKE OR BUILD_CTEST)
> + if(CMAKE_USE_SYSTEM_LIBARCHIVE)
> + find_package(LibArchive)
> + if(NOT LibArchive_FOUND)
> +@@ -347,9 +364,11 @@ macro (CMAKE_BUILD_UTILITIES)
> + CMAKE_SET_TARGET_FOLDER(cmlibarchive "Utilities/3rdParty")
> + set(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES})
> + endif()
> ++ endif()
> +
> + #---------------------------------------------------------------------
> + # Build expat library for CMake and CTest.
> ++ if(BUILD_CMAKE OR BUILD_CTEST)
> + if(CMAKE_USE_SYSTEM_EXPAT)
> + find_package(EXPAT)
> + if(NOT EXPAT_FOUND)
> +@@ -364,9 +383,11 @@ macro (CMAKE_BUILD_UTILITIES)
> + add_subdirectory(Utilities/cmexpat)
> + CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty")
> + endif()
> ++ endif()
> +
> + #---------------------------------------------------------------------
> + # Build XMLRPC library for CMake and CTest.
> ++ if(BUILD_CMAKE OR BUILD_CTEST)
> + if(CTEST_USE_XMLRPC)
> + find_package(XMLRPC QUIET REQUIRED libwww-client)
> + if(NOT XMLRPC_FOUND)
> +@@ -376,6 +397,7 @@ macro (CMAKE_BUILD_UTILITIES)
> + set(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS})
> + set(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES})
> + endif()
> ++ endif()
> +
> + #---------------------------------------------------------------------
> + # Use curses?
> +@@ -583,7 +605,9 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
> + add_subdirectory(Utilities)
> + endif()
> +
> ++if(BUILD_CTEST)
> + add_subdirectory(Tests)
> ++endif()
> +
> + if(NOT CMake_TEST_EXTERNAL_CMAKE)
> + if(BUILD_TESTING)
> +diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
> +index f9405b3..2e14def 100644
> +--- a/Source/CMakeLists.txt
> ++++ b/Source/CMakeLists.txt
> +@@ -481,6 +481,7 @@ if(WIN32 AND NOT CYGWIN AND NOT BORLAND)
> + endif()
> +
> + # create a library used by the command line and the GUI
> ++if(BUILD_CMAKE)
> + add_library(CMakeLib ${SRCS})
> + target_link_libraries(CMakeLib cmsys
> + ${CMAKE_EXPAT_LIBRARIES} ${CMAKE_ZLIB_LIBRARIES}
> +@@ -496,6 +497,7 @@ endif()
> + if(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW)
> + target_link_libraries(CMakeLib rpcrt4)
> + endif()
> ++endif()
> +
> + #
> + # CTestLib
> +@@ -565,8 +567,10 @@ set(CTEST_SRCS cmCTest.cxx
> + )
> +
> + # Build CTestLib
> ++if(BUILD_CTEST)
> + add_library(CTestLib ${CTEST_SRCS})
> + target_link_libraries(CTestLib CMakeLib ${CMAKE_CURL_LIBRARIES} ${CMAKE_XMLRPC_LIBRARIES})
> ++endif()
> +
> + #
> + # Sources for CPack
> +@@ -628,9 +632,12 @@ if(APPLE)
> + endif()
> +
> + # Build CPackLib
> ++if(BUILD_CPACK)
> + add_library(CPackLib ${CPACK_SRCS})
> + target_link_libraries(CPackLib CMakeLib)
> ++endif()
> +
> ++if(BUILD_CMAKE)
> + if(APPLE)
> + add_executable(cmakexbuild cmakexbuild.cxx)
> + target_link_libraries(cmakexbuild CMakeLib)
> +@@ -639,36 +646,60 @@ if(APPLE)
> + target_link_libraries(OSXScriptLauncher cmsys)
> + target_link_libraries(OSXScriptLauncher "-framework CoreFoundation")
> + endif()
> ++endif()
> +
> + # Build CMake executable
> ++if(BUILD_CMAKE)
> + add_executable(cmake cmakemain.cxx cmcmd.cxx cmcmd.h)
> + target_link_libraries(cmake CMakeLib)
> ++endif()
> +
> + # Build CTest executable
> ++if(BUILD_CTEST)
> + add_executable(ctest ctest.cxx)
> + target_link_libraries(ctest CTestLib)
> ++endif()
> +
> + # Build CPack executable
> ++if(BUILD_CPACK)
> + add_executable(cpack CPack/cpack.cxx)
> + target_link_libraries(cpack CPackLib)
> ++endif()
> +
> + # Curses GUI
> ++if(BUILD_CMAKE)
> + if(BUILD_CursesDialog)
> + include(${CMake_SOURCE_DIR}/Source/CursesDialog/CMakeLists.txt)
> + endif()
> ++endif()
> +
> + # Qt GUI
> + option(BUILD_QtDialog "Build Qt dialog for CMake" FALSE)
> ++if(BUILD_CMAKE)
> + if(BUILD_QtDialog)
> + add_subdirectory(QtDialog)
> + endif()
> ++endif()
> +
> + include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
> + include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
> +
> +-install(TARGETS cmake ctest cpack DESTINATION bin)
> ++if(BUILD_CMAKE)
> ++install(TARGETS cmake DESTINATION bin)
> ++endif()
> ++
> ++if(BUILD_CTEST)
> ++install(TARGETS ctest DESTINATION bin)
> ++endif()
> ++
> ++if(BUILD_CPACK)
> ++install(TARGETS cpack DESTINATION bin)
> ++endif()
> ++
> ++if(BUILD_CMAKE)
> + if(APPLE)
> + install(TARGETS cmakexbuild DESTINATION bin)
> + endif()
> ++endif()
> +
> + install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include)
> +--
> +2.2.2
> +
> diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk
> index 14d5a4e..664885f 100644
> --- a/package/cmake/cmake.mk
> +++ b/package/cmake/cmake.mk
> @@ -22,6 +22,10 @@ define HOST_CMAKE_CONFIGURE_CMDS
> -DCMAKE_CXX_FLAGS="$(HOST_CXXFLAGS)" \
> -DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)" \
> -DBUILD_CursesDialog=OFF \
> + -DBUILD_CMAKE=ON \
> + -DBUILD_CTEST=OFF \
> + -DBUILD_CPACK=OFF \
> + -DBUILD_TESTING=OFF \
> )
> endef
>
>
--
Romain Naour
OPEN WIDE Ing?nierie - Paris
23/25, rue Daviel| 75013 PARIS
http://ingenierie.openwide.fr
Le blog des technologies libres et embarqu?es :
http://www.linuxembedded.fr
^ permalink raw reply [flat|nested] 16+ messages in thread