FindPhySim.cmake 870 Bytes
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1
2
3
4
5
6
7
8
9
# - Try to find PHYSIM
# Once done this will define
#  
#  PHYSIM_FOUND        - system has PHYSIM
#  PHYSIM_INCLUDE_DIR  - the PHYSIM include directory
#  PHYSIM_LIBRARY_DIR  - where the libraries are
#  PHYSIM_LIBRARY      - Link these to use PHYSIM
#   

Jan Möbius's avatar
Jan Möbius committed
10
IF (PHYSIM_INCLUDE_DIRS)
Jan Möbius's avatar
Jan Möbius committed
11
12
  # Already in cache, be silent
  SET(PHYSIM_FIND_QUIETLY TRUE)
Jan Möbius's avatar
Jan Möbius committed
13
ENDIF (PHYSIM_INCLUDE_DIRS)
Jan Möbius's avatar
Jan Möbius committed
14

Jan Möbius's avatar
Jan Möbius committed
15
FIND_PATH( PHYSIM_INCLUDE_DIRS PhySim/Config/PhySimDefines.hh
Jan Möbius's avatar
Jan Möbius committed
16
           PATHS "${CMAKE_SOURCE_DIR}/libs" )
Jan Möbius's avatar
Jan Möbius committed
17
18
19

add_definitions (-DPHYSIMDLL -DUSEPHYSIM )

Jan Möbius's avatar
Jan Möbius committed
20
IF (PHYSIM_INCLUDE_DIRS)
Jan Möbius's avatar
Jan Möbius committed
21
  SET(PHYSIM_FOUND TRUE)
Jan Möbius's avatar
Jan Möbius committed
22
  SET( PHYSIM_LIBRARY_DIR "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}" )
Jan Möbius's avatar
Jan Möbius committed
23
  SET( PHYSIM_LIBRARY "PhySim")
Jan Möbius's avatar
Jan Möbius committed
24
25
  list (APPEND PHYSIM_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/libs/PhySim")
ELSE (PHYSIM_INCLUDE_DIRS)
Jan Möbius's avatar
Jan Möbius committed
26
27
  SET( PHYSIM_FOUND FALSE )
  SET( PHYSIM_LIBRARY_DIR )
Jan Möbius's avatar
Jan Möbius committed
28
ENDIF (PHYSIM_INCLUDE_DIRS)