Browse code

fixes for Linux

Nat! authored on 05-07-2016 11:24:56
Showing 3 changed files
... ...
@@ -22,7 +22,7 @@ IF(APPLE)
22 22
 else()
23 23
    find_library( FOUNDATION
24 24
                  NAMES Foundation
25
-                 HINTS dependencies/lib
25
+                 HINTS lib dependencies/lib
26 26
                 )
27 27
 endif()
28 28
 
... ...
@@ -167,10 +167,14 @@ add_executable( mulle-scion
167 167
 ${MONGOOSE_SOURCES}
168 168
 ${TOOL_SOURCES}
169 169
 )
170
+ 
171
+set( OS_SPECIFIC_LIBS ${OS_SPECIFIC_LIBS} -lz)
170 172
 
171 173
 target_link_libraries( mulle-scion
174
+${BEGIN_ALL_LOAD}
172 175
 MulleScion
173 176
 ${FOUNDATION}
177
+${END_ALL_LOAD}
174 178
 ${OS_SPECIFIC_LIBS}
175 179
 )
176 180
 
177 181
new file mode 100755
... ...
@@ -0,0 +1,12 @@
1
+#! /bin/sh
2
+
3
+set -e
4
+
5
+cd ..
6
+   mulle-bootstrap build  -c Debug -k "$@"
7
+   mulle-bootstrap install "`pwd`"
8
+
9
+cd build
10
+   cmake -DCMAKE_OSX_SYSROOT=macosx -DCMAKE_INSTALL_PREFIX="`pwd`/.." -DCMAKE_BUILD_TYPE=Debug ..
11
+   make install
12
+
... ...
@@ -9,7 +9,6 @@
9 9
 
10 10
 set -m
11 11
 
12
-
13 12
 # check if running a single test or all
14 13
 
15 14
 executable=`basename $0`
... ...
@@ -38,11 +37,7 @@ trap trace_ignore 5 6
38 37
 
39 38
 
40 39
 # parse optional parameters
41
-exe=`ls -1 ../?uild/Products/*/mulle-scion 2> /dev/null | tail -1`
42
-if [ ! -x "${exe}" ]
43
-then
44
-   exe=`ls -1 ../?uild/*/mulle-scion | tail -1 2> /dev/null`
45
-fi
40
+exe=`ls -1 ../bin/mulle-scion 2> /dev/null | tail -1`
46 41
 
47 42
 if [ -x "${exe}" ]
48 43
 then
... ...
@@ -121,7 +116,7 @@ run()
121 116
    stdout="$4"
122 117
    stderr="$5"
123 118
 
124
-   random=`mktemp -t "mulle-scion"`
119
+   random=`mktemp -t "mulle-scion-XXXX"`
125 120
    output="$random.stdout"
126 121
    errput="$random.stderr"
127 122
    errors=`basename $template .scion`.errors
... ...
@@ -335,7 +330,7 @@ test_binary()
335 330
    local output
336 331
    local errput
337 332
 
338
-   random=`mktemp -t "mulle-scion"`
333
+   random=`mktemp -t "mulle-scion-XXXX"`
339 334
    output="$random.stdout"
340 335
    errput="$random.stderr"
341 336
 
... ...
@@ -370,8 +365,19 @@ absolute_path_if_relative()
370 365
 
371 366
 
372 367
 MULLE_SCION=`absolute_path_if_relative "$MULLE_SCION"`
373
-DYLD_FALLBACK_FRAMEWORK_PATH="`pwd`/../dependencies/Frameworks/Debug"
374
-export DYLD_FALLBACK_FRAMEWORK_PATH
368
+
369
+case "`uname`" in
370
+   Darwin)
371
+      DYLD_FALLBACK_FRAMEWORK_PATH="`pwd`/../dependencies/Frameworks/Debug"
372
+      export DYLD_FALLBACK_FRAMEWORK_PATH
373
+      ;;
374
+
375
+   *) 
376
+      path="`dirname "${MULLE_SCION}"`"
377
+      LD_LIBRARY_PATH="`dirname "${path}"`/lib:${LD_LIBRARY_PATH}"
378
+      export LD_LIBRARY_PATH
379
+      ;;
380
+esac
375 381
 
376 382
 
377 383
 test_binary "$MULLE_SCION"