forked from clementfarabet/lua---camera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
30 lines (25 loc) · 912 Bytes
/
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
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
CMAKE_POLICY(VERSION 2.6)
IF(LUAROCKS_PREFIX)
MESSAGE(STATUS "Installing Torch through Luarocks")
STRING(REGEX REPLACE "(.*)lib/luarocks/rocks.*" "\\1" CMAKE_INSTALL_PREFIX "${LUAROCKS_PREFIX}")
MESSAGE(STATUS "Prefix inferred from Luarocks: ${CMAKE_INSTALL_PREFIX}")
ENDIF()
FIND_PACKAGE(Torch REQUIRED)
if (UNIX AND NOT APPLE)
add_subdirectory (opencv)
add_subdirectory (video4linux)
endif (UNIX AND NOT APPLE)
if (APPLE)
add_subdirectory (opencv)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_subdirectory (macos)
endif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
endif (APPLE)
if (NOT UNIX)
message (ERROR "This package only builds on Unix platforms")
endif (NOT UNIX)
install_files(/lua/camera init.lua)
SET(src)
SET(luasrc init.lua)
ADD_TORCH_PACKAGE(camera "${src}" "${luasrc}" "Image Processing")