mirror of
https://github.com/Ardour/ardour.git
synced 2026-10-16 02:46:37 +02:00
MSVC: getopt support
This commit is contained in:
1 parent
6553cd3504
commit
3a9dd57d44
14 files changed
+38
-13
No files matched your search
@@ -682,7 +682,6 @@ def build(bld):
|
||||
if bld.env['build_target'] == 'msvc':
|
||||
obj.use += ['liblua']
|
||||
obj.uselib += ' PANGOCAIRO GDI32'
|
||||
obj.lib = ['getopt']
|
||||
obj.defines += ['NOMINMAX']
|
||||
|
||||
if False and bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
|
||||
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
#if defined COMPILER_MSVC && defined WAF_BUILD
|
||||
#include "msvc/getopt.h"
|
||||
#else
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
#include <iostream>
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
|
||||
@@ -55,9 +55,6 @@ def build(bld):
|
||||
if bld.env['DEBUG'] == False:
|
||||
obj.linkflags += bld.env['compiler_flags_dict']['mwindows']
|
||||
|
||||
if bld.env['build_target'] == 'msvc':
|
||||
obj.lib = ['getopt']
|
||||
|
||||
obj.includes += ['../libs']
|
||||
|
||||
if bld.is_defined('NEED_INTL'):
|
||||
|
||||
@@ -19,7 +19,12 @@
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <ctype.h>
|
||||
#if defined COMPILER_MSVC && defined WAF_BUILD
|
||||
#undef _POSIX_SOURCE
|
||||
#include "msvc/getopt.h"
|
||||
#else
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#if defined COMPILER_MSVC && defined WAF_BUILD
|
||||
#include "msvc/getopt.h"
|
||||
#else
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
|
||||
+1
-3
@@ -40,7 +40,7 @@ def build(bld):
|
||||
obj.uselib += ' GDI32'
|
||||
obj.linkflags += bld.env['compiler_flags_dict']['mwindows']
|
||||
if bld.env['build_target'] == 'msvc':
|
||||
obj.lib = ['getopt', 'ole32']
|
||||
obj.lib = ['ole32']
|
||||
obj.defines.append('LIBARDOUR_DLL_EXPORTS')
|
||||
|
||||
if re.search ("bsd", sys.platform) != None:
|
||||
@@ -69,8 +69,6 @@ def build(bld):
|
||||
pass
|
||||
elif bld.env['build_target'] == 'mingw' or bld.env['build_target'] == 'msvc':
|
||||
obj.linkflags += bld.env['compiler_flags_dict']['mwindows']
|
||||
if bld.env['build_target'] == 'msvc':
|
||||
obj.lib = ['getopt']
|
||||
|
||||
obj.includes = [ '../pbd/', '../ardour/', '.' ]
|
||||
obj.defines = [
|
||||
|
||||
@@ -31,9 +31,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef COMPILER_MSVC
|
||||
#if defined COMPILER_MSVC
|
||||
#ifdef WAF_BUILD
|
||||
#define GETOPT_API __declspec(dllexport)
|
||||
#else
|
||||
#include "pbd/msvc_pbd.h"
|
||||
#endif
|
||||
#endif
|
||||
#include "getopt.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -43,8 +43,12 @@
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#ifdef COMPILER_MSVC
|
||||
#ifdef WAF_BUILD
|
||||
#define GETOPT_API __declspec(dllexport)
|
||||
#else
|
||||
#include "pbd/msvc_pbd.h" // Defines 'GETOPT_API'
|
||||
#endif
|
||||
#endif
|
||||
/* Windows needs warnx(). We change the definition though:
|
||||
* 1. (another) global is defined, opterrmsg, which holds the error message
|
||||
* 2. errors are always printed out on stderr w/o the program name
|
||||
|
||||
@@ -186,6 +186,9 @@ def build(bld):
|
||||
obj.source += [ 'windows_timer_utils.cc' ]
|
||||
obj.source += [ 'windows_mmcss.cc' ]
|
||||
obj.uselib += ' OLE'
|
||||
if bld.env['build_target'] == 'msvc':
|
||||
obj.source += ['msvc/getopt.c']
|
||||
obj.source += ['msvc/getopt_long.c']
|
||||
|
||||
if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
|
||||
# Unit tests
|
||||
|
||||
@@ -77,8 +77,6 @@ def build(bld):
|
||||
obj.use += ' libappleutility'
|
||||
elif bld.env['build_target'] == 'mingw' or bld.env['build_target'] == 'msvc':
|
||||
obj.linkflags += bld.env['compiler_flags_dict']['mconsole']
|
||||
if bld.env['build_target'] == 'msvc':
|
||||
obj.lib = ['getopt']
|
||||
|
||||
if bld.is_defined('NEED_INTL'):
|
||||
obj.linkflags.append ('-lintl')
|
||||
|
||||
@@ -18,7 +18,11 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#if defined COMPILER_MSVC && defined WAF_BUILD
|
||||
#include "msvc/getopt.h"
|
||||
#else
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
#include <glibmm.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@@ -18,7 +18,11 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#if defined COMPILER_MSVC && defined WAF_BUILD
|
||||
#include "msvc/getopt.h"
|
||||
#else
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#include <glibmm.h>
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
#if defined COMPILER_MSVC && defined WAF_BUILD
|
||||
#include "msvc/getopt.h"
|
||||
#else
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
#include <iostream>
|
||||
|
||||
#include <glibmm.h>
|
||||
|
||||
@@ -56,9 +56,6 @@ def build_ardour_util(bld, util):
|
||||
elif bld.env['build_target'] == 'mingw' or bld.env['build_target'] == 'msvc':
|
||||
obj.linkflags += bld.env['compiler_flags_dict']['mconsole']
|
||||
|
||||
if bld.env['build_target'] == 'msvc':
|
||||
obj.lib = ['getopt']
|
||||
|
||||
obj.includes += ['../libs']
|
||||
|
||||
if bld.env['build_target'] == 'mingw' or bld.env['build_target'] == 'msvc':
|
||||
|
||||
Reference in new issue
Block a user