-
Notifications
You must be signed in to change notification settings - Fork 50
/
CMakeLists.txt
67 lines (54 loc) · 1.74 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
60
61
62
63
64
65
66
67
# CMake configuration file spline root dir
#
cmake_minimum_required(VERSION 2.6)
# fixed
project(tspline)
set(VERSION_MAJOR 1)
set(VERSION_MINOR 0)
set(VERSION_PATCH 0)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(UNIX)
add_definitions(-std=c++11)
if(NOT APPLE)
endif(NOT APPLE)
endif(UNIX)
if(WIN32)
if(NOT UNIX)
if(NOT MINGW)
add_definitions(-D_STANDARD_)
endif(NOT MINGW)
endif(NOT UNIX)
endif(WIN32)
find_package(OpenMP)
if(OPENMP_FOUND)
option(OpenMP "Using OpenMP" ON)
message("OpenMP Found")
endif()
if(OpenMP)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
add_definitions(-DUSE_OMP)
endif()
subdirs(source newmat)
include_directories(source newmat)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
FIND_PACKAGE(HTMLHelp)
FIND_PACKAGE(Doxygen)
OPTION(BUILD_DOCUMENTATION "Create and install the HTML based API documentation for tspline kernel (requires Doxygen)" ${DOXYGEN_FOUND})
IF(BUILD_DOCUMENTATION)
IF(NOT DOXYGEN_FOUND)
MESSAGE(FATAL_ERROR "Doxygen is needed to build the documentation.")
ENDIF()
ENDIF()
SET(DOXYFILE_IN ${CMAKE_SOURCE_DIR}/doxy/Doxyfile.in)
SET(DOXYFILE ${CMAKE_SOURCE_DIR}/doxy/Doxyfile)
CONFIGURE_FILE(${DOXYFILE_IN} ${DOXYFILE} @ONLY)
ADD_CUSTOM_TARGET(doc COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/doxy COMMENT "Generating API documentation for tspline kernel." VERBATIM)
OPTION(MAKE_PYTHON_BINDINGS "create python bindings" OFF)
IF (MAKE_PYTHON_BINDINGS)
MESSAGE("MAKE_PYTHON_BINDINGS set to ON")
add_subdirectory(python)
ELSE (MAKE_PYTHON_BINDINGS)
MESSAGE("MAKE_PYTHON_BINDINGS set to OFF")
ENDIF(MAKE_PYTHON_BINDINGS)