2013-05-17 22:39:08 -04:00
|
|
|
--
|
2016-01-01 03:11:04 -05:00
|
|
|
-- Copyright 2010-2016 Branimir Karadzic. All rights reserved.
|
|
|
|
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
|
2013-05-17 22:39:08 -04:00
|
|
|
--
|
|
|
|
|
2013-02-22 00:13:56 -05:00
|
|
|
project "shaderc"
|
|
|
|
uuid "f3cd2e90-52a4-11e1-b86c-0800200c9a66"
|
|
|
|
kind "ConsoleApp"
|
|
|
|
|
2015-02-27 18:44:24 -05:00
|
|
|
local GLSL_OPTIMIZER = path.join(BGFX_DIR, "3rdparty/glsl-optimizer")
|
|
|
|
local FCPP_DIR = path.join(BGFX_DIR, "3rdparty/fcpp")
|
2013-02-22 00:13:56 -05:00
|
|
|
|
2014-10-11 15:32:43 -04:00
|
|
|
includedirs {
|
2015-02-27 18:44:24 -05:00
|
|
|
path.join(GLSL_OPTIMIZER, "src"),
|
2014-10-11 15:32:43 -04:00
|
|
|
}
|
|
|
|
|
2015-04-13 15:54:45 -04:00
|
|
|
removeflags {
|
|
|
|
-- GCC 4.9 -O2 + -fno-strict-aliasing don't work together...
|
|
|
|
"OptimizeSpeed",
|
|
|
|
}
|
|
|
|
|
2013-02-22 00:13:56 -05:00
|
|
|
configuration { "vs*" }
|
|
|
|
includedirs {
|
2015-02-27 18:44:24 -05:00
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl/msvc"),
|
2013-02-22 00:13:56 -05:00
|
|
|
}
|
|
|
|
|
2013-03-21 00:44:17 -04:00
|
|
|
defines { -- glsl-optimizer
|
|
|
|
"__STDC__",
|
|
|
|
"__STDC_VERSION__=199901L",
|
|
|
|
"strdup=_strdup",
|
|
|
|
"alloca=_alloca",
|
|
|
|
"isascii=__isascii",
|
|
|
|
}
|
|
|
|
|
2013-03-20 02:34:17 -04:00
|
|
|
buildoptions {
|
|
|
|
"/wd4996" -- warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup.
|
|
|
|
}
|
|
|
|
|
2014-10-18 18:44:45 -04:00
|
|
|
configuration { "mingw* or linux or osx" }
|
2013-04-09 01:06:00 -04:00
|
|
|
buildoptions {
|
2015-04-05 14:55:04 -04:00
|
|
|
"-fno-strict-aliasing", -- glsl-optimizer has bugs if strict aliasing is used.
|
|
|
|
"-Wno-unused-parameter",
|
2013-04-09 01:06:00 -04:00
|
|
|
}
|
2015-04-04 22:45:45 -04:00
|
|
|
removebuildoptions {
|
|
|
|
"-Wshadow", -- glsl-optimizer is full of -Wshadow warnings ignore it.
|
|
|
|
}
|
2013-04-09 01:06:00 -04:00
|
|
|
|
2013-08-04 23:18:33 -04:00
|
|
|
configuration { "osx" }
|
|
|
|
links {
|
|
|
|
"Cocoa.framework",
|
|
|
|
}
|
|
|
|
|
2015-05-26 15:08:12 -04:00
|
|
|
configuration { "vs*" }
|
2013-02-22 00:13:56 -05:00
|
|
|
includedirs {
|
2015-02-27 18:44:24 -05:00
|
|
|
path.join(GLSL_OPTIMIZER, "include/c99"),
|
2013-02-22 00:13:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
configuration {}
|
|
|
|
|
2013-03-21 00:44:17 -04:00
|
|
|
defines { -- fcpp
|
2013-02-22 00:13:56 -05:00
|
|
|
"NINCLUDE=64",
|
|
|
|
"NWORK=65536",
|
|
|
|
"NBUFF=65536",
|
2014-08-22 12:53:14 -04:00
|
|
|
"OLD_PREPROCESSOR=0",
|
2013-02-22 00:13:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
includedirs {
|
2015-02-27 18:44:24 -05:00
|
|
|
path.join(BX_DIR, "include"),
|
|
|
|
path.join(BGFX_DIR, "include"),
|
2013-02-22 00:13:56 -05:00
|
|
|
|
2016-01-30 20:14:09 -05:00
|
|
|
path.join(BGFX_DIR, "3rdparty/dxsdk/include"),
|
2013-02-22 00:13:56 -05:00
|
|
|
FCPP_DIR,
|
|
|
|
|
2015-02-27 18:44:24 -05:00
|
|
|
path.join(GLSL_OPTIMIZER, "include"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/mesa"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/mapi"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl"),
|
2013-02-22 00:13:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
files {
|
2015-02-27 18:44:24 -05:00
|
|
|
path.join(BGFX_DIR, "tools/shaderc/**.cpp"),
|
|
|
|
path.join(BGFX_DIR, "tools/shaderc/**.h"),
|
|
|
|
path.join(BGFX_DIR, "src/vertexdecl.**"),
|
|
|
|
|
|
|
|
path.join(FCPP_DIR, "**.h"),
|
|
|
|
path.join(FCPP_DIR, "cpp1.c"),
|
|
|
|
path.join(FCPP_DIR, "cpp2.c"),
|
|
|
|
path.join(FCPP_DIR, "cpp3.c"),
|
|
|
|
path.join(FCPP_DIR, "cpp4.c"),
|
|
|
|
path.join(FCPP_DIR, "cpp5.c"),
|
|
|
|
path.join(FCPP_DIR, "cpp6.c"),
|
|
|
|
path.join(FCPP_DIR, "cpp6.c"),
|
|
|
|
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/mesa/**.c"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl/**.cpp"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/mesa/**.h"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl/**.c"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl/**.cpp"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl/**.h"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/util/**.c"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/util/**.h"),
|
2013-02-22 00:13:56 -05:00
|
|
|
}
|
|
|
|
|
2015-04-06 14:38:28 -04:00
|
|
|
removefiles {
|
2015-02-27 18:44:24 -05:00
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl/glcpp/glcpp.c"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl/glcpp/tests/**"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl/glcpp/**.l"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl/glcpp/**.y"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl/ir_set_program_inouts.cpp"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl/main.cpp"),
|
|
|
|
path.join(GLSL_OPTIMIZER, "src/glsl/builtin_stubs.cpp"),
|
2013-02-22 00:13:56 -05:00
|
|
|
}
|
2013-04-28 17:08:59 -04:00
|
|
|
|
|
|
|
strip()
|