This repository has been archived by the owner on Jun 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Build: Some words about building on OSX #8
Comments
I will do it but we need some preparation to make it clean. Can you merge the below to the install.sh. After build on mac the iotivity out directory structure is the following. Note, the out/darwin has .framework directory so the ARCH gets incorrect value. Also the liboctbstack is not a combo.
--- install.sh.orig 2015-06-11 10:44:01.000000000 +0300
+++ install.sh 2015-06-11 10:42:19.000000000 +0300
@@ -7,7 +7,13 @@
# Install the first platform/arch/configuration we find
PLATFORM="$(ls out | head -n 1)"
-ARCH="$(ls out/${PLATFORM} | head -n 1)"
+
+if test "${PLATFORM}" = "darwin"; then
+ ARCH=x86_64
+else
+ ARCH="$(ls out/${PLATFORM} | head -n 1)"
+fi
+
CONFIGURATION="$(ls out/${PLATFORM}/${ARCH} | head -n 1)"
LIBDIR="$( echo "${DESTDIR}/${PREFIX}/lib" | sed 's@//*@/@g' )"
@@ -18,7 +24,11 @@
set -x
mkdir -p "${LIBDIR}" || exit 1
-cp out/${PLATFORM}/${ARCH}/${CONFIGURATION}/liboctbstack.so ${LIBDIR} || exit 1
+if test "${PLATFORM}" = "darwin"; then
+ cp out/${PLATFORM}/${ARCH}/${CONFIGURATION}/*.a ${LIBDIR} || exit 1
+else
+ cp out/${PLATFORM}/${ARCH}/${CONFIGURATION}/liboctbstack.a ${LIBDIR} || exit 1
+fi
mkdir -p "${INCLUDEDIR}/iotivity/resource/csdk/stack" || exit 1
cp -a resource/csdk/stack/include "${INCLUDEDIR}/${OCTBSTACK_INCLUDEDIR}" || exit 1
|
One more thing, |
Here is a proper patch for install.sh which works also on Mac. --- install.sh.orig 2015-06-11 12:12:29.000000000 +0300
+++ install.sh 2015-06-11 12:12:41.000000000 +0300
@@ -7,8 +7,14 @@
# Install the first platform/arch/configuration we find
PLATFORM="$(ls out | head -n 1)"
-ARCH="$(ls out/${PLATFORM} | head -n 1)"
-CONFIGURATION="$(ls out/${PLATFORM}/${ARCH} | head -n 1)"
+
+if test "${PLATFORM}" = "darwin"; then
+ ARCH=x86_64
+else
+ ARCH="$(ls out/${PLATFORM} | head -n 1)"
+fi
+
+CONFIGURATION="$(ls out/${PLATFORM}/${ARCH} | grep -E "release|debug" | head -n 1)"
LIBDIR="$( echo "${DESTDIR}/${PREFIX}/lib" | sed 's@//*@/@g' )"
INCLUDEDIR="$( echo "${DESTDIR}/${PREFIX}/include" | sed 's@//*@/@g' )"
@@ -18,7 +24,11 @@
set -x
mkdir -p "${LIBDIR}" || exit 1
-cp out/${PLATFORM}/${ARCH}/${CONFIGURATION}/liboctbstack.so ${LIBDIR} || exit 1
+if test "${PLATFORM}" = "darwin"; then
+ cp out/${PLATFORM}/${ARCH}/${CONFIGURATION}/*.a ${LIBDIR} || exit 1
+else
+ cp out/${PLATFORM}/${ARCH}/${CONFIGURATION}/liboctbstack.a ${LIBDIR} || exit 1
+fi
mkdir -p "${INCLUDEDIR}/iotivity/resource/csdk/stack" || exit 1
cp -a resource/csdk/stack/include "${INCLUDEDIR}/${OCTBSTACK_INCLUDEDIR}" || exit 1
|
OK. I've added this. |
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
@poussa could you maybe mention a few things about the particulares of building/installing on OSX in the README.md?
The text was updated successfully, but these errors were encountered: