mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
always run _bgfx_crosscompile_use_host_tool
This commit is contained in:
@@ -9,28 +9,26 @@ list(GET BGFX_INCLUDE_PATH 0 BGFX_INCLUDE_PATH_1) # bgfx::bgfx exports include d
|
|||||||
set(BGFX_SHADER_INCLUDE_PATH ${BGFX_INCLUDE_PATH_1}/bgfx)
|
set(BGFX_SHADER_INCLUDE_PATH ${BGFX_INCLUDE_PATH_1}/bgfx)
|
||||||
|
|
||||||
# If cross compiling, we need a host-compatible version of shaderc to compile shaders
|
# If cross compiling, we need a host-compatible version of shaderc to compile shaders
|
||||||
if(@CMAKE_CROSSCOMPILING@)
|
macro(_bgfx_crosscompile_use_host_tool TOOL_NAME)
|
||||||
macro(_bgfx_crosscompile_use_host_tool TOOL_NAME)
|
if(NOT TARGET bgfx::${TOOL_NAME})
|
||||||
if(NOT TARGET bgfx::${TOOL_NAME})
|
find_program(
|
||||||
find_program(
|
${TOOL_NAME}_EXECUTABLE
|
||||||
${TOOL_NAME}_EXECUTABLE
|
NAMES bgfx-${TOOL_NAME} ${TOOL_NAME}
|
||||||
NAMES bgfx-${TOOL_NAME} ${TOOL_NAME}
|
PATHS /usr/bin #
|
||||||
PATHS /usr/bin #
|
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/bgfx_x64-linux/tools/bgfx
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/bgfx_x64-linux/tools/bgfx
|
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/bgfx_x64-windows/tools/bgfx
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/bgfx_x64-windows/tools/bgfx
|
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/bgfx_x64-osx/tools/bgfx
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/bgfx_x64-osx/tools/bgfx
|
)
|
||||||
)
|
add_executable(bgfx::${TOOL_NAME} IMPORTED)
|
||||||
add_executable(bgfx::${TOOL_NAME} IMPORTED)
|
set_target_properties(bgfx::${TOOL_NAME} PROPERTIES IMPORTED_LOCATION "${${TOOL_NAME}_EXECUTABLE}")
|
||||||
set_target_properties(bgfx::${TOOL_NAME} PROPERTIES IMPORTED_LOCATION "${${TOOL_NAME}_EXECUTABLE}")
|
endif()
|
||||||
endif()
|
endmacro()
|
||||||
endmacro()
|
|
||||||
|
|
||||||
_bgfx_crosscompile_use_host_tool(bin2c)
|
_bgfx_crosscompile_use_host_tool(bin2c)
|
||||||
_bgfx_crosscompile_use_host_tool(texturec)
|
_bgfx_crosscompile_use_host_tool(texturec)
|
||||||
_bgfx_crosscompile_use_host_tool(shaderc)
|
_bgfx_crosscompile_use_host_tool(shaderc)
|
||||||
_bgfx_crosscompile_use_host_tool(texturev)
|
_bgfx_crosscompile_use_host_tool(texturev)
|
||||||
_bgfx_crosscompile_use_host_tool(geometryv)
|
_bgfx_crosscompile_use_host_tool(geometryv)
|
||||||
endif()
|
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/bgfxToolUtils.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/bgfxToolUtils.cmake")
|
||||||
check_required_components("@PROJECT_NAME@")
|
check_required_components("@PROJECT_NAME@")
|
||||||
|
|||||||
Reference in New Issue
Block a user