aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-07-27 22:35:50 +0200
committerDavid Robillard <d@drobilla.net>2019-07-29 01:59:35 +0200
commit776c8622814ee3749909af5c47c75f5d26c03931 (patch)
treeb4e9b8855436fc78cb8ec77068363a6ae0f8287d
parent0d2c8a13982c82d4abc80ee54889b941c29f5370 (diff)
downloadpugl-776c8622814ee3749909af5c47c75f5d26c03931.tar.gz
pugl-776c8622814ee3749909af5c47c75f5d26c03931.tar.bz2
pugl-776c8622814ee3749909af5c47c75f5d26c03931.zip
Properly check for libm
-rw-r--r--wscript11
1 files changed, 5 insertions, 6 deletions
diff --git a/wscript b/wscript
index 55a4c0e..400d5c4 100644
--- a/wscript
+++ b/wscript
@@ -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,