forked from azagoruyko/colliders
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (38 loc) · 1.28 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 3.0)
if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebInfo)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
"Reset the configurations to Debug and Release"
FORCE)
endif()
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE "Release")
endif ()
project (colliders)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
# Packages
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif ()
find_package( Maya REQUIRED )
ADD_DEFINITIONS(-D__TBB_MAKE_EXCEPTION_PTR_PRESENT -D__TBB_NO_IMPLICIT_LINKAGE)
set(sources
sources/main.cpp
sources/bellCollider.cpp
sources/bellCollider.h
sources/planeCollider.cpp
sources/planeCollider.h
sources/utils.hpp)
add_library(colliders SHARED ${sources})
target_include_directories(colliders PUBLIC ${MAYA_INCLUDE_DIR})
target_link_libraries(
colliders
${MAYA_Foundation_LIBRARY}
${MAYA_OpenMaya_LIBRARY}
${MAYA_OpenMayaUI_LIBRARY}
${MAYA_OpenMayaRender_LIBRARY}
${MAYA_tbb_LIBRARY})
set_target_properties( colliders PROPERTIES OUTPUT_NAME colliders CLEAN_DIRECT_OUTPUT 1 SUFFIX ".mll" )
MAYA_SET_PLUGIN_PROPERTIES( colliders )
install(TARGETS colliders RUNTIME DESTINATION .)