<div dir="ltr">I&#39;m attempting to convert a multi-platform autotools system to a cmake system and learning cmake in the process.&nbsp; Cmake is having a problem finding crypt on my system whereas configure has no problem, I&#39;m attaching the <a href="http://configure.in">configure.in</a> code as well as my cmake code.<br>
<br>__Configure.in snippet__<br>AC_CHECK_FUNC(crypt, AC_DEFINE(GOT_CRYPT),<br>&nbsp;&nbsp;&nbsp; [AC_CHECK_LIB(crypt, crypt, AC_DEFINE(GOT_CRYPT) CRYPTLIB=&quot;-lcrypt&quot;)]<br>&nbsp;&nbsp;&nbsp; )<br><br>__CMakeLists.txt snippet__<br># Check for crypt, if not found check for crypt in libcrypt<br>
CHECK_FUNCTION_EXISTS(crypt CRYPT_EXISTS)<br>IF(NOT ${CRYPT_EXISTS})<br>&nbsp;&nbsp;&nbsp; CHECK_LIBRARY_EXISTS(crypt crypt &quot;&quot; CRYPT_LIB_EXISTS)<br>ENDIF(NOT ${CRYPT_EXISTS})<br><br>IF(${CRYPT_LIB_EXISTS})<br>&nbsp;&nbsp;&nbsp; SET(BLISS2_LIBRARIES &quot;${BLISS2_LIBRARIES} crypt&quot;)<br>
&nbsp;&nbsp;&nbsp; MESSAGE(STATUS &quot;Found crypt in libcrypt&quot;)<br>&nbsp;&nbsp;&nbsp; SET(GOT_CRYPT 1)<br>ELSEIF(${CRYPT_EXISTS})<br>&nbsp;&nbsp;&nbsp; MESSAGE(STATUS &quot;Found crypt&quot;)<br>&nbsp;&nbsp;&nbsp; SET(CIRCLE_CRYPT 1)<br>ELSE(${CRYPT_LIB_EXISTS})<br>&nbsp;&nbsp;&nbsp; MESSAGE(STATUS &quot;Could not find crypt&quot;)<br>
ENDIF(${CRYPT_LIB_EXISTS})<br><br>The autoconf code finds crypt in libcrypt on my system, the cmake does not.&nbsp; I use the same cmake code to find socket, gethostbyaddr, etc and they all work, just not for crypt.&nbsp; Any help will be greatly appreciated!<br>
<br></div>