2010-03-09 09:20:13 -06:00
# - Find the Coriolis includes and libraries.
2010-03-18 10:32:24 -05:00
# The following variables are set if Coriolis is found.
# If Coriolis is not found, CRLCORE_FOUND is set to false.
# CRLCORE_FOUND - True when the Coriolis include directory is found.
# CRLCORE_INCLUDE_DIR - the path to where the Coriolis include files are.
# CRLCORE_LIBRARIES - The path to where the Coriolis library files are.
2010-03-09 09:20:13 -06:00
SET ( CORIOLIS_INCLUDE_PATH_DESCRIPTION "directory containing the Coriolis include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis" )
SET ( CORIOLIS_DIR_MESSAGE "Set the CORIOLIS_INCLUDE_DIR cmake cache entry to the ${CORIOLIS_INCLUDE_PATH_DESCRIPTION}" )
# don't even bother under WIN32
IF ( UNIX )
2010-03-19 09:22:18 -05:00
# Setup the DIR_SEARCH_PATH.
MACRO ( SETUP_SEARCH_DIR project )
IF ( NOT( "$ENV{${project}_USER_TOP}" STREQUAL "" ) )
MESSAGE ( "-- ${project}_USER_TOP is set to $ENV{${project}_USER_TOP}" )
LIST ( FIND ${ project } _DIR_SEARCH "${${project}_DIR_SEARCH}" DIR_INDEX )
IF ( DIR_INDEX LESS 0 )
LIST ( INSERT ${ project } _DIR_SEARCH 0 "$ENV{${project}_USER_TOP}" )
ENDIF ( DIR_INDEX LESS 0 )
ENDIF ( NOT( "$ENV{${project}_USER_TOP}" STREQUAL "" ) )
IF ( NOT( "$ENV{${project}_TOP}" STREQUAL "" ) )
MESSAGE ( "-- ${project}_TOP is set to $ENV{${project}_TOP}" )
LIST ( FIND ${ project } _DIR_SEARCH "${${project}_DIR_SEARCH}" DIR_INDEX )
IF ( DIR_INDEX LESS 0 )
LIST ( INSERT ${ project } _DIR_SEARCH 0 "$ENV{${project}_TOP}" )
ENDIF ( DIR_INDEX LESS 0 )
ENDIF ( NOT( "$ENV{${project}_TOP}" STREQUAL "" ) )
ENDMACRO ( SETUP_SEARCH_DIR project )
SETUP_SEARCH_DIR ( CORIOLIS )
2010-03-09 09:20:13 -06:00
#
# Look for an installation.
#
FIND_PATH ( CRLCORE_INCLUDE_PATH NAMES crlcore/ToolEngine.h PATHS
# Look in other places.
$ { C O R I O L I S _ 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 / c o r i o l i s
# Help the user find it if we cannot.
D O C " T h e $ { C O R I O L I S _ I N C L U D E _ P A T H _ D E S C R I P T I O N } "
)
FIND_LIBRARY ( CRLCORE_LIBRARY_PATH
N A M E S c r l c o r e
P A T H S $ { C O R I O L I S _ 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 $ { C O R I O L I S _ I N C L U D E _ P A T H _ D E S C R I P T I O N } "
)
FIND_LIBRARY ( CRLCORE_STATIC_LIBRARY_PATH
N A M E S c r l c o r e - s t a t i c
P A T H S $ { C O R I O L I S _ 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 $ { C O R I O L I S _ I N C L U D E _ P A T H _ D E S C R I P T I O N } "
)
SET_LIBRARIES_PATH ( CORIOLIS CRLCORE )
HURRICANE_CHECK_LIBRARIES ( CORIOLIS )
ENDIF ( UNIX )