forked from thomasmarsh/ODE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathode-config.cmake.in
72 lines (62 loc) · 3.13 KB
/
ode-config.cmake.in
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
68
69
70
71
72
set(ODE_VERSION "@VERSION@")
set(ODE_VERSION_MAJOR "@VERSION_MAJOR@")
set(ODE_VERSION_MINOR "@VERSION_MINOR@")
set(ODE_VERSION_PATCH "@VERSION_PATCH@")
set(ODE_16BIT_INDICES @ODE_16BIT_INDICES@)
set(ODE_DOUBLE_PRECISION @ODE_DOUBLE_PRECISION@)
set(ODE_NO_BUILTIN_THREADING_IMPL @ODE_NO_BUILTIN_THREADING_IMPL@)
set(ODE_NO_THREADING_INTF @ODE_NO_THREADING_INTF@)
set(ODE_OLD_TRIMESH @ODE_OLD_TRIMESH@)
set(ODE_WITH_GIMPACT @ODE_WITH_GIMPACT@)
set(ODE_WITH_LIBCCD @ODE_WITH_LIBCCD@)
set(ODE_WITH_LIBCCD_BOX_CYL @ODE_WITH_LIBCCD_BOX_CYL@)
set(ODE_WITH_LIBCCD_CAP_CYL @ODE_WITH_LIBCCD_CAP_CYL@)
set(ODE_WITH_LIBCCD_CYL_CYL @ODE_WITH_LIBCCD_CYL_CYL@)
set(ODE_WITH_LIBCCD_CONVEX_BOX @ODE_WITH_LIBCCD_CONVEX_BOX@)
set(ODE_WITH_LIBCCD_CONVEX_CAP @ODE_WITH_LIBCCD_CONVEX_CAP@)
set(ODE_WITH_LIBCCD_CONVEX_CONVEX @ODE_WITH_LIBCCD_CONVEX_CONVEX@)
set(ODE_WITH_LIBCCD_CONVEX_CYL @ODE_WITH_LIBCCD_CONVEX_CYL@)
set(ODE_WITH_LIBCCD_CONVEX_SPHERE @ODE_WITH_LIBCCD_CONVEX_SPHERE@)
set(ODE_WITH_LIBCCD_SYSTEM @ODE_WITH_LIBCCD_SYSTEM@)
set(ODE_WITH_OPCODE @ODE_WITH_OPCODE@)
set(ODE_WITH_OU @ODE_WITH_OU@)
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/ode-export.cmake")
set(ODE_DEFINITIONS "")
set(ODE_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include")
set(ODE_LIBRARY_DIR "${PACKAGE_PREFIX_DIR}/lib")
macro(select_library_location target basename)
if(TARGET ${target})
foreach(property IN ITEMS IMPORTED_LOCATION IMPORTED_IMPLIB)
get_target_property(${basename}_${property}_DEBUG ${target} ${property}_DEBUG)
get_target_property(${basename}_${property}_MINSIZEREL ${target} ${property}_MINSIZEREL)
get_target_property(${basename}_${property}_RELEASE ${target} ${property}_RELEASE)
get_target_property(${basename}_${property}_RELWITHDEBINFO ${target} ${property}_RELWITHDEBINFO)
if(${basename}_${property}_DEBUG AND ${basename}_${property}_RELEASE)
set(${basename}_LIBRARY debug ${${basename}_${property}_DEBUG} optimized ${${basename}_${property}_RELEASE})
elseif(${basename}_${property}_DEBUG AND ${basename}_${property}_RELWITHDEBINFO)
set(${basename}_LIBRARY debug ${${basename}_${property}_DEBUG} optimized ${${basename}_${property}_RELWITHDEBINFO})
elseif(${basename}_${property}_DEBUG AND ${basename}_${property}_MINSIZEREL)
set(${basename}_LIBRARY debug ${${basename}_${property}_DEBUG} optimized ${${basename}_${property}_MINSIZEREL})
elseif(${basename}_${property}_RELEASE)
set(${basename}_LIBRARY ${${basename}_${property}_RELEASE})
elseif(${basename}_${property}_RELWITHDEBINFO)
set(${basename}_LIBRARY ${${basename}_${property}_RELWITHDEBINFO})
elseif(${basename}_${property}_MINSIZEREL)
set(${basename}_LIBRARY ${${basename}_${property}_MINSIZEREL})
elseif(${basename}_${property}_DEBUG)
set(${basename}_LIBRARY ${${basename}_${property}_DEBUG})
endif()
endforeach()
endif()
endmacro()
select_library_location(ODE::ODE ODE)
set(ODE_INCLUDE_DIRS ${ODE_INCLUDE_DIR})
set(ODE_LIBRARIES ${ODE_LIBRARY})
set(ODE_LIBRARY_DIRS ${ODE_LIBRARY_DIR})
include(CMakeFindDependencyMacro)
if(ODE_WITH_LIBCCD_SYSTEM)
find_dependency(ccd)
list(APPEND ODE_LIBRARIES ${CCD_LIBRARIES})
list(APPEND ODE_LIBRARY_DIRS ${CCD_LIBRARY_DIRS})
endif()