forked from haeriamin/MPM-NGF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (21 loc) · 968 Bytes
/
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
set(TAICHI_PROJECT_NAME "mpm")
if ("${TARGET_ARCHITECTURE}" MATCHES "sandy-bridge")
message("No -DHASWELL for sandy-bridge")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHASWELL")
endif()
file(GLOB PROJECT_SOURCES
"src/*.cpp" "external/SPGrid/*/*.cpp", "src/async/*.cpp")
add_library(taichi_${TAICHI_PROJECT_NAME} SHARED ${PROJECT_SOURCES})
include_directories(external/partio/include)
include_directories(external/)
include_directories(external/libccd/src)
set(TAICHI_PROJECT_LIBRARIES ${TAICHI_PROJECT_LIBRARIES} ${TAICHI_PROJECT_NAME} PARENT_SCOPE)
target_link_libraries(taichi_${TAICHI_PROJECT_NAME} ${CORE_LIBRARY_NAME})
target_link_libraries(taichi_${TAICHI_PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/external/partio/lib/libpartio.a)
find_package(ZLIB)
if (ZLIB_FOUND)
target_link_libraries(taichi_${TAICHI_PROJECT_NAME} z)
endif(ZLIB_FOUND)
target_link_libraries(taichi_${TAICHI_PROJECT_NAME} ccd)
add_subdirectory(external/libccd)