2008-02-05 12:34:32 -06:00
# - Find the Hurricane includes and libraries.
# The following variables are set if Hurricane is found. If HURRICANE is not
2008-02-05 14:22:01 -06:00
# found, HURRICANE_FOUND is set to false.
2008-02-05 12:34:32 -06:00
# HURRICANE_FOUND - True when the Hurricane include directory is found.
2008-02-05 14:22:01 -06:00
# HURRICANE_INCLUDE_DIR - the path to where the Hurricane include files are.
# HURRICANE_LIBRARIES - The path to where the Hurricane library files are.
2008-02-05 12:34:32 -06:00
SET ( HURRICANE_INCLUDE_PATH_DESCRIPTION "directory containing the Hurricane include files. E.g /usr/local/include/hurricane or /asim/coriolis/include/hurricane" )
SET ( HURRICANE_DIR_MESSAGE "Set the HURRICANE_INCLUDE_DIR cmake cache entry to the ${HURRICANE_INCLUDE_PATH_DESCRIPTION}" )
# don't even bother under WIN32
IF ( UNIX )
SET ( HURRICANE_DIR_SEARCH $ENV{ HURRICANE_TOP } )
IF ( HURRICANE_DIR_SEARCH )
FILE ( TO_CMAKE_PATH ${ HURRICANE_DIR_SEARCH } HURRICANE_DIR_SEARCH )
ENDIF ( HURRICANE_DIR_SEARCH )
#
# Look for an installation.
#
FIND_PATH ( HURRICANE_INCLUDE_PATH NAMES Cell.h PATHS
# Look in other places.
$ { H U R R I C A N E _ D I R _ S E A R C H }
P A T H _ S U F F I X E S i n c l u d e / h u r r i c a n e
# Help the user find it if we cannot.
D O C " T h e $ { H U R R I C A N E _ I N C L U D E _ P A T H _ D E S C R I P T I O N } "
)
FIND_LIBRARY ( HURRICANE_LIBRARY_PATH
N A M E S h u r r i c a n e
P A T H S $ { H U R R I C A N E _ D I R _ S E A R C H }
P A T H _ S U F F I X E S l i b
# Help the user find it if we cannot.
D O C " T h e $ { H U R R I C A N E _ I N C L U D E _ P A T H _ D E S C R I P T I O N } "
)
2008-02-05 14:22:01 -06:00
FIND_PATH ( HURRICANE_VIEWER_INCLUDE_PATH
2008-04-25 09:15:42 -05:00
N A M E S C e l l V i e w e r . h H I n s p e c t o r W i d g e t . h
2008-02-05 12:34:32 -06:00
P A T H S $ { H U R R I C A N E _ D I R _ S E A R C H }
P A T H _ S U F F I X E S i n c l u d e / h u r r i c a n e
# Help the user find it if we cannot.
D O C " T h e $ { H U R R I C A N E _ I N C L U D E _ P A T H _ D E S C R I P T I O N } "
)
2008-02-05 14:22:01 -06:00
FIND_LIBRARY ( HURRICANE_VIEWER_LIBRARY_PATH
2008-04-25 09:15:42 -05:00
N A M E S h v i e w e r
P A T H S $ { H U R R I C A N E _ D I R _ S E A R C H }
P A T H _ S U F F I X E S l i b
# Help the user find it if we cannot.
D O C " T h e $ { H U R R I C A N E _ I N C L U D E _ P A T H _ D E S C R I P T I O N } "
)
FIND_LIBRARY ( HURRICANE_INSPECTOR_LIBRARY_PATH
N A M E S h i n s p e c t o r
2008-02-05 12:34:32 -06:00
P A T H S $ { H U R R I C A N E _ D I R _ S E A R C H }
P A T H _ S U F F I X E S l i b
# Help the user find it if we cannot.
D O C " T h e $ { H U R R I C A N E _ I N C L U D E _ P A T H _ D E S C R I P T I O N } "
)
# Assume we didn't find it.
SET ( HURRICANE_FOUND 0 )
SET ( HURRICANE_GRAPHICAL_FOUND 0 )
IF ( HURRICANE_INCLUDE_PATH )
2008-02-05 14:22:01 -06:00
IF ( HURRICANE_LIBRARY_PATH )
2008-02-05 12:34:32 -06:00
SET ( HURRICANE_FOUND "YES" )
2008-02-05 14:22:01 -06:00
SET ( HURRICANE_INCLUDE_DIR
$ { H U R R I C A N E _ I N C L U D E _ P A T H }
)
SET ( HURRICANE_LIBRARIES
$ { H U R R I C A N E _ L I B R A R Y _ P A T H }
)
ENDIF ( HURRICANE_LIBRARY_PATH )
2008-02-05 12:34:32 -06:00
ENDIF ( HURRICANE_INCLUDE_PATH )
2008-02-05 14:22:01 -06:00
IF ( HURRICANE_VIEWER_INCLUDE_PATH )
IF ( HURRICANE_VIEWER_LIBRARY_PATH )
SET ( HURRICANE_GRAPHICAL_FOUND "YES" )
SET ( HURRICANE_GRAPHICAL_INCLUDE_DIR
$ { H U R R I C A N E _ V I E W E R _ I N C L U D E _ P A T H }
)
SET ( HURRICANE_GRAPHICAL_LIBRARIES
$ { H U R R I C A N E _ V I E W E R _ L I B R A R Y _ P A T H }
)
ENDIF ( HURRICANE_VIEWER_LIBRARY_PATH )
ENDIF ( HURRICANE_VIEWER_INCLUDE_PATH )
2008-04-25 09:15:42 -05:00
IF ( HURRICANE_INSPECTOR_LIBRARY_PATH )
SET ( HURRICANE_GRAPHICAL_LIBRARIES ${ HURRICANE_GRAPHICAL_LIBRARIES } ${ HURRICANE_INSPECTOR_LIBRARY_PATH } )
ENDIF ( HURRICANE_INSPECTOR_LIBRARY_PATH )
2008-02-05 14:22:01 -06:00
IF ( HURRICANE_FOUND )
2008-02-05 12:34:32 -06:00
IF ( NOT HURRICANE_FIND_QUIETLY )
2008-02-05 14:22:01 -06:00
MESSAGE ( STATUS "Found HURRICANE : ${HURRICANE_LIBRARIES}" )
2008-02-05 12:34:32 -06:00
ENDIF ( NOT HURRICANE_FIND_QUIETLY )
2008-02-05 14:22:01 -06:00
ELSE ( HURRICANE_FOUND )
IF ( HURRICANE_FIND_REQUIRED )
MESSAGE ( FATAL_ERROR "HURRICANE was not found. ${HURRICANE_DIR_MESSAGE}" )
ENDIF ( HURRICANE_FIND_REQUIRED )
ENDIF ( HURRICANE_FOUND )
2008-02-05 12:34:32 -06:00
MARK_AS_ADVANCED (
H U R R I C A N E _ I N C L U D E _ P A T H
H U R R I C A N E _ L I B R A R Y _ P A T H
H U R R I C A N E _ G R A P H I C A L _ I N C L U D E _ P A T H
H U R R I C A N E _ G R A P H I C A L _ L I B R A R Y _ P A T H
2008-04-25 09:15:42 -05:00
H U R R I C A N E _ I N S P E C T O R _ L I B R A R Y _ P A T H
2008-02-05 12:34:32 -06:00
)
ENDIF ( UNIX )