Merge pull request #1050 from thochstein/master

Fix cross-compile paths
This commit is contained in:
Sascha Willems 2023-07-12 17:26:50 +02:00 committed by GitHub
commit 054a765eaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -120,8 +120,8 @@ endfunction(buildExamples)
if(RESOURCE_INSTALL_DIR) if(RESOURCE_INSTALL_DIR)
add_definitions(-DVK_EXAMPLE_ASSETS_DIR=\"${RESOURCE_INSTALL_DIR}/\") add_definitions(-DVK_EXAMPLE_ASSETS_DIR=\"${RESOURCE_INSTALL_DIR}/\")
add_definitions(-DVK_EXAMPLE_SHADERS_DIR=\"${RESOURCE_INSTALL_DIR}/\") add_definitions(-DVK_EXAMPLE_SHADERS_DIR=\"${RESOURCE_INSTALL_DIR}/shaders/\")
install(DIRECTORY assets/ DESTINATION ${RESOURCE_INSTALL_DIR}/assets/) install(DIRECTORY assets/ DESTINATION ${RESOURCE_INSTALL_DIR}/)
install(DIRECTORY shaders/ DESTINATION ${RESOURCE_INSTALL_DIR}/shaders/) install(DIRECTORY shaders/ DESTINATION ${RESOURCE_INSTALL_DIR}/shaders/)
else() else()
add_definitions(-DVK_EXAMPLE_ASSETS_DIR=\"${CMAKE_SOURCE_DIR}/assets/\") add_definitions(-DVK_EXAMPLE_ASSETS_DIR=\"${CMAKE_SOURCE_DIR}/assets/\")

View file

@ -414,7 +414,7 @@ public:
if (commandLineParser.isSet("shaders")) { if (commandLineParser.isSet("shaders")) {
shaderDir = commandLineParser.getValueAsString("shaders", "glsl"); shaderDir = commandLineParser.getValueAsString("shaders", "glsl");
} }
const std::string shadersPath = getAssetPath() + "shaders/"+shaderDir+"/computeheadless/"; const std::string shadersPath = getShaderBasePath() + shaderDir + "/computeheadless/";
VkPipelineShaderStageCreateInfo shaderStage = {}; VkPipelineShaderStageCreateInfo shaderStage = {};
shaderStage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; shaderStage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;

View file

@ -647,7 +647,7 @@ public:
if (commandLineParser.isSet("shaders")) { if (commandLineParser.isSet("shaders")) {
shaderDir = commandLineParser.getValueAsString("shaders", "glsl"); shaderDir = commandLineParser.getValueAsString("shaders", "glsl");
} }
const std::string shadersPath = getAssetPath() + "shaders/" + shaderDir + "/renderheadless/"; const std::string shadersPath = getShaderBasePath() + shaderDir + "/renderheadless/";
shaderStages[0].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; shaderStages[0].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
shaderStages[0].stage = VK_SHADER_STAGE_VERTEX_BIT; shaderStages[0].stage = VK_SHADER_STAGE_VERTEX_BIT;