diff --git a/build/premake/extern_libs5.lua b/build/premake/extern_libs5.lua index 5dfaf66fab..bf87dc1a0a 100644 --- a/build/premake/extern_libs5.lua +++ b/build/premake/extern_libs5.lua @@ -572,9 +572,18 @@ extern_lib_defs = { add_default_lib_paths("nspr") links { "nspr4", "plc4", "plds4" } end - filter "Debug" + + filter { "Debug", "action:vs2013" } + links { "mozjs38-ps-debug-vc120" } + filter { "Release", "action:vs2013" } + links { "mozjs38-ps-release-vc120" } + filter { "Debug", "action:vs2015" } + links { "mozjs38-ps-debug-vc140" } + filter { "Release", "action:vs2015" } + links { "mozjs38-ps-release-vc140" } + filter { "Debug", "action:not vs*" } links { "mozjs38-ps-debug" } - filter "Release" + filter { "Release", "action:not vs*" } links { "mozjs38-ps-release" } filter { } add_source_lib_paths("spidermonkey") diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index b4ec3022ae..6dec0a1992 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -391,6 +391,8 @@ function project_create(project_name, target_type) filter "action:vs2013" toolset "v120_xp" + filter "action:vs2015" + toolset "v140_xp" filter {} project_set_target(project_name) @@ -595,7 +597,7 @@ function setup_all_libs () setup_third_party_static_lib_project("tinygettext", source_dirs, extern_libs, { } ) -- it's an external library and we don't want to modify its source to fix warnings, so we just disable them to avoid noise in the compile output - if _ACTION == "vs2013" then + filter "action:vs*" buildoptions { "/wd4127", "/wd4309", @@ -605,7 +607,7 @@ function setup_all_libs () "/wd4099", "/wd4503" } - end + filter {} if not _OPTIONS["without-lobby"] then @@ -850,11 +852,11 @@ function setup_all_libs () end -- runtime-library-specific - if _ACTION == "vs2013" then + filter "action:vs*" table.insert(source_dirs, "lib/sysdep/rtl/msc"); - else + filter "action:not vs*" table.insert(source_dirs, "lib/sysdep/rtl/gcc"); - end + filter {} setup_static_lib_project("lowlevel", source_dirs, extern_libs, extra_params) diff --git a/build/workspaces/update-workspaces.bat b/build/workspaces/update-workspaces.bat index 2c4092a853..1ec6435141 100644 --- a/build/workspaces/update-workspaces.bat +++ b/build/workspaces/update-workspaces.bat @@ -3,4 +3,5 @@ rem ** Create Visual Studio Workspaces on Windows ** cd ..\premake if not exist ..\workspaces\vc2013\SKIP_PREMAKE_HERE premake5\bin\release\premake5 --outpath="../workspaces/vc2013" --use-shared-glooxwrapper %* vs2013 +if not exist ..\workspaces\vc2015\SKIP_PREMAKE_HERE premake5\bin\release\premake5 --outpath="../workspaces/vc2015" --use-shared-glooxwrapper %* vs2015 cd ..\workspaces diff --git a/source/lib/sysdep/os/win/wposix/wtime.h b/source/lib/sysdep/os/win/wposix/wtime.h index 9c5596838f..80863d6cd9 100644 --- a/source/lib/sysdep/os/win/wposix/wtime.h +++ b/source/lib/sysdep/os/win/wposix/wtime.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -59,11 +59,13 @@ typedef enum clockid_t; // POSIX realtime clock_* +#if _MSC_VER < 1900 struct timespec { time_t tv_sec; long tv_nsec; }; +#endif extern int nanosleep(const struct timespec* rqtp, struct timespec* rmtp); extern int clock_gettime(clockid_t clock, struct timespec* ts); diff --git a/source/third_party/mongoose/mongoose.cpp b/source/third_party/mongoose/mongoose.cpp index e274b8e423..9717b19cd7 100644 --- a/source/third_party/mongoose/mongoose.cpp +++ b/source/third_party/mongoose/mongoose.cpp @@ -178,10 +178,12 @@ typedef struct {HANDLE signal, broadcast;} pthread_cond_t; typedef DWORD pthread_t; #define pid_t HANDLE // MINGW typedefs pid_t to int. Using #define here. +#if _MSC_VER < 1900 struct timespec { long tv_nsec; long tv_sec; }; +#endif static int pthread_mutex_lock(pthread_mutex_t *); static int pthread_mutex_unlock(pthread_mutex_t *);