summaryrefslogtreecommitdiff
path: root/recipes-support
diff options
context:
space:
mode:
authorMykyta Dorokhin <mykyta.dorokhin@globallogic.com>2021-03-02 22:42:50 +0200
committerJohn Klug <john.klug@multitech.com>2021-03-03 11:06:28 -0600
commit29013bcb7563e522a859489c44af7845b7b07f56 (patch)
tree21332abdcff10a636809777492cd20440316feb3 /recipes-support
parenta32ad409315ebae13614a409eb4671ac4a2b1cc8 (diff)
downloadmeta-mlinux-29013bcb7563e522a859489c44af7845b7b07f56.tar.gz
meta-mlinux-29013bcb7563e522a859489c44af7845b7b07f56.tar.bz2
meta-mlinux-29013bcb7563e522a859489c44af7845b7b07f56.zip
jsoncpp: switch to cmake build
Diffstat (limited to 'recipes-support')
-rw-r--r--recipes-support/jsoncpp/jsoncpp16-1.6.0/0001-Install-headers-to-jsoncpp-json.patch25
-rw-r--r--recipes-support/jsoncpp/jsoncpp16-1.6.0/Makefile49
-rw-r--r--recipes-support/jsoncpp/jsoncpp16_1.6.0.bb20
3 files changed, 30 insertions, 64 deletions
diff --git a/recipes-support/jsoncpp/jsoncpp16-1.6.0/0001-Install-headers-to-jsoncpp-json.patch b/recipes-support/jsoncpp/jsoncpp16-1.6.0/0001-Install-headers-to-jsoncpp-json.patch
new file mode 100644
index 0000000..52b4345
--- /dev/null
+++ b/recipes-support/jsoncpp/jsoncpp16-1.6.0/0001-Install-headers-to-jsoncpp-json.patch
@@ -0,0 +1,25 @@
+From 059823efcd18398dea638ab6e81af3eda1194e34 Mon Sep 17 00:00:00 2001
+From: Mykyta Dorokhin <mykyta.dorokhin@globallogic.com>
+Date: Tue, 2 Mar 2021 22:18:16 +0200
+Subject: [PATCH] Install headers to jsoncpp/json
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5fba09d..7657dfa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -27,7 +27,7 @@ SET(ARCHIVE_INSTALL_DIR lib${LIB_SUFFIX}
+ CACHE PATH "Install dir for static libraries")
+ SET(LIBRARY_INSTALL_DIR lib${LIB_SUFFIX}
+ CACHE PATH "Install dir for shared libraries")
+-SET(INCLUDE_INSTALL_DIR include
++SET(INCLUDE_INSTALL_DIR include/jsoncpp
+ CACHE PATH "Install dir for headers")
+ SET(PACKAGE_INSTALL_DIR lib${LIB_SUFFIX}/cmake
+ CACHE PATH "Install dir for cmake package config files")
+--
+1.9.1
+
diff --git a/recipes-support/jsoncpp/jsoncpp16-1.6.0/Makefile b/recipes-support/jsoncpp/jsoncpp16-1.6.0/Makefile
deleted file mode 100644
index 7df3d63..0000000
--- a/recipes-support/jsoncpp/jsoncpp16-1.6.0/Makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-includedir ?= /usr/include
-libdir ?= /usr/lib
-
-CPP_SRCS += \
-src/lib_json/json_reader.cpp \
-src/lib_json/json_value.cpp \
-src/lib_json/json_writer.cpp
-
-OBJS += \
-json_reader.o \
-json_value.o \
-json_writer.o
-
-CPP_DEPS += \
-json_reader.d \
-json_value.d \
-json_writer.d
-
-TARGET = libjsoncpp.so
-
-all: $(TARGET)
-
-libjsoncpp.so: $(OBJS)
- @echo 'Building target: $@'
- #$(AR) -r libjsoncpp.a $(OBJS)
- $(CXX) ${LDFLAGS} -shared -o $@ $^
- @echo 'Finished building target: $@'
- @echo ' '
-
-%.o: src/lib_json/%.cpp
- @echo 'Building file: $<'
- $(CXX) $(CFLAGS) -Iinclude -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -fPIC -o "$@" "$<"
- @echo 'Finished building: $<'
- @echo ' '
-
-install:
- install -d $(DESTDIR)/usr/include/json
- install -m 644 include/json/*.h $(DESTDIR)/usr/include/json
- mkdir -p $(DESTDIR)/usr/lib
- cp libjsoncpp.so $(DESTDIR)/usr/lib
-
-# Other Targets
-clean:
- -$(RM) $(OBJS)$(CPP_DEPS) libjsoncpp.so
- -@echo ' '
-
-.PHONY: all clean dependents
-.SECONDARY:
-
diff --git a/recipes-support/jsoncpp/jsoncpp16_1.6.0.bb b/recipes-support/jsoncpp/jsoncpp16_1.6.0.bb
index 8c8454d..4a0d538 100644
--- a/recipes-support/jsoncpp/jsoncpp16_1.6.0.bb
+++ b/recipes-support/jsoncpp/jsoncpp16_1.6.0.bb
@@ -9,25 +9,15 @@ DEPENDS = ""
SRCREV="cbe7e7c9cbd39d864588c5cf2436690634562d3f"
SRC_URI = " git://github.com/open-source-parsers/jsoncpp.git;protocol=git \
- file://Makefile \
+ file://0001-Install-headers-to-jsoncpp-json.patch \
"
-PR = "r6"
+PR = "r8"
S = "${WORKDIR}/git"
-do_compile() {
- cp ${WORKDIR}/Makefile .
- oe_runmake
-}
+inherit cmake
-do_install () {
- install -d ${D}/usr/lib
- install -m 0755 ${S}/libjsoncpp.so ${D}/usr/lib
- install -d ${D}${includedir}/jsoncpp/json
- install -m 0755 ${S}/include/json/*.h ${D}${includedir}/jsoncpp/json
-}
+EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DJSONCPP_WITH_TESTS=OFF"
-FILES_SOLIBSDEV = ""
-FILES_${PN} += "${libdir}/*.so"
-FILES_{PN}-dev += "${libdir}/*.so"
+BBCLASSEXTEND = "native" \ No newline at end of file