forked from torch/image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (29 loc) · 1.17 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
CMAKE_POLICY(VERSION 2.6)
FIND_PACKAGE(Torch REQUIRED)
FIND_PACKAGE(JPEG QUIET)
FIND_PACKAGE(PNG QUIET)
SET(src ppm.c)
ADD_TORCH_PACKAGE(ppm "${src}" "${luasrc}" "Image Processing")
TARGET_LINK_LIBRARIES(ppm luaT TH)
if (JPEG_FOUND)
SET(src jpeg.c)
include_directories (${JPEG_INCLUDE_DIR})
ADD_TORCH_PACKAGE(jpeg "${src}" "${luasrc}" "Image Processing")
TARGET_LINK_LIBRARIES(jpeg luaT TH ${JPEG_LIBRARIES})
else (JPEG_FOUND)
message ("WARNING: Could not find JPEG libraries, JPEG wrapper will not be installed")
endif (JPEG_FOUND)
if (PNG_FOUND)
SET(src png.c)
include_directories (${PNG_INCLUDE_DIR})
ADD_TORCH_PACKAGE(png "${src}" "${luasrc}" "Image Processing")
TARGET_LINK_LIBRARIES(png luaT TH ${PNG_LIBRARIES})
else (PNG_FOUND)
message ("WARNING: Could not find PNG libraries, PNG wrapper will not be installed")
endif (PNG_FOUND)
SET(src image.c)
SET(luasrc init.lua fabio.jpg fabio.png lena.jpg lena.png win.ui)
ADD_TORCH_PACKAGE(image "${src}" "${luasrc}" "Image Processing")
TARGET_LINK_LIBRARIES(image luaT TH)
INSTALL(FILES "README.md" DESTINATION "${Torch_INSTALL_LUA_PATH_SUBDIR}/image")