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
|
|
|
|
|
|
|
|
2008-09-08 03:46:18 -05:00
|
|
|
SET(HURRICANE_INCLUDE_PATH_DESCRIPTION "The directory containing the Hurricane include files. E.g /usr/local/include or /asim/coriolis/include")
|
|
|
|
SET(HURRICANE_LIBRARY_PATH_DESCRIPTION "The directory containing the Hurricane library files. E.g /usr/local/lib or /asim/coriolis/lib")
|
|
|
|
SET(HURRICANE_DIR_MESSAGE "Set the HURRICANE_INCLUDE_DIR cmake cache entry to the ${HURRICANE_INCLUDE_PATH_DESCRIPTION}")
|
2008-02-05 12:34:32 -06:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
#
|
2008-05-22 06:41:35 -05:00
|
|
|
FIND_PATH(HURRICANE_INCLUDE_PATH NAMES hurricane/Cell.h PATHS
|
2008-02-05 12:34:32 -06:00
|
|
|
# Look in other places.
|
|
|
|
${HURRICANE_DIR_SEARCH}
|
2008-05-22 06:41:35 -05:00
|
|
|
PATH_SUFFIXES include
|
2008-02-05 12:34:32 -06:00
|
|
|
# Help the user find it if we cannot.
|
2008-09-08 03:46:18 -05:00
|
|
|
DOC "${HURRICANE_INCLUDE_PATH_DESCRIPTION}"
|
2008-02-05 12:34:32 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY(HURRICANE_LIBRARY_PATH
|
|
|
|
NAMES hurricane
|
|
|
|
PATHS ${HURRICANE_DIR_SEARCH}
|
|
|
|
PATH_SUFFIXES lib
|
|
|
|
# Help the user find it if we cannot.
|
2008-09-08 03:46:18 -05:00
|
|
|
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY(HURRICANE_STATIC_LIBRARY_PATH
|
|
|
|
NAMES hurricane-static
|
|
|
|
PATHS ${HURRICANE_DIR_SEARCH}
|
|
|
|
PATH_SUFFIXES lib
|
|
|
|
# Help the user find it if we cannot.
|
|
|
|
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
2008-02-05 12:34:32 -06:00
|
|
|
)
|
|
|
|
|
2008-10-24 04:11:47 -05:00
|
|
|
FIND_PATH(HURRICANE_GRAPHICAL_INCLUDE_PATH
|
2008-06-18 10:51:45 -05:00
|
|
|
NAMES hurricane/viewer/CellViewer.h hurricane/viewer/HInspectorWidget.h
|
2008-05-22 06:36:13 -05:00
|
|
|
PATHS ${HURRICANE_DIR_SEARCH}
|
2008-05-22 06:41:35 -05:00
|
|
|
PATH_SUFFIXES include
|
2008-05-22 06:36:13 -05:00
|
|
|
# Help the user find it if we cannot.
|
2008-09-08 03:46:18 -05:00
|
|
|
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
2008-05-22 06:36:13 -05:00
|
|
|
)
|
|
|
|
|
2008-10-24 04:11:47 -05:00
|
|
|
FIND_LIBRARY(HURRICANE_GRAPHICAL_LIBRARY_PATH
|
2008-05-22 06:36:13 -05:00
|
|
|
NAMES hviewer
|
|
|
|
PATHS ${HURRICANE_DIR_SEARCH}
|
|
|
|
PATH_SUFFIXES lib
|
|
|
|
# Help the user find it if we cannot.
|
2008-09-08 03:46:18 -05:00
|
|
|
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
|
|
|
)
|
|
|
|
|
2008-10-24 04:11:47 -05:00
|
|
|
FIND_LIBRARY(HURRICANE_GRAPHICAL_STATIC_LIBRARY_PATH
|
2008-09-08 03:46:18 -05:00
|
|
|
NAMES hviewer-static
|
|
|
|
PATHS ${HURRICANE_DIR_SEARCH}
|
|
|
|
PATH_SUFFIXES lib
|
|
|
|
# Help the user find it if we cannot.
|
|
|
|
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
2008-05-22 06:36:13 -05:00
|
|
|
)
|
|
|
|
|
2008-10-24 04:11:47 -05:00
|
|
|
FIND_PATH(HURRICANE_PYTHON_INCLUDE_PATH
|
|
|
|
NAMES hurricane/isobar/PyCell.h
|
|
|
|
PATHS ${HURRICANE_DIR_SEARCH}
|
|
|
|
PATH_SUFFIXES include
|
|
|
|
# Help the user find it if we cannot.
|
|
|
|
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY(HURRICANE_PYTHON_LIBRARY_PATH
|
|
|
|
NAMES isobar
|
|
|
|
PATHS ${HURRICANE_DIR_SEARCH}
|
|
|
|
PATH_SUFFIXES lib
|
|
|
|
# Help the user find it if we cannot.
|
|
|
|
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
|
|
|
)
|
|
|
|
|
2008-02-05 12:34:32 -06:00
|
|
|
# Assume we didn't find it.
|
2008-09-08 03:46:18 -05:00
|
|
|
SET(HURRICANE_FOUND "NOTFOUND")
|
|
|
|
SET(HURRICANE_STATIC_FOUND "NOTFOUND")
|
|
|
|
SET(HURRICANE_GRAPHICAL_FOUND "NOTFOUND")
|
|
|
|
SET(HURRICANE_GRAPHICAL_STATIC_FOUND "NOTFOUND")
|
2008-10-24 04:11:47 -05:00
|
|
|
SET(HURRICANE_PYTHON_FOUND "NOTFOUND")
|
2008-02-05 12:34:32 -06:00
|
|
|
|
|
|
|
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
|
|
|
|
${HURRICANE_INCLUDE_PATH}
|
|
|
|
)
|
|
|
|
SET(HURRICANE_LIBRARIES
|
|
|
|
${HURRICANE_LIBRARY_PATH}
|
|
|
|
)
|
|
|
|
ENDIF(HURRICANE_LIBRARY_PATH)
|
2008-09-08 03:46:18 -05:00
|
|
|
IF(HURRICANE_STATIC_LIBRARY_PATH)
|
|
|
|
SET(HURRICANE_STATIC_FOUND "YES")
|
|
|
|
SET(HURRICANE_INCLUDE_DIR
|
|
|
|
${HURRICANE_INCLUDE_PATH}
|
|
|
|
)
|
|
|
|
SET(HURRICANE_STATIC_LIBRARIES
|
|
|
|
${HURRICANE_STATIC_LIBRARY_PATH}
|
|
|
|
)
|
|
|
|
ENDIF(HURRICANE_STATIC_LIBRARY_PATH)
|
2008-02-05 12:34:32 -06:00
|
|
|
ENDIF(HURRICANE_INCLUDE_PATH)
|
|
|
|
|
2008-10-24 04:11:47 -05:00
|
|
|
IF(HURRICANE_GRAPHICAL_INCLUDE_PATH)
|
|
|
|
IF(HURRICANE_GRAPHICAL_LIBRARY_PATH)
|
2008-02-05 14:22:01 -06:00
|
|
|
SET(HURRICANE_GRAPHICAL_FOUND "YES")
|
2008-05-22 06:36:13 -05:00
|
|
|
SET(HURRICANE_GRAPHICAL_INCLUDE_DIR
|
2008-10-24 04:11:47 -05:00
|
|
|
${HURRICANE_GRAPHICAL_INCLUDE_PATH}
|
2008-05-22 06:36:13 -05:00
|
|
|
)
|
2008-02-05 14:22:01 -06:00
|
|
|
SET(HURRICANE_GRAPHICAL_LIBRARIES
|
2008-10-24 04:11:47 -05:00
|
|
|
${HURRICANE_GRAPHICAL_LIBRARY_PATH}
|
2008-02-05 14:22:01 -06:00
|
|
|
)
|
2008-10-24 04:11:47 -05:00
|
|
|
ENDIF(HURRICANE_GRAPHICAL_LIBRARY_PATH)
|
|
|
|
IF(HURRICANE_GRAPHICAL_STATIC_LIBRARY_PATH)
|
2008-09-08 03:46:18 -05:00
|
|
|
SET(HURRICANE_GRAPHICAL_STATIC_FOUND "YES")
|
|
|
|
SET(HURRICANE_GRAPHICAL_INCLUDE_DIR
|
2008-10-24 04:11:47 -05:00
|
|
|
${HURRICANE_GRAPHICAL_INCLUDE_PATH}
|
2008-09-08 03:46:18 -05:00
|
|
|
)
|
|
|
|
SET(HURRICANE_GRAPHICAL_STATIC_LIBRARIES
|
2008-10-24 04:11:47 -05:00
|
|
|
${HURRICANE_GRAPHICAL_STATIC_LIBRARY_PATH}
|
|
|
|
)
|
|
|
|
ENDIF(HURRICANE_GRAPHICAL_STATIC_LIBRARY_PATH)
|
|
|
|
ENDIF(HURRICANE_GRAPHICAL_INCLUDE_PATH)
|
|
|
|
|
|
|
|
IF(HURRICANE_PYTHON_INCLUDE_PATH)
|
|
|
|
IF(HURRICANE_PYTHON_LIBRARY_PATH)
|
|
|
|
SET(HURRICANE_PYTHON_FOUND "YES")
|
|
|
|
SET(HURRICANE_PYTHON_INCLUDE_DIR
|
|
|
|
${HURRICANE_PYTHON_INCLUDE_PATH}
|
|
|
|
)
|
|
|
|
SET(HURRICANE_PYTHON_LIBRARIES
|
|
|
|
${HURRICANE_PYTHON_LIBRARY_PATH}
|
2008-09-08 03:46:18 -05:00
|
|
|
)
|
2008-10-24 04:11:47 -05:00
|
|
|
ENDIF(HURRICANE_PYTHON_LIBRARY_PATH)
|
|
|
|
ENDIF(HURRICANE_PYTHON_INCLUDE_PATH)
|
2008-02-05 14:22:01 -06:00
|
|
|
|
2008-09-08 03:46:18 -05:00
|
|
|
IF(HURRICANE_FOUND OR HURRICANE_STATIC_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-09-08 03:46:18 -05:00
|
|
|
ELSE(HURRICANE_FOUND OR HURRICANE_STATIC_FOUND)
|
2008-02-05 14:22:01 -06:00
|
|
|
IF(HURRICANE_FIND_REQUIRED)
|
|
|
|
MESSAGE(FATAL_ERROR "HURRICANE was not found. ${HURRICANE_DIR_MESSAGE}")
|
|
|
|
ENDIF(HURRICANE_FIND_REQUIRED)
|
2008-09-08 03:46:18 -05:00
|
|
|
ENDIF(HURRICANE_FOUND OR HURRICANE_STATIC_FOUND)
|
2008-02-05 12:34:32 -06:00
|
|
|
|
|
|
|
MARK_AS_ADVANCED(
|
|
|
|
HURRICANE_INCLUDE_PATH
|
|
|
|
HURRICANE_LIBRARY_PATH
|
2008-09-08 03:46:18 -05:00
|
|
|
HURRICANE_STATIC_LIBRARY_PATH
|
2008-02-05 12:34:32 -06:00
|
|
|
HURRICANE_GRAPHICAL_INCLUDE_PATH
|
2008-10-24 04:11:47 -05:00
|
|
|
HURRICANE_GRAPHICAL_LIBRARY_PATH
|
|
|
|
HURRICANE_GRAPHICAL_STATIC_LIBRARY_PATH
|
|
|
|
HURRICANE_PYTHON_INCLUDE_PATH
|
|
|
|
HURRICANE_PYTHON_LIBRARY_PATH
|
2008-02-05 12:34:32 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
ENDIF(UNIX)
|