-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
51 lines (43 loc) · 1.07 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
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
PROJECT( meshTools )
SET( WINDOWS FALSE )
IF( "${CMAKE_SYSTEM_NAME}" MATCHES "Windows" )
SET( WINDOWS TRUE )
ADD_DEFINITIONS( -DPLATFORM_WINDOWS)
ENDIF()
SET( DARWIN FALSE )
IF( "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin" )
SET( DARWIN TRUE )
IF ( NOT ${CMAKE_SYSTEM_VERSION} VERSION_LESS "13.0.0" )
ADD_DEFINITIONS( "-std=c++11" )
ENDIF()
ENDIF()
SET( LINUX FALSE )
IF( "${CMAKE_SYSTEM_NAME}" MATCHES "Linux" )
SET( LINUX TRUE )
ADD_DEFINITIONS( -fPIC )
ENDIF()
IF (${WINDOWS})
SET(PYPREFIX ".pyd")
ENDIF()
IF (${LINUX})
SET(PYPREFIX ".so")
ENDIF()
set(Boost_USE_STATIC_LIBS ON)
ADD_DEFINITIONS( -DBOOST_PYTHON_STATIC_LIB )
FIND_PACKAGE(Boost COMPONENTS python REQUIRED)
FIND_PACKAGE(PythonLibs REQUIRED)
LINK_DIRECTORIES ( ${Boost_LIBRARY_DIR} )
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
set(SUBDIRECTORIES
bezier
bezierModule
geometry
mesh
module
python
)
# loop over subdirectories
foreach(SUBDIR ${SUBDIRECTORIES})
add_subdirectory(${SUBDIR})
endforeach()