Skip to content

Commit

Permalink
made meson stuff work on gcc/linux, replaced fmodf and fabsf with fmo…
Browse files Browse the repository at this point in the history
…d and fabs for proper c89
  • Loading branch information
mokafolio committed Nov 21, 2018
1 parent 981be64 commit f453d65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions Examples/meson.build
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
glfw = dependency('glfw3')
gl = dependency('GL')

deps = []
deps = [gl, glfw]

#we manually need to link glfw3 dependencies...hmm :/
if host_machine.system() == 'darwin'
deps += [dependency('Cocoa'), dependency('IOKit'), dependency('CoreFoundation'), dependency('CoreVideo')]
elif host_machine.system() == 'linux'
deps += [dependency('x11', method: 'pkg-config'), static: false]
cc = meson.get_compiler('c')
deps += [dependency('x11'),
cc.find_library('dl', required : true),
cc.find_library('m', required : true),
dependency('threads')]
endif #@TODO Add windows deps for glfw

deps += [glfw, gl]

gl3w = '../ExampleAndTestDeps/GL/gl3w.c'

if get_option('addressSanitizer') == true
Expand Down
4 changes: 2 additions & 2 deletions Tarp/Tarp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3095,9 +3095,9 @@ TARP_LOCAL void _tpGLStroke(_tpGLPath * _path,
}

offsetIntoPattern = _style->dashOffset;
if (fabsf(offsetIntoPattern) >= patternLen)
if (fabs(offsetIntoPattern) >= patternLen)
{
offsetIntoPattern = fmodf(offsetIntoPattern, patternLen);
offsetIntoPattern = fmod(offsetIntoPattern, patternLen);
}

dashStartState.startDashLen = -offsetIntoPattern;
Expand Down

0 comments on commit f453d65

Please sign in to comment.