ThirdPartySMV.cmake 1.1 KB
Newer Older
1 2 3 4 5 6 7 8
OPTION(THIRDPARTY_BUILD_SMV "Build LibSMV" OFF)

IF (THIRDPARTY_BUILD_SMV)
    INCLUDE(ExternalProject)
    EXTERNALPROJECT_ADD(
        libsmvf1.0
        URL ${TPURL}/libsmvf1.0.tar.gz
        URL_MD5 "40cad0538acebd4aa83136ef9319150e"
9
        STAMP_DIR ${TPBUILD}/stamp
10
        DOWNLOAD_DIR ${TPSRC}
11 12 13 14
        SOURCE_DIR ${TPSRC}/libsmvf1.0
        BINARY_DIR ${TPBUILD}/libsmvf1.0
        TMP_DIR ${TPBUILD}/libsmvf1.0-tmp
        INSTALL_DIR ${TPDIST}
15
        CONFIGURE_COMMAND ${CMAKE_COMMAND}
16
            -DCMAKE_INSTALL_PREFIX:PATH=${TPDIST} ${TPSRC}/libsmvf1.0
17 18
        INSTALL_COMMAND echo "LibSMV compiled successfully"
    )
19 20
    SET(SMV smv CACHE FILEPATH "Path to LibSMV." FORCE)

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