Windows build system fixes

This commit is contained in:
Andrew Resch 2008-10-23 08:13:08 +00:00
commit b5fdadc2aa

View file

@ -155,24 +155,24 @@ else:
'z' 'z'
] ]
if not windows_check():
dynamic_lib_extension = ".so"
if osx_check():
dynamic_lib_extension = ".dylib"
dynamic_lib_extension = ".so" _lib_extensions = ['-mt-1_36', '-mt-1_35', '-mt']
if osx_check(): _library_dirs += [sysconfig.get_config_var("LIBDIR"), '/opt/local/lib']
dynamic_lib_extension = ".dylib"
_lib_extensions = ['-mt-1_36', '-mt-1_35', '-mt'] # Modify the libs if necessary for systems with only -mt boost libs
_library_dirs += [sysconfig.get_config_var("LIBDIR"), '/opt/local/lib'] for lib in _libraries:
if lib[:6] == "boost_":
# Modify the libs if necessary for systems with only -mt boost libs for lib_prefix in _library_dirs:
for lib in _libraries: for lib_suffix in _lib_extensions:
if lib[:6] == "boost_": # If there is a -mt version use that
for lib_prefix in _library_dirs: if os.path.exists(os.path.join(lib_prefix, "lib" + lib + lib_suffix + dynamic_lib_extension)):
for lib_suffix in _lib_extensions: _libraries[_libraries.index(lib)] = lib + lib_suffix
# If there is a -mt version use that lib = lib + lib_suffix
if os.path.exists(os.path.join(lib_prefix, "lib" + lib + lib_suffix + dynamic_lib_extension)): break
_libraries[_libraries.index(lib)] = lib + lib_suffix
lib = lib + lib_suffix
break
_sources = glob.glob("./libtorrent/src/*.cpp") + \ _sources = glob.glob("./libtorrent/src/*.cpp") + \
glob.glob("./libtorrent/src/*.c") + \ glob.glob("./libtorrent/src/*.c") + \
@ -189,7 +189,7 @@ for source in _sources:
break break
_ext_modules = [] _ext_modules = []
if not os.path.exists(os.path.join(sysconfig.get_config_var("LIBDIR"), "libtorrent-rasterbar.so.1")): if windows_check() or not os.path.exists(os.path.join(sysconfig.get_config_var("LIBDIR"), "libtorrent-rasterbar.so.1")):
# There isn't a system libtorrent library, so let's build the one included with deluge # There isn't a system libtorrent library, so let's build the one included with deluge
libtorrent = Extension( libtorrent = Extension(
'libtorrent', 'libtorrent',