diff options
author | Soumith Chintala <soumith@gmail.com> | 2015-07-30 20:02:59 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2015-07-30 20:02:59 +0300 |
commit | e73d60a94690483af855d64eb25b420ce2c96b6f (patch) | |
tree | c23cda377265209645d81f30a3a6b3e3eee216a3 | |
parent | 73c4a357e5551fce4bfbbea2e42ad59c15207c99 (diff) | |
parent | d5cb4121cc0173ca9d7948950ef215052e3eef81 (diff) |
Merge pull request #88 from samehkhamis/master
Compiling with libpng and libjpeg under Windows
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | png.c | 1 |
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) @@ -1,7 +1,6 @@ #include <TH.h> #include <luaT.h> -#include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> |