Browse Source

fix compilation on MSYS2.

tags/v1.9.12
Yasuhiro Fujii 8 years ago
parent
commit
6758354192
3 changed files with 18 additions and 2 deletions
  1. +3
    -0
      common/wscript
  2. +13
    -0
      windows/JackSystemDeps_os.h
  3. +2
    -2
      wscript

+ 3
- 0
common/wscript View File

@@ -142,6 +142,7 @@ def build(bld):
clientlib.defines = 'HAVE_CONFIG_H' clientlib.defines = 'HAVE_CONFIG_H'
clientlib.use = uselib clientlib.use = uselib
if bld.env['IS_WINDOWS']: if bld.env['IS_WINDOWS']:
clientlib.env['cxxshlib_PATTERN'] = 'lib%s.dll'
clientlib.install_path = '${BINDIR}' clientlib.install_path = '${BINDIR}'
else: else:
clientlib.install_path = '${LIBDIR}' clientlib.install_path = '${LIBDIR}'
@@ -208,6 +209,7 @@ def build(bld):
serverlib.target = 'jackserver' serverlib.target = 'jackserver'
serverlib.use = uselib serverlib.use = uselib
if bld.env['IS_WINDOWS']: if bld.env['IS_WINDOWS']:
serverlib.env['cxxshlib_PATTERN'] = 'lib%s.dll'
serverlib.install_path = '${BINDIR}' serverlib.install_path = '${BINDIR}'
else: else:
serverlib.install_path = '${LIBDIR}' serverlib.install_path = '${LIBDIR}'
@@ -303,6 +305,7 @@ def build(bld):
netlib.target = 'jacknet' netlib.target = 'jacknet'
netlib.use = ['SAMPLERATE', 'CELT', 'OPUS', 'PTHREAD'] netlib.use = ['SAMPLERATE', 'CELT', 'OPUS', 'PTHREAD']
if bld.env['IS_WINDOWS']: if bld.env['IS_WINDOWS']:
netlib.env['cxxshlib_PATTERN'] = 'lib%s.dll'
netlib.install_path = '${BINDIR}' netlib.install_path = '${BINDIR}'
netlib.use += ['WS2_32', 'WINMM'] netlib.use += ['WS2_32', 'WINMM']
elif bld.env['IS_MACOSX']: elif bld.env['IS_MACOSX']:


+ 13
- 0
windows/JackSystemDeps_os.h View File

@@ -53,5 +53,18 @@
#define snprintf _snprintf #define snprintf _snprintf
#endif #endif


inline int setenv(const char* name, const char* value, int overwrite)
{
if (overwrite == 0 && getenv(name) != NULL) {
return 0;
}
return _putenv_s(name, value);
}

inline int unsetenv(const char* name)
{
return _putenv_s(name, "");
}

#endif #endif



+ 2
- 2
wscript View File

@@ -453,7 +453,7 @@ def detect_platform(conf):
('IS_LINUX', 'Linux', ['gnu0', 'gnukfreebsd', 'linux', 'posix']), ('IS_LINUX', 'Linux', ['gnu0', 'gnukfreebsd', 'linux', 'posix']),
('IS_MACOSX', 'MacOS X', ['darwin']), ('IS_MACOSX', 'MacOS X', ['darwin']),
('IS_SUN', 'SunOS', ['sunos']), ('IS_SUN', 'SunOS', ['sunos']),
('IS_WINDOWS', 'Windows', ['cygwin', 'win32'])
('IS_WINDOWS', 'Windows', ['cygwin', 'msys', 'win32'])
] ]


for key,name,strings in platforms: for key,name,strings in platforms:
@@ -872,7 +872,7 @@ def build_drivers(bld):
'windows/portaudio/JackPortAudioDriver.cpp', 'windows/portaudio/JackPortAudioDriver.cpp',
] ]


winmme_driver_src = [
winmme_src = [
'windows/winmme/JackWinMMEDriver.cpp', 'windows/winmme/JackWinMMEDriver.cpp',
'windows/winmme/JackWinMMEInputPort.cpp', 'windows/winmme/JackWinMMEInputPort.cpp',
'windows/winmme/JackWinMMEOutputPort.cpp', 'windows/winmme/JackWinMMEOutputPort.cpp',


Loading…
Cancel
Save