use struct variant for InstructCall variants
[hiphop-php.git] / CMake / FindMcrypt.cmake
blob29b16923550e76620f2922ae2e9a20838eb1b139
1 # - Find Mcrypt (a cross platform RPC lib/tool)
2 # This module defines
3 # Mcrypt_INCLUDE_DIR, where to find Mcrypt headers
4 # Mcrypt_LIBS, Mcrypt libraries
5 # Mcrypt_FOUND, If false, do not try to use Mcrypt
7 find_path(Mcrypt_INCLUDE_DIR mcrypt.h PATHS
8     /usr/local/include
9     /opt/local/include
10   )
13 #find_library can't seem to find a 64-bit binary if the 32-bit isn't there
15 set(Mcrypt_LIB_PATHS /usr/local/lib /opt/local/lib /usr/lib64)
16 find_library(Mcrypt_LIB NAMES mcrypt PATHS ${Mcrypt_LIB_PATHS})
18 if (Mcrypt_LIB AND Mcrypt_INCLUDE_DIR)
19   set(Mcrypt_FOUND TRUE)
20   set(Mcrypt_LIBS ${Mcrypt_LIB})
21 else ()
22   set(Mcrypt_FOUND FALSE)
23 endif ()
25 if (Mcrypt_FOUND)
26   if (NOT Mcrypt_FIND_QUIETLY)
27     message(STATUS "Found mcrypt: ${Mcrypt_LIBS}")
28   endif ()
29 else ()
30   if (Mcrypt_FIND_REQUIRED)
31     message(FATAL_ERROR "Could NOT find mcrypt library.")
32   endif ()
33   message(STATUS "mcrypt NOT found.")
34 endif ()
36 mark_as_advanced(
37     Mcrypt_LIB
38     Mcrypt_INCLUDE_DIR
39   )