-
Notifications
You must be signed in to change notification settings - Fork 11
/
UngarConfig.cmake.in
64 lines (51 loc) · 1.92 KB
/
UngarConfig.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
include(CMakeFindDependencyMacro)
@PACKAGE_INIT@
# ##############################################################################
# Core modules.
# ##############################################################################
# Eigen.
find_dependency(Eigen3 3.4.0 REQUIRED NO_MODULE)
# Hana.
find_dependency(Hana REQUIRED)
# Preprocessor.
find_dependency(Preprocessor REQUIRED)
# ##############################################################################
# Optional modules.
# ##############################################################################
if(@UNGAR_ENABLE_LOGGING@)
# spdlog.
find_dependency(spdlog REQUIRED)
endif()
if(@UNGAR_ENABLE_AUTODIFF@)
# FiniteDiff.
find_dependency(FiniteDiff REQUIRED)
# CppAD.
find_library(CppAD_LIBRARY cppad_lib REQUIRED)
find_path(CppAD_INCLUDE_DIR cppad/cppad.hpp REQUIRED)
add_library(CppAD SHARED IMPORTED GLOBAL)
add_library(CppAD::CppAD ALIAS CppAD)
target_include_directories(CppAD INTERFACE ${CppAD_INCLUDE_DIR})
get_filename_component(CppAD_LIBRARY_NAME ${CppAD_LIBRARY} NAME)
get_filename_component(CppAD_LIBRARY_REAL_PATH ${CppAD_LIBRARY} REALPATH)
set_target_properties(CppAD PROPERTIES IMPORTED_SONAME ${CppAD_LIBRARY_NAME})
set_target_properties(CppAD PROPERTIES IMPORTED_LOCATION
${CppAD_LIBRARY_REAL_PATH})
# CppADCodeGen.
find_path(CppADCodeGen_INCLUDE_DIR cppad/cg.hpp REQUIRED)
add_library(CppADCodeGen INTERFACE IMPORTED GLOBAL)
add_library(CppADCodeGen::CppADCodeGen ALIAS CppADCodeGen)
target_include_directories(CppADCodeGen INTERFACE ${CppADCodeGen_INCLUDE_DIR})
endif()
if(@UNGAR_ENABLE_OPTIMIZATION@)
# Abseil.
find_dependency(absl REQUIRED)
# OSQP.
find_dependency(osqp REQUIRED)
# osqp-cpp.
find_dependency(osqp-cpp REQUIRED)
endif()
if(@UNGAR_ENABLE_PINOCCHIO@)
# Abseil.
find_dependency(pinocchio REQUIRED)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")