From 7d94f65448658bc6120ce3dc2a38fd9a53dee504 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Wed, 10 Jul 2013 13:00:16 -0700 Subject: [PATCH] Linked ZLIB to voxels library --- interface/src/Application.cpp | 2 +- libraries/voxels/CMakeLists.txt | 7 ++++++- libraries/voxels/src/VoxelTree.cpp | 2 +- libraries/voxels/src/VoxelTree.h | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 9c72a94f5d..6480a39539 100755 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1390,7 +1390,7 @@ void Application::importVoxels() { } else if (fileNameString.endsWith(".svo", Qt::CaseInsensitive)) { importVoxels.readFromSVOFile(fileName); } else { - importVoxels.readFromSchematicsFile(fileName); + importVoxels.readFromSchematicFile(fileName); } VoxelNode* selectedNode = _voxels.getVoxelAt(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z, _mouseVoxel.s); diff --git a/libraries/voxels/CMakeLists.txt b/libraries/voxels/CMakeLists.txt index d873320064..861001ed35 100644 --- a/libraries/voxels/CMakeLists.txt +++ b/libraries/voxels/CMakeLists.txt @@ -15,4 +15,9 @@ include(${MACRO_DIR}/IncludeGLM.cmake) include_glm(${TARGET_NAME} ${ROOT_DIR}) include(${MACRO_DIR}/LinkHifiLibrary.cmake) -link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR}) \ No newline at end of file +link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR}) + +# link ZLIB +find_package(ZLIB) +include_directories(${ZLIB_INCLUDE_DIRS}) +target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES}) diff --git a/libraries/voxels/src/VoxelTree.cpp b/libraries/voxels/src/VoxelTree.cpp index d4b7ec831e..f17919bce9 100644 --- a/libraries/voxels/src/VoxelTree.cpp +++ b/libraries/voxels/src/VoxelTree.cpp @@ -1457,7 +1457,7 @@ bool VoxelTree::readFromSquareARGB32Pixels(const uint32_t* pixels, int dimension return true; } -bool VoxelTree::readFromSchematicsFile(const char *fileName) { +bool VoxelTree::readFromSchematicFile(const char *fileName) { std::stringstream ss; int err = retrieveData(fileName, ss); if (err && ss.get() != TAG_Compound) { diff --git a/libraries/voxels/src/VoxelTree.h b/libraries/voxels/src/VoxelTree.h index d4fe888535..e46ac4c2cb 100644 --- a/libraries/voxels/src/VoxelTree.h +++ b/libraries/voxels/src/VoxelTree.h @@ -135,7 +135,7 @@ public: bool readFromSVOFile(const char* filename); // reads voxels from square image with alpha as a Y-axis bool readFromSquareARGB32Pixels(const uint32_t* pixels, int dimension); - bool readFromSchematicsFile(const char* filename); + bool readFromSchematicFile(const char* filename); void computeBlockColor(int id, int data, int& r, int& g, int& b, int& create); unsigned long getVoxelCount();