forked from misyltoad/VPhysics-Jolt
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjolt.cmake
60 lines (48 loc) · 1016 Bytes
/
jolt.cmake
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
# jolt.cmake -- Wrapper for Jolt.cmake in the jolt source code, so we don't need to use the jolt CMakeLists.txt
set(PHYSICS_REPO_ROOT "${CMAKE_CURRENT_LIST_DIR}/joltphysics/src")
include("${SRCDIR}/vphysics_jolt/joltphysics/src/Jolt/Jolt.cmake")
# Common defs
target_compile_definitions(
Jolt PUBLIC
JPH_DISABLE_CUSTOM_ALLOCATOR=1
JPH_DEBUG_RENDERER=1
$<$<CONFIG:Debug>:JPH_ENABLE_ASSERTS>
)
# Arch-related things
if (USE_AVX)
target_compile_definitions(
Jolt PUBLIC
JPH_USE_AVX=1
)
endif()
if (USE_AVX2)
target_compile_definitions(
Jolt PUBLIC
JPH_USE_AVX2=1
)
endif()
if (USE_SSE41)
target_compile_definitions(
Jolt PUBLIC
JPH_USE_SSE4_1=1
)
endif()
if (USE_SSE42)
target_compile_definitions(
Jolt PUBLIC
JPH_USE_SSE4_2=1
)
endif()
if (USE_F16C)
target_compile_definitions(
Jolt PUBLIC
JPH_USE_F16C=1
)
endif()
if (USE_FMADD)
target_compile_definitions(
Jolt PUBLIC
JPH_USE_FMADD=1
)
endif()
set_property(TARGET Jolt PROPERTY FOLDER "${SLN_FOLDER_PREFIX}Libs")