Ignore:
Timestamp:
Feb 20, 2014 8:08:06 AM (10 years ago)
Author:
nanang
Message:

Re #1519: Include user.mak build settings in building pjsua app and pjsua2 SWIG Python binding.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/swig/python/setup.py

    r4744 r4753  
    6767f.close() 
    6868 
    69 # Fill in pj_inc_dirs 
    70 pj_inc_dirs = [] 
    71 f = os.popen("make --no-print-directory -f helper.mak inc_dir") 
     69# Fill in extra_compile_args 
     70extra_compile_args = [] 
     71f = os.popen("make --no-print-directory -f helper.mak cflags") 
    7272for line in f: 
    73     pj_inc_dirs.append(line.rstrip("\r\n")) 
     73    extra_compile_args.append(line.rstrip("\r\n")) 
    7474f.close() 
    7575 
    76 # Fill in pj_lib_dirs 
    77 pj_lib_dirs = [] 
    78 f = os.popen("make --no-print-directory -f helper.mak lib_dir") 
     76# Fill in extra_link_args 
     77extra_link_args = [] 
     78f = os.popen("make --no-print-directory -f helper.mak ldflags") 
    7979for line in f: 
    80     pj_lib_dirs.append(line.rstrip("\r\n")) 
     80    extra_link_args.append(line.rstrip("\r\n")) 
    8181f.close() 
    82  
    83 # Fill in pj_libs 
    84 pj_libs = ['pjsua2-' + pj_target_name] 
    85 f = os.popen("make --no-print-directory -f helper.mak libs") 
    86 for line in f: 
    87     pj_libs.append(line.rstrip("\r\n")) 
    88 f.close() 
    89  
    90 # Fill in extra link args 
    91 extra_link_args = [] 
    92 if platform.system() == 'Darwin': 
    93     # Mac OS X depedencies 
    94     extra_link_args += ["-framework", "CoreFoundation",  
    95                         "-framework", "AudioToolbox", 
    96                         "-framework", "QTKit"] 
    97     # OS X Lion support 
    98     if platform.mac_ver()[0].startswith("10.7"): 
    99         extra_link_args += ["-framework", "AudioUnit"] 
    10082 
    10183# MinGW specific action: put current working dir to PATH, so Python distutils 
     
    11092      ext_modules = [Extension("_pjsua2",  
    11193                               ["pjsua2_wrap.cpp"],  
    112                                define_macros=[('PJ_AUTOCONF', '1'),], 
    113                                include_dirs=pj_inc_dirs,  
    114                                library_dirs=pj_lib_dirs,  
    115                                libraries=pj_libs, 
     94                               extra_compile_args=extra_compile_args, 
    11695                               extra_link_args=extra_link_args 
    11796                              ) 
Note: See TracChangeset for help on using the changeset viewer.