-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
67 lines (51 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_minimum_required(VERSION 2.8.6)
project(pydifem)
set(CMAKE_CXX_STANDARD 14)
add_compile_options(-fPIC)
add_compile_options(-std=gnu++11)
add_compile_options(-Wdeprecated-declarations)
add_definitions(-DSOFTCON_DIR="${CMAKE_HOME_DIRECTORY}")
add_definitions(-DNDEBUG)
set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake_module")
# CGAL
set(CGAL_DONT_OVERRIDE_CMAKE_FLAGS true)
find_package(CGAL COMPONENTS Core)
include(${CGAL_USE_FILE})
# Tiny Obj Loader
set(TOL_INCLUDE_DIRS
"${CMAKE_CURRENT_SOURCE_DIR}/extern/tinyObjLoader"
CACHE PATH "TOL")
include_directories(${TOL_INCLUDE_DIRS})
# Eigen
find_package(Eigen3 3.3.3 REQUIRED)
if (EIGEN3_FOUND)
include_directories(${EIGEN3_INCLUDE_DIR})
endif()
# Rapidjson
if (NOT RAPIDJSON_INCLUDEDIR)
set(RAPIDJSON_INCLUDEDIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/rapidjson/include")
endif()
include_directories("${RAPIDJSON_INCLUDEDIR}")
find_package(rapidjson REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RAPIDJSON_CXX_FLAGS}")
message("Flags : " ${CMAKE_CXX_FLAGS})
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: Debug Release
RelWithDebInfo MinSizeRel."
FORCE)
endif(NOT CMAKE_BUILD_TYPE)
link_directories(sim/)
include_directories(sim/)
link_directories(sim/fem/)
include_directories(sim/fem/)
# include_directories(render/)
# link_directories(render/)
add_subdirectory( sim )
# add_subdirectory( render )
# add_subdirectory( learn )
add_subdirectory(extern/pybind11)
pybind11_add_module(pydifem python/pydifem.cc ${srcs})
target_compile_definitions(pydifem PRIVATE VERSION_INFO=${EXAMPLE_VERSION_INFO})
target_link_libraries(pydifem ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${Boost_LIBRARIES}
${PYTHON_LIBRARIES} sim )