ThirdPartySMV.cmake 978 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
OPTION(THIRDPARTY_BUILD_SMV "Build LibSMV" OFF)

IF (THIRDPARTY_BUILD_SMV)
    INCLUDE(ExternalProject)
    EXTERNALPROJECT_ADD(
        libsmvf1.0
        PREFIX ${TPSRC}
        URL ${TPURL}/libsmvf1.0.tar.gz
        URL_MD5 "40cad0538acebd4aa83136ef9319150e"
        DOWNLOAD_DIR ${TPSRC}
        CONFIGURE_COMMAND ${CMAKE_COMMAND}
          -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist ${TPSRC}/src/libsmvf1.0
        INSTALL_COMMAND echo "LibSMV compiled successfully"
    )
15 16
    SET(SMV smv CACHE FILEPATH "Path to LibSMV." FORCE)

17 18
    MARK_AS_ADVANCED(SMV)
    LINK_DIRECTORIES(${TPSRC}/dist/lib)
19 20 21
    MESSAGE(STATUS "Build LibSMV: ${TPSRC}/dist/lib/lib${SMV}.a")
    SET(NEKTAR_USING_SMV TRUE)
    ADD_DEFINITIONS(-DNEKTAR_USING_SMV)
22
ELSE (THIRDPARTY_BUILD_SMV)
23 24
    IF (NEKTAR_USE_SMV)
        INCLUDE(FindSMV)
25 26 27
        IF (SMV_FOUND)
            MESSAGE(STATUS "Found LibSMV: ${SMV_LIBRARY}")
        ENDIF(SMV_FOUND)
28
    ENDIF (NEKTAR_USE_SMV)
29 30
ENDIF (THIRDPARTY_BUILD_SMV)