<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br><br><hr id="stopSpelling">Date: Sun, 2 Aug 2009 00:07:02 +0200<br>From: mort.motes@gmail.com<br>To: cmake@cmake.org<br>Subject: [CMake] How to use FIND_PACKAGE(xxx) ?<br><br>I am building an application with cmake that depends on the Elastix&nbsp; library:<br><br><a>http://elastix.isi.uu.nl/about.php</a><br><br>I have already build Elastix. I am trying to do the following in a CMakeLists.txt file:<br>
<br>------------------------------------------------------------------------------------------------------------------------------------<br># Find Elastix<br>FIND_PACKAGE(ELASTIX REQUIRED)<br>IF( ELASTIX_FOUND )<br>&nbsp; INCLUDE( ${ELASTIX_USE_FILE} )<br>
ELSE( ELASTIX_FOUND )<br>&nbsp; MESSAGE( FATAL_ERROR "Cannot build without ELASTIX.&nbsp; Please set ELASTIX_DIR." )<br>ENDIF( ELASTIX_FOUND )<br><br><br># I need to use the following:<br>INCLUDE_DIRECTORIES(${ELASTIX_SRC}/Core/Kernel)<br>
INCLUDE_DIRECTORIES(${ELASTIX_SRC}/Core/Configuration)<br>INCLUDE_DIRECTORIES(${ELASTIX_SRC}/Core/ComponentBaseClasses)<br><br>LINK_DIRECTORIES(G:/diku/speciale/local/lib/GnuWin32/src/zlib/1.2.3/zlib-1.2.3)<br>LINK_DIRECTORIES(${ELASTIX_BUILD})<br>
LINK_DIRECTORIES(${ELASTIX_BUILD}/Components/Optimizers/StandardGradientDescent)<br>------------------------------------------------------------------------------------------------------------------------------------<br><br>
But this does not work since ELASTIX_SRC and&nbsp; ELASTIX_BUILD are not defined. I defined those manually earlier but is there no way to include the Elastix library in a more generic way?<br><br>to use find package an another developper must have creat findxxx.cmake macro ! <br>this library is not yet implemented and you must creat manualy the findxxx.cmake script and distribut it with your program !<br><br /><hr />Vous voulez savoir ce que vous pouvez faire avec le nouveau Windows Live ? <a href='http://www.microsoft.com/windows/windowslive/default.aspx' target='_new'>Lancez-vous !</a></body>
</html>