@PACKAGE_INIT@ if(@BGFX_CMAKE_USER_SCRIPT_PRESENT@) include("${CMAKE_CURRENT_LIST_DIR}/@BGFX_CMAKE_USER_SCRIPT_INSTALL_NAME@") endif() include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") get_target_property(BGFX_INCLUDE_PATH bgfx::bgfx INTERFACE_INCLUDE_DIRECTORIES) list(GET BGFX_INCLUDE_PATH 0 BGFX_INCLUDE_PATH_1) # bgfx::bgfx exports include directory twice? set(BGFX_SHADER_INCLUDE_PATH ${BGFX_INCLUDE_PATH_1}/bgfx) # If cross compiling, we need a host-compatible version of shaderc to compile shaders macro(_bgfx_crosscompile_use_host_tool TOOL_NAME) if(NOT TARGET bgfx::${TOOL_NAME}) find_program( ${TOOL_NAME}_EXECUTABLE NAMES bgfx-${TOOL_NAME} ${TOOL_NAME} PATHS @BGFX_ADDITIONAL_TOOL_PATHS@ /usr/bin ) add_executable(bgfx::${TOOL_NAME} IMPORTED) set_target_properties(bgfx::${TOOL_NAME} PROPERTIES IMPORTED_LOCATION "${${TOOL_NAME}_EXECUTABLE}") endif() endmacro() _bgfx_crosscompile_use_host_tool(bin2c) _bgfx_crosscompile_use_host_tool(texturec) _bgfx_crosscompile_use_host_tool(shaderc) _bgfx_crosscompile_use_host_tool(texturev) _bgfx_crosscompile_use_host_tool(geometryv) include("${CMAKE_CURRENT_LIST_DIR}/bgfxToolUtils.cmake") check_required_components("@PROJECT_NAME@")