|
@@ -1,5 +1,4 @@
|
|
package("glslang")
|
|
package("glslang")
|
|
-
|
|
|
|
set_homepage("https://github.com/KhronosGroup/glslang/")
|
|
set_homepage("https://github.com/KhronosGroup/glslang/")
|
|
set_description("Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.")
|
|
set_description("Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.")
|
|
set_license("Apache-2.0")
|
|
set_license("Apache-2.0")
|
|
@@ -10,10 +9,15 @@ package("glslang")
|
|
add_versions("1.2.189+1", "2fb89a0072ae7316af1c856f22663fde4928128a")
|
|
add_versions("1.2.189+1", "2fb89a0072ae7316af1c856f22663fde4928128a")
|
|
add_versions("1.3.211+0", "9bb8cfffb0eed010e07132282c41d73064a7a609")
|
|
add_versions("1.3.211+0", "9bb8cfffb0eed010e07132282c41d73064a7a609")
|
|
add_versions("1.3.231+1", "5755de46b07e4374c05fb1081f65f7ae1f8cca81")
|
|
add_versions("1.3.231+1", "5755de46b07e4374c05fb1081f65f7ae1f8cca81")
|
|
|
|
+ add_versions("1.3.236+0", "77551c429f86c0e077f26552b7c1c0f12a9f235e")
|
|
|
|
+ add_versions("1.3.239+0", "ca8d07d0bc1c6390b83915700439fa7719de6a2a")
|
|
|
|
|
|
add_configs("binaryonly", {description = "Only use binary program.", default = false, type = "boolean"})
|
|
add_configs("binaryonly", {description = "Only use binary program.", default = false, type = "boolean"})
|
|
add_configs("exceptions", {description = "Build with exception support.", default = false, type = "boolean"})
|
|
add_configs("exceptions", {description = "Build with exception support.", default = false, type = "boolean"})
|
|
add_configs("rtti", {description = "Build with RTTI support.", default = false, type = "boolean"})
|
|
add_configs("rtti", {description = "Build with RTTI support.", default = false, type = "boolean"})
|
|
|
|
+ if is_plat("wasm") then
|
|
|
|
+ add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
|
|
|
|
+ end
|
|
|
|
|
|
add_deps("cmake", "python 3.x", {kind = "binary"})
|
|
add_deps("cmake", "python 3.x", {kind = "binary"})
|
|
add_deps("spirv-tools")
|
|
add_deps("spirv-tools")
|
|
@@ -33,7 +37,7 @@ package("glslang")
|
|
end
|
|
end
|
|
end)
|
|
end)
|
|
|
|
|
|
- on_install("linux", "windows", "macosx", "mingw", function (package)
|
|
|
|
|
|
+ on_install(function (package)
|
|
package:addenv("PATH", "bin")
|
|
package:addenv("PATH", "bin")
|
|
io.replace("CMakeLists.txt", "ENABLE_OPT OFF", "ENABLE_OPT ON")
|
|
io.replace("CMakeLists.txt", "ENABLE_OPT OFF", "ENABLE_OPT ON")
|
|
io.replace("StandAlone/CMakeLists.txt", "target_link_libraries(glslangValidator ${LIBRARIES})", [[
|
|
io.replace("StandAlone/CMakeLists.txt", "target_link_libraries(glslangValidator ${LIBRARIES})", [[
|
|
@@ -42,6 +46,10 @@ package("glslang")
|
|
io.replace("SPIRV/CMakeLists.txt", "target_link_libraries(SPIRV PRIVATE MachineIndependent SPIRV-Tools-opt)", [[
|
|
io.replace("SPIRV/CMakeLists.txt", "target_link_libraries(SPIRV PRIVATE MachineIndependent SPIRV-Tools-opt)", [[
|
|
target_link_libraries(SPIRV PRIVATE MachineIndependent SPIRV-Tools-opt SPIRV-Tools-link SPIRV-Tools-reduce SPIRV-Tools)
|
|
target_link_libraries(SPIRV PRIVATE MachineIndependent SPIRV-Tools-opt SPIRV-Tools-link SPIRV-Tools-reduce SPIRV-Tools)
|
|
]], {plain = true})
|
|
]], {plain = true})
|
|
|
|
+ if package:is_plat("wasm") then
|
|
|
|
+ -- wasm-ld doesn't support --no-undefined
|
|
|
|
+ io.replace("CMakeLists.txt", [[add_link_options("-Wl,--no-undefined")]], "", {plain = true})
|
|
|
|
+ end
|
|
local configs = {"-DENABLE_CTEST=OFF", "-DBUILD_EXTERNAL=OFF"}
|
|
local configs = {"-DENABLE_CTEST=OFF", "-DBUILD_EXTERNAL=OFF"}
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
|
if package:is_plat("windows") then
|
|
if package:is_plat("windows") then
|