I am building an application with cmake that depends on the Elastix  library:<br><br><a href="http://elastix.isi.uu.nl/about.php">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>  INCLUDE( ${ELASTIX_USE_FILE} )<br>
ELSE( ELASTIX_FOUND )<br>  MESSAGE( FATAL_ERROR &quot;Cannot build without ELASTIX.  Please set ELASTIX_DIR.&quot; )<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  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>