ThirdPartyCCM.cmake 990 Bytes
Newer Older
1 2 3 4
########################################################################
#
# ThirdParty configuration for Nektar++
#
Michael Turner's avatar
Michael Turner committed
5
# Star CCM i/o
6 7
#
########################################################################
Michael Turner's avatar
Michael Turner committed
8
OPTION(NEKTAR_USE_CCM
9 10 11
   "CCM star i/o library is available." OFF)

IF( NEKTAR_USE_CCM )
Michael Turner's avatar
Michael Turner committed
12 13 14 15 16 17 18 19

    set(CCMIO_LIBRARIES
        ccmio
        adf
    )

    FIND_LIBRARY(CCMIO_LIBRARY NAMES "ccmio" PATHS /usr/local/lib ${Nektar++_TP_LIBRARY_DIRS})

20
    IF( CCMIO_LIBRARY )
Michael Turner's avatar
Michael Turner committed
21
        MESSAGE(STATUS "Found Ccmio: ${CCMIO_LIBRARY}")
22 23
        MARK_AS_ADVANCED(CCMIO_LIBRARY)
        ADD_DEFINITIONS(-DNEKTAR_USE_CCM)
24
        FIND_PATH (CCMIO_INCLUDE_DIR ccmio.h)
Michael Turner's avatar
Michael Turner committed
25 26 27 28
        GET_FILENAME_COMPONENT(CCMIO_LIBRARY_DIR ${CCMIO_LIBRARY} PATH)
        INCLUDE_DIRECTORIES(NekMesh ${CCMIO_INCLUDE_DIR})
        LINK_DIRECTORIES(${CCMIO_LIBRARY_DIR})
        MESSAGE(STATUS ${CCMIO_LIBRARY_DIR})
29 30 31 32 33
     ELSE()
        MESSAGE(FATAL_ERROR "Cound not find ccmio library")
     ENDIF()
ENDIF( NEKTAR_USE_CCM )