mirror of https://git.wownero.com/dsc/mxe.git
liblaxjson: update and use cmake build/install commands
still needs some work to provide static/shared as an option
This commit is contained in:
parent
db24d5c686
commit
f9a95ca556
|
@ -0,0 +1,29 @@
|
|||
This file is part of MXE.
|
||||
See index.html for further information.
|
||||
|
||||
Contains ad hoc patches for cross building.
|
||||
|
||||
From e11d3cd0b909b21c97e6a0e3379d4ad42cc5c537 Mon Sep 17 00:00:00 2001
|
||||
From: MXE
|
||||
Date: Wed, 21 Oct 2015 20:51:02 +1100
|
||||
Subject: [PATCH] add install components
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f008f13..cf89967 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -39,5 +39,8 @@ set_target_properties(primitives_test PROPERTIES
|
||||
target_link_libraries(primitives_test laxjson)
|
||||
add_test(DetectPrimitives primitives_test)
|
||||
|
||||
-install(FILES "include/laxjson.h" DESTINATION include)
|
||||
-install(TARGETS laxjson laxjson_static DESTINATION lib)
|
||||
+install(FILES "include/laxjson.h" COMPONENT header DESTINATION include)
|
||||
+install(TARGETS laxjson_static COMPONENT static-lib DESTINATION lib)
|
||||
+install(TARGETS laxjson COMPONENT shared-lib
|
||||
+ DESTINATION lib
|
||||
+ RUNTIME DESTINATION bin)
|
||||
--
|
||||
2.3.8 (Apple Git-58)
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
PKG := liblaxjson
|
||||
$(PKG)_IGNORE :=
|
||||
$(PKG)_VERSION := 1.0.3
|
||||
$(PKG)_CHECKSUM := 9d47f2d23cf4a8992e8ef015136c1ff5c540afaa912ed75ee830dea17736c5f2
|
||||
$(PKG)_VERSION := 1.0.5
|
||||
$(PKG)_CHECKSUM := ffc495b5837e703b13af3f5a5790365dc3a6794f12f0fa93fb8593b162b0b762
|
||||
$(PKG)_SUBDIR := liblaxjson-$($(PKG)_VERSION)
|
||||
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
|
||||
$(PKG)_URL := https://github.com/andrewrk/liblaxjson/archive/$($(PKG)_VERSION).tar.gz
|
||||
|
@ -17,18 +17,17 @@ define $(PKG)_UPDATE
|
|||
endef
|
||||
|
||||
define $(PKG)_BUILD
|
||||
mkdir '$(1)/build'
|
||||
cd '$(1)/build' && cmake .. \
|
||||
-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)'
|
||||
mkdir '$(1).build'
|
||||
cd '$(1).build' && '$(TARGET)-cmake' '$(1)'
|
||||
|
||||
$(MAKE) -C '$(1)/build' -j '$(JOBS)'
|
||||
'$(TARGET)-cmake' --build '$(1).build' -- -j '$(JOBS)'
|
||||
|
||||
$(INSTALL) -m644 '$(1)/include/laxjson.h' '$(PREFIX)/$(TARGET)/include'
|
||||
$(if $(BUILD_STATIC),\
|
||||
$(INSTALL) -m644 '$(1)/build/liblaxjson.a' '$(PREFIX)/$(TARGET)/lib'\
|
||||
$(else),\
|
||||
$(INSTALL) -m755 '$(1)/build/liblaxjson.dll' '$(PREFIX)/$(TARGET)/bin';\
|
||||
$(INSTALL) -m755 '$(1)/build/liblaxjson.dll.a' '$(PREFIX)/$(TARGET)/lib')
|
||||
'$(TARGET)-cmake' \
|
||||
-DCMAKE_INSTALL_COMPONENT=$(if $(BUILD_STATIC),static,shared)-lib \
|
||||
-P '$(1).build/cmake_install.cmake'
|
||||
'$(TARGET)-cmake' \
|
||||
-DCMAKE_INSTALL_COMPONENT=header \
|
||||
-P '$(1).build/cmake_install.cmake'
|
||||
|
||||
'$(TARGET)-gcc' \
|
||||
-W -Wall -Werror -ansi -pedantic -std=c99 \
|
||||
|
|
Loading…
Reference in New Issue