Skip to contentSkip to conversation

package/rapidjson: switch to CMake

PATCH New Bernd Kuhls 2 participants 2 messages Apr 20, 2017 – May 2, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/rapidjson: switch to CMake

Upcoming Kodi v18 depends on RapidJSON and detects it by using pkg-conf:
https://github.com/xbmc/xbmc/blob/master/cmake/modules/FindRapidJSON.cmake#L13

Currently our package installs only the header files, but RapidJSON.pc is also needed. Luckily this can be fixed by switching to CMake which does the job, also add configure options to disable the CMake build of executables.

---
v2: add configure options to disable build of example code, rapidjson
is a header-only package, fixes broken -march=native (Thomas)

 package/rapidjson/rapidjson.mk | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
package/rapidjson/rapidjson.mk +5 -4
index d06f52962..4d69bc345 100644
@@ -13,8 +13,9 @@ RAPIDJSON_LICENSE_FILES = license.txt
 RAPIDJSON_INSTALL_TARGET = NO
 RAPIDJSON_INSTALL_STAGING = YES
 
-define RAPIDJSON_INSTALL_STAGING_CMDS
-	cp -dpfr $(@D)/include/* $(STAGING_DIR)/usr/include
-endef
+RAPIDJSON_CONF_OPTS = \
+	-DRAPIDJSON_BUILD_DOC=OFF \
+	-DRAPIDJSON_BUILD_EXAMPLES=OFF \
+	-DRAPIDJSON_BUILD_TESTS=OFF
 
-$(eval $(generic-package))
+$(eval $(cmake-package))
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 1/1 package/rapidjson: switch to CMake

Hello,

Quoted 8 lines · Bernd Kuhls

Upcoming Kodi v18 depends on RapidJSON and detects it by using pkg-conf:
https://github.com/xbmc/xbmc/blob/master/cmake/modules/FindRapidJSON.cmake#L13

Currently our package installs only the header files, but RapidJSON.pc is also needed. Luckily this can be fixed by switching to CMake which does the job, also add configure options to disable the CMake build of executables.

Quoted 4 lines

---
v2: add configure options to disable build of example code, rapidjson
is a header-only package, fixes broken -march=native (Thomas)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com