forked from siconos/siconos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
siconos-config.cmake.in
82 lines (63 loc) · 2.55 KB
/
siconos-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
73
74
75
76
77
78
79
80
# =================================================================
# siconos configuration file.
# Check https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-packages
# This file has been generated during siconos install and
# may be used by another cmake project to retrieve all the configuration variables
# of siconos.
#
#
# Usage :
#
# find_package(siconos)
# ... define some target ...
# target_link_libraries(my_target ${siconos_LIBRARIES})
#
# A call to find_package(siconos) will define targets
# Siconos::<component> with component = externals, numerics, kernel ...
#
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
# Name of the siconos package
set(PACKAGE_NAME siconos)
# set path to siconos installation
set_and_check(siconos_ROOT "@CMAKE_INSTALL_PREFIX@")
set_and_check(siconos_SCRIPT "@CMAKE_INSTALL_PREFIX@/bin/siconos")
# set list of targets build by siconos project
set(installed_targets "@installed_targets@")
# Path (relative to siconos install) to cmake extra tools
set(SICONOS_CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/@SiconosConfigPackageLocation@)
list(APPEND CMAKE_MODULE_PATH ${SICONOS_CMAKE_MODULE_PATH})
set(CMAKE_EXPORT_COMPILE_COMMANDS @CMAKE_EXPORT_COMPILE_COMMANDS@ CACHE BOOL "" FORCE)
set(CMAKE_CXX_STANDARD @CMAKE_CXX_STANDARD@)
# Ensure that the same compiler will be used with siconos script
set(CMAKE_CXX_COMPILER @CMAKE_CXX_COMPILER@)
set(CMAKE_C_COMPILER @CMAKE_C_COMPILER@)
set(CMAKE_Fortran_COMPILER @CMAKE_Fortran_COMPILER@)
# --- Siconos extra components or options ---
set(HAS_PYTHON_WRAPPER @WITH_PYTHON_WRAPPER@)
if(HAS_PYTHON_WRAPPER)
set(Python_EXECUTABLE @Python_EXECUTABLE@)
endif()
# --- Numerics component extras ---
set(HAS_ONE_LP_SOLVER @HAS_ONE_LP_SOLVER@)
# --- Mechanics component extras ---
# mechanics component with bullet?
set(SICONOS_HAS_BULLET @SICONOS_HAS_BULLET@)
# mechanics (and/or mechanisms) component with oce?
set(SICONOS_HAS_OpenCASCADE @SICONOS_HAS_OpenCASCADE@)
if(@WITH_FCLIB@)
set(FCLIB_ROOT @FCLIB_ROOT@)
if(${CMAKE_VERSION} VERSION_LESS "3.13.0")
set(FCLIB_DIR @FCLIB_DIR@)
endif()
# Look for fclib in default path, FCLIB_DIR (cmake <3.12)
# and/or FCLIB_ROOT (cmake >= 3.12).
find_dependency(FCLIB 3.0.0 CONFIG REQUIRED)
endif()
# include siconos project targets
include("${CMAKE_CURRENT_LIST_DIR}/siconosTargets.cmake")
if(${mechanisms_installed})
set_and_check(siconos_mechanisms_SCRIPT "@CMAKE_INSTALL_PREFIX@/bin/siconos_mechanisms")
endif()
# --- Final check to set (or not) siconos_FOUND, siconos_numerics_FOUND and so on
check_required_components(siconos)