~robot3d-team/robot3d/trunk

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
# - Try to find Robot3D
# Once done, this will define
#
#  Robot3D_FOUND - system has Robot3D
#  Robot3D_INCLUDE_DIRS - the Robot3D include directories
#  Robot3D_LIBRARIES - link these to use Robot3D

include(LibFindMacros)

# Dependencies (not useful for Robot3D)
#libfind_package(Robot3D symbicator-simulation1)

# Use pkg-config to get hints about paths (not useful for Robot3D, but it cannot hurt)
libfind_pkg_check_modules(Robot3D_PKGCONF Robot3D)

# Include dir
find_path(Robot3D_INCLUDE_DIR
  NAMES Robot3D
  PATHS ${Robot3D_PKGCONF_INCLUDE_DIRS}
)

# Finally the library itself
find_library(Robot3D_LIBRARY
  NAMES symbicator-simulation1
  PATHS ${Robot3D_PKGCONF_LIBRARY_DIRS}
)

# Set the include dir variables and the libraries and let libfind_process do the rest.
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
set(Robot3D_PROCESS_INCLUDES Robot3D_INCLUDE_DIR Robot3D_INCLUDE_DIRS)
set(Robot3D_PROCESS_LIBS Robot3D_LIBRARY Robot3D_LIBRARIES)
libfind_process(Robot3D)