Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/image.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2015-07-30 20:02:59 +0300
committerSoumith Chintala <soumith@gmail.com>2015-07-30 20:02:59 +0300
commite73d60a94690483af855d64eb25b420ce2c96b6f (patch)
treec23cda377265209645d81f30a3a6b3e3eee216a3
parent73c4a357e5551fce4bfbbea2e42ad59c15207c99 (diff)
parentd5cb4121cc0173ca9d7948950ef215052e3eef81 (diff)
Merge pull request #88 from samehkhamis/master
Compiling with libpng and libjpeg under Windows
-rw-r--r--CMakeLists.txt6
-rw-r--r--png.c1
2 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 96cfe9e..007a949 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,9 @@ if (JPEG_FOUND)
include_directories (${JPEG_INCLUDE_DIR})
ADD_TORCH_PACKAGE(jpeg "${src}" "${luasrc}" "Image Processing")
TARGET_LINK_LIBRARIES(jpeg luaT TH ${JPEG_LIBRARIES})
+ IF(LUALIB)
+ TARGET_LINK_LIBRARIES(jpeg ${LUALIB})
+ ENDIF()
else (JPEG_FOUND)
message ("WARNING: Could not find JPEG libraries, JPEG wrapper will not be installed")
endif (JPEG_FOUND)
@@ -26,6 +29,9 @@ if (PNG_FOUND)
include_directories (${PNG_INCLUDE_DIR})
ADD_TORCH_PACKAGE(png "${src}" "${luasrc}" "Image Processing")
TARGET_LINK_LIBRARIES(png luaT TH ${PNG_LIBRARIES})
+ IF(LUALIB)
+ TARGET_LINK_LIBRARIES(png ${LUALIB})
+ ENDIF()
else (PNG_FOUND)
message ("WARNING: Could not find PNG libraries, PNG wrapper will not be installed")
endif (PNG_FOUND)
diff --git a/png.c b/png.c
index 0acca5a..e139bfd 100644
--- a/png.c
+++ b/png.c
@@ -1,7 +1,6 @@
#include <TH.h>
#include <luaT.h>
-#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>