From 5993aab1743e8e5765f315d91e8e03b8e3695138 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Thu, 24 Jan 2019 14:43:43 -0800 Subject: [PATCH] Fix linker error and build warnings --- libraries/model-baker/CMakeLists.txt | 4 +--- libraries/model-baker/src/model-baker/Baker.cpp | 4 ++-- .../model-baker/src/model-baker/CalculateMeshNormalsTask.cpp | 2 +- .../model-baker/src/model-baker/CalculateMeshTangentsTask.cpp | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/libraries/model-baker/CMakeLists.txt b/libraries/model-baker/CMakeLists.txt index 50b113976f..6fa7c1815a 100644 --- a/libraries/model-baker/CMakeLists.txt +++ b/libraries/model-baker/CMakeLists.txt @@ -1,6 +1,4 @@ set(TARGET_NAME model-baker) setup_hifi_library() -link_hifi_libraries(shared task gpu graphics) - -include_hifi_library_headers(hfm) +link_hifi_libraries(shared task gpu graphics hfm) diff --git a/libraries/model-baker/src/model-baker/Baker.cpp b/libraries/model-baker/src/model-baker/Baker.cpp index f9680ab89f..8d1a82518d 100644 --- a/libraries/model-baker/src/model-baker/Baker.cpp +++ b/libraries/model-baker/src/model-baker/Baker.cpp @@ -56,11 +56,11 @@ namespace baker { blendshapesPerMeshOut = blendshapesPerMeshIn; - for (int i = 0; i < blendshapesPerMeshOut.size(); i++) { + for (int i = 0; i < (int)blendshapesPerMeshOut.size(); i++) { const auto& normalsPerBlendshape = normalsPerBlendshapePerMesh[i]; const auto& tangentsPerBlendshape = tangentsPerBlendshapePerMesh[i]; auto& blendshapesOut = blendshapesPerMeshOut[i]; - for (int j = 0; j < blendshapesOut.size(); j++) { + for (int j = 0; j < (int)blendshapesOut.size(); j++) { const auto& normals = normalsPerBlendshape[j]; const auto& tangents = tangentsPerBlendshape[j]; auto& blendshape = blendshapesOut[j]; diff --git a/libraries/model-baker/src/model-baker/CalculateMeshNormalsTask.cpp b/libraries/model-baker/src/model-baker/CalculateMeshNormalsTask.cpp index 02986e160e..a6884e104d 100644 --- a/libraries/model-baker/src/model-baker/CalculateMeshNormalsTask.cpp +++ b/libraries/model-baker/src/model-baker/CalculateMeshNormalsTask.cpp @@ -18,7 +18,7 @@ void CalculateMeshNormalsTask::run(const baker::BakeContextPointer& context, con auto& normalsPerMeshOut = output; normalsPerMeshOut.reserve(meshes.size()); - for (int i = 0; i < meshes.size(); i++) { + for (int i = 0; i < (int)meshes.size(); i++) { const auto& mesh = meshes[i]; normalsPerMeshOut.emplace_back(); auto& normalsOut = normalsPerMeshOut[normalsPerMeshOut.size()-1]; diff --git a/libraries/model-baker/src/model-baker/CalculateMeshTangentsTask.cpp b/libraries/model-baker/src/model-baker/CalculateMeshTangentsTask.cpp index 51251a0005..e94e15507e 100644 --- a/libraries/model-baker/src/model-baker/CalculateMeshTangentsTask.cpp +++ b/libraries/model-baker/src/model-baker/CalculateMeshTangentsTask.cpp @@ -20,11 +20,10 @@ void CalculateMeshTangentsTask::run(const baker::BakeContextPointer& context, co auto& tangentsPerMeshOut = output; tangentsPerMeshOut.reserve(meshes.size()); - for (int i = 0; i < meshes.size(); i++) { + for (int i = 0; i < (int)meshes.size(); i++) { const auto& mesh = meshes[i]; const auto& tangentsIn = mesh.tangents; const auto& normals = normalsPerMesh[i]; - const auto& vertices = mesh.vertices; tangentsPerMeshOut.emplace_back(); auto& tangentsOut = tangentsPerMeshOut[tangentsPerMeshOut.size()-1];