-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
77 lines (57 loc) · 2.1 KB
/
CMakeLists.txt
File metadata and controls
77 lines (57 loc) · 2.1 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
####################################################################################################
project(pylibtiff)
set(PYLIBTIFF_VERSION_MAJOR 0)
set(PYLIBTIFF_VERSION_MINOR 1)
set(PYLIBTIFF_VERSION_PATCH 0)
set(PYLIBTIFF_VERSION ${PYLIBTIFF_VERSION_MAJOR}.${PYLIBTIFF_VERSION_MINOR}.${PYLIBTIFF_VERSION_PATCH})
####################################################################################################
# check cmake version
cmake_minimum_required(VERSION 2.8)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
####################################################################################################
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS_COMMON} -DSystemLinux)
endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS_COMMON} -DSystemWindows)
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
####################################################################################################
#
# Find Libraries
#
include(FindTIFF)
####################################################################################################
#
# Python
#
include(FindPythonLibs)
##################################################
#
# Numpy
#
find_path(NUMPY_INCLUDE_PATH
NAMES "numpy/arrayobject.h"
PATHS "${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/numpy/core/include"
)
mark_as_advanced(NUMPY_INCLUDE_PATH)
include_directories(${NUMPY_INCLUDE_PATH})
####################################################################################################
#
# Swig
#
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})
include_directories(${PYTHON_INCLUDE_PATH})
set(CMAKE_SWIG_FLAGS_COMMON "-Wall")
####################################################################################################
#
# Sub directories
#
add_subdirectory(src)
####################################################################################################
#
# End
#
####################################################################################################