diff options
author | Rashad M <mohammedrashadkm@gmail.com> | 2015-06-21 17:12:11 (GMT) |
---|---|---|
committer | Rashad M <mohammedrashadkm@gmail.com> | 2015-06-21 17:12:11 (GMT) |
commit | 20b514bd470fad1f499931a3193e2e8955187433 (patch) | |
tree | e7706c657d8354583edddfcc0eabea132ca1a553 /src/tinyxml.mk | |
parent | 4f45a0cf2cfda27668e291e2d324c2f44b2101ce (diff) | |
download | mxe-20b514bd470fad1f499931a3193e2e8955187433.zip mxe-20b514bd470fad1f499931a3193e2e8955187433.tar.gz mxe-20b514bd470fad1f499931a3193e2e8955187433.tar.bz2 |
tinyxml: use cmake to simply shared and static build
Diffstat (limited to 'src/tinyxml.mk')
-rw-r--r-- | src/tinyxml.mk | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/tinyxml.mk b/src/tinyxml.mk index 842a660..81f58e1 100644 --- a/src/tinyxml.mk +++ b/src/tinyxml.mk @@ -17,25 +17,15 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && $(TARGET)-g++ -c -O3 -Wall -Wno-unknown-pragmas -Wno-format -D TIXML_USE_STL tiny*.cpp - $(if $(BUILD_STATIC), - $(TARGET)-ar cr libtinyxml.a *.o - $(TARGET)-ranlib '$(1)/libtinyxml.a' -, -cd '$(1)' && $(TARGET)-g++ -shared -Wl,-soname,libtinyxml.so -o libtinyxml.so *.o -) - - $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' - $(if $(BUILD_STATIC), - $(INSTALL) -m644 '$(1)'/*.a '$(PREFIX)/$(TARGET)/lib/' -, - $(INSTALL) -m644 '$(1)'/*.so '$(PREFIX)/$(TARGET)/lib/' -) - $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' - $(INSTALL) -m644 '$(1)'/*.h '$(PREFIX)/$(TARGET)/include/' + mkdir '$(1).build' + cd '$(1).build' && cmake \ + -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),FALSE,TRUE) \ + '$(1)' + $(MAKE) -C '$(1).build' install '$(TARGET)-g++' \ - -W -Wall -D TIXML_USE_STL -ansi -pedantic \ + -Wall -DTIXML_USE_STL -ansi -pedantic \ '$(1)/xmltest.cpp' -o '$(PREFIX)/$(TARGET)/bin/test-tinyxml.exe' \ -ltinyxml endef |