cmake_modules/FindGMP.cmake
author unc0rr
Wed, 23 Nov 2011 20:12:16 +0300
changeset 6414 8474b7fa84d6
parent 2401 2a694ea2a437
permissions -rw-r--r--
Finish preprocessor. Now it correctly handles $IFDEF, $IFNDEF, $ELSE, $ENDIF and $DEFINE. Still not enterprise level, as has some flaws, but is okay to process hedgewars sources.

FIND_PATH(GMP_INCLUDE_DIR gmp.h)

FIND_LIBRARY(GMP_LIBRARY NAMES GMP gmp)

IF (GMP_INCLUDE_DIR AND GMP_LIBRARY)
   SET(GMP_FOUND TRUE)
   ENDIF (GMP_INCLUDE_DIR AND GMP_LIBRARY)

   IF (GMP_FOUND)
      IF (NOT GMP_FIND_QUIETLY)
            MESSAGE(STATUS "Found GMP: ${GMP_LIBRARY}")
      ENDIF (NOT GMP_FIND_QUIETLY)
   ELSE (GMP_FOUND)
   IF (GMP_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find GMP")
   ENDIF (GMP_FIND_REQUIRED)
ENDIF (GMP_FOUND)