Browse Source

wscript: Fix build of ntk_gl library and GL tests.

tags/v1.3.1000
Jonathan Moore Liles 9 years ago
parent
commit
a6283d7f9f
4 changed files with 21 additions and 6 deletions
  1. +1
    -1
      ntk_gl-uninstalled.pc.in
  2. +1
    -1
      ntk_gl.pc.in
  3. +10
    -1
      test/wscript
  4. +9
    -3
      wscript

+ 1
- 1
ntk_gl-uninstalled.pc.in View File

@@ -4,5 +4,5 @@ Version: @VERSION@

Requires: gl
Libs: @BUILD@/libs/libntk_gl.a
Libs.private: -lgl
Libs.private: -lgl -lglu
Cflags: -I@BUILD@/FL @CFLAGS@

+ 1
- 1
ntk_gl.pc.in View File

@@ -9,5 +9,5 @@ Version: @VERSION@

Requires: gl
Requires.private: x11 xft
Libs: -L${libdir} -lntk -lgl -lntk_gl
Libs: -L${libdir} -lntk -lgl -lglu -lntk_gl
Cflags: -I${includedir}/ntk @CFLAGS@

+ 10
- 1
test/wscript View File

@@ -13,7 +13,10 @@ def configure(conf):
@conf
def example(bld,*k,**kw):
kw['features' ] = 'cxx cxxprogram'
kw['use'] = [ 'ntk_images_static','ntk_static' ]
if 'use' in kw:
kw['use'] = kw['use'] + [ 'ntk_images_static','ntk_static' ]
else:
kw['use'] = [ 'ntk_images_static','ntk_static' ]
kw['includes'] = [ '.', '..' ]
kw['install_path'] = None
return bld(*k,**kw)
@@ -21,6 +24,12 @@ def example(bld,*k,**kw):
def build(bld):

if bld.env.ENABLE_TEST:
bld.example(source='glpuzzle.cxx', target='glpuzzle', use=['ntk_gl_static'])
bld.example(source='fractals.cxx fracviewer.cxx', target='fractals', use=['ntk_gl_static'])
bld.example(source='gl_overlay.cxx', target='gl_overlay', use=['ntk_gl_static'])
bld.example(source='shape.cxx', target='shape', use=['ntk_gl_static'])
bld.example(source='fullscreen.cxx', target='fullscreen', use=['ntk_gl_static'])
bld.example(source='cube.cxx', target='cube', use=['ntk_gl_static'])
bld.example(source='hello.cxx', target='hello')
bld.example(source='input_choice.cxx', target='input_choice')
bld.example(source='label.cxx', target='label')


+ 9
- 3
wscript View File

@@ -134,8 +134,10 @@ def configure(conf):
if Options.options.USE_GL:
conf.env.append_value( 'USE_GL', '1' )
conf.check_cfg(package='gl', uselib_store='GL', args="--cflags --libs",
mandatory=True)
conf.check_cfg(package='glu', uselib_store='GL', args="--cflags --libs",
mandatory=True)
conf.define('HAVE_GL', 1 )
conf.check(header_name='GL/glu.h', define_name='HAVE_GL_GLU_H')

# FIXME: HAVE_LONG_LONG

@@ -393,13 +395,17 @@ src/Fl_PNM_Image.cxx
if bld.env.USE_GL:
bld.makelib(
source = '''
src/gl_draw.cxx
src/gl_start.cxx
src/glut_compatability.cxx
src/glut_font.cxx
src/Fl_Gl_Choice.cxx
src/Fl_Gl_Device_Plugin.cxx
src/Fl_Gl_Overlay.cxx
src/Fl_Gl_Window.cxx
''',
target = 'ntk_gl',
uselib = [ 'X11', 'DL', 'M', 'PTHREAD', 'GL' ] )
uselib = [ 'X11', 'DL', 'M', 'PTHREAD', 'GL'] )

bld( features = 'subst',
source = 'ntk.pc.in',


Loading…
Cancel
Save