diff options
author | David Robillard <d@drobilla.net> | 2019-07-27 22:35:50 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-07-29 01:59:35 +0200 |
commit | 776c8622814ee3749909af5c47c75f5d26c03931 (patch) | |
tree | b4e9b8855436fc78cb8ec77068363a6ae0f8287d | |
parent | 0d2c8a13982c82d4abc80ee54889b941c29f5370 (diff) | |
download | pugl-776c8622814ee3749909af5c47c75f5d26c03931.tar.gz pugl-776c8622814ee3749909af5c47c75f5d26c03931.tar.bz2 pugl-776c8622814ee3749909af5c47c75f5d26c03931.zip |
Properly check for libm
-rw-r--r-- | wscript | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -59,6 +59,8 @@ def configure(conf): conf.define('HAVE_GL', 1) conf.define('PUGL_HAVE_GL', 1) + conf.check(features='c cshlib', lib='m', uselib_store='M', mandatory=False) + if not Options.options.no_cairo: autowaf.check_pkg(conf, 'cairo', uselib_store = 'CAIRO', @@ -97,7 +99,7 @@ def build(bld): autowaf.build_pc(bld, 'PUGL', PUGL_VERSION, PUGL_MAJOR_VERSION, [], {'PUGL_MAJOR_VERSION': PUGL_MAJOR_VERSION}) - libflags = ['-fvisibility=hidden'] + libflags = ['-fvisibility=hidden'] if not bld.env.MSVC_COMPILER else [] framework = [] libs = [] lib_source = ['pugl/detail/implementation.c'] @@ -121,15 +123,10 @@ def build(bld): libs += ['GL'] if bld.is_defined('HAVE_CAIRO'): lib_source += ['pugl/detail/x11_cairo.c'] - if bld.env.MSVC_COMPILER: - libflags = [] - else: - libs += ['m'] common = { 'framework': framework, 'includes': ['.'], - 'uselib': ['CAIRO'], } lib_common = common.copy() @@ -137,6 +134,7 @@ def build(bld): 'export_includes': ['.'], 'install_path': '${LIBDIR}', 'lib': libs, + 'uselib': ['CAIRO'], 'source': lib_source, 'target': 'pugl-%s' % PUGL_MAJOR_VERSION, 'vnum': PUGL_VERSION, @@ -183,6 +181,7 @@ def build(bld): source = 'test/%s.c' % prog, use = 'libpugl_static', lib = test_libs, + uselib = ['CAIRO', 'M'], target = target, install_path = '', cflags = test_cflags, |