Browse Source

Merge pull request #245 from freifunk-gluon/lua-jsonc-host

lua-jsonc host build
pull/246/head
Matthias Schiffer 4 months ago
committed by GitHub
parent
commit
b644a2a8d8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      libs/lua-jsonc/Makefile
  2. 2
      libs/lua-jsonc/src/CMakeLists.txt

13
libs/lua-jsonc/Makefile

@ -4,7 +4,11 @@ PKG_NAME:=lua-jsonc
PKG_VERSION:=1
CMAKE_INSTALL:=1
HOST_BUILD_DEPENDS:=lua/host libjson-c/host
HOST_UNPACK:=true
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/lua-jsonc
@ -19,4 +23,13 @@ define Package/lua-jsonc/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
endef
# For libjson-c
HOST_LDFLAGS += -Wl,-rpath,$(STAGING_DIR_HOST)/lib
define Host/Install
$(INSTALL_DIR) $(1)/usr/lib/lua/5.1
$(INSTALL_BIN) $(HOST_BUILD_DIR)/liblua-jsonc.so $(1)/lib/lua/5.1/jsonc.so
endef
$(eval $(call BuildPackage,lua-jsonc))
$(eval $(call HostBuild))

2
libs/lua-jsonc/src/CMakeLists.txt

@ -4,7 +4,7 @@ project(lua-jsonc C)
add_library(lua-jsonc SHARED lua-jsonc.c)
set_property(TARGET lua-jsonc PROPERTY COMPILE_FLAGS "-Wall -std=c99")
target_link_libraries(lua-jsonc json-c lua)
target_link_libraries(lua-jsonc json-c)
install(TARGETS lua-jsonc
ARCHIVE DESTINATION lib

Loading…
Cancel
Save