forked from andyli/PyOpenNI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
60 lines (49 loc) · 1.9 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# -*- mode: cmake; -*-
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This file is part of PyOpenNI.
#
# PyOpenNI is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PyOpenNI is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PyOpenNI. If not, see <http://www.gnu.org/licenses/>.
#
# PyOpenNI is Copyright (C) 2011, Xavier Mendez (jmendeth).
# OpenNI Python Wrapper (ONIPY) is Copyright (C) 2011, Gabriele Nataneli (gamix).
#
# ***** END GPL LICENSE BLOCK *****
# Check that we aren't building in-source
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR
"We don't allow building in the original (source) directory!"
"Please, remove the CMakeCache.txt and repeat from a dedicate directory, e.g:\n"
" rm CMakeCache.txt"
" mkdir ../PyOpenNI-build"
" cd ../PyOpenNI-build"
" cmake ../PyOpenNI #or whatever it is!"
)
endif()
# Setup global vars
cmake_minimum_required (VERSION 2.8)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
set(LIBRARY_RESULT_DIR ${CMAKE_BINARY_DIR}/lib/)
set(ARCHIVE_RESULT_DIR ${CMAKE_BINARY_DIR}/lib/)
set(RUNTIME_RESULT_DIR ${CMAKE_BINARY_DIR}/bin/)
set(MODULE_NAME "openni")
set(BUILD_SHARED_LIBS True)
set(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0" "1.47.1" "1.48" "1.48.0" "1.49.0.beta.1" "1.49.0")
find_package(NumPy REQUIRED)
include_directories(
${NUMPY_INCLUDE_DIRS}
)
project (PyOpenNI)
# Build the library
add_subdirectory (src)