mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Compare commits
4 Commits
v1.118.841
...
v1.118.845
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
487fa0c63b | ||
|
|
9670cf4f43 | ||
|
|
0ab856a9dc | ||
|
|
73a2b12c5e |
2
bgfx
2
bgfx
Submodule bgfx updated: 6f36b4fb3a...538c9a05eb
2
bx
2
bx
Submodule bx updated: fa1411e4aa...4e67e34c4b
@@ -105,7 +105,7 @@ function(add_bgfx_shader FILE FOLDER)
|
||||
|
||||
foreach(OUT ${OUTPUTS})
|
||||
list(APPEND OUTPUT_FILES ${${OUT}_OUTPUT})
|
||||
list(APPEND COMMANDS COMMAND "$<TARGET_FILE:shaderc>" ${${OUT}})
|
||||
list(APPEND COMMANDS COMMAND "bgfx::shaderc" ${${OUT}})
|
||||
get_filename_component(OUT_DIR ${${OUT}_OUTPUT} DIRECTORY)
|
||||
file(MAKE_DIRECTORY ${OUT_DIR})
|
||||
endforeach()
|
||||
|
||||
@@ -27,8 +27,11 @@ set_target_properties(
|
||||
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}geometryc #
|
||||
)
|
||||
|
||||
if(BGFX_BUILD_TOOLS_GEOMETRY AND BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools geometryc)
|
||||
if(BGFX_BUILD_TOOLS_GEOMETRY)
|
||||
add_executable(bgfx::geometryc ALIAS geometryc)
|
||||
if(BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools geometryc)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(IOS)
|
||||
|
||||
@@ -50,8 +50,11 @@ set_target_properties(
|
||||
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}shaderc #
|
||||
)
|
||||
|
||||
if(BGFX_BUILD_TOOLS_SHADER AND BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools shaderc)
|
||||
if(BGFX_BUILD_TOOLS_SHADER)
|
||||
add_executable(bgfx::shaderc ALIAS shaderc)
|
||||
if(BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools shaderc)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
|
||||
@@ -535,12 +535,14 @@ endfunction()
|
||||
# SHADERS filenames
|
||||
# VARYING_DEF filename
|
||||
# OUTPUT_DIR directory
|
||||
# OUT_FILES_VAR variable name
|
||||
# INCLUDE_DIRS directories
|
||||
# )
|
||||
#
|
||||
function(bgfx_compile_shader_to_header)
|
||||
set(options "")
|
||||
set(oneValueArgs TYPE VARYING_DEF OUTPUT_DIR)
|
||||
set(multiValueArgs SHADERS)
|
||||
set(oneValueArgs TYPE VARYING_DEF OUTPUT_DIR OUT_FILES_VAR)
|
||||
set(multiValueArgs SHADERS INCLUDE_DIRS)
|
||||
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" "${ARGN}")
|
||||
|
||||
set(PROFILES 120 300_es spirv) # pssl
|
||||
@@ -596,12 +598,15 @@ function(bgfx_compile_shader_to_header)
|
||||
PROFILE ${PROFILE}
|
||||
O "$<$<CONFIG:debug>:0>$<$<CONFIG:release>:3>$<$<CONFIG:relwithdebinfo>:3>$<$<CONFIG:minsizerel>:3>"
|
||||
VARYINGDEF ${ARGS_VARYING_DEF}
|
||||
INCLUDES ${BGFX_SHADER_INCLUDE_PATH}
|
||||
INCLUDES ${BGFX_SHADER_INCLUDE_PATH} ${ARGS_INCLUDE_DIRS}
|
||||
BIN2C BIN2C ${SHADER_FILE_NAME_WE}_${PROFILE_EXT}
|
||||
)
|
||||
list(APPEND OUTPUTS ${OUTPUT})
|
||||
list(APPEND COMMANDS COMMAND bgfx::shaderc ${CLI})
|
||||
endforeach()
|
||||
if(DEFINED ARGS_OUT_FILES_VAR)
|
||||
set(${ARGS_OUT_FILES_VAR} ${OUTPUTS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${OUTPUTS}
|
||||
|
||||
@@ -22,8 +22,11 @@ set_target_properties(
|
||||
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}texturec #
|
||||
)
|
||||
|
||||
if(BGFX_BUILD_TOOLS_TEXTURE AND BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools texturec)
|
||||
if(BGFX_BUILD_TOOLS_TEXTURE)
|
||||
add_executable(bgfx::texturec ALIAS texturec)
|
||||
if(BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools texturec)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
|
||||
@@ -22,8 +22,11 @@ set_target_properties(
|
||||
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}bin2c #
|
||||
)
|
||||
|
||||
if(BGFX_BUILD_TOOLS_BIN2C AND BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools bin2c)
|
||||
if(BGFX_BUILD_TOOLS_BIN2C)
|
||||
add_executable(bgfx::bin2c ALIAS bin2c)
|
||||
if(BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools bin2c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
|
||||
Reference in New Issue
Block a user