[CMake] How to use FIND_PACKAGE(xxx) ?
alexis lameire
alexisis-pristontale at hotmail.com
Sat Aug 1 18:29:10 EDT 2009
Date: Sun, 2 Aug 2009 00:07:02 +0200
From: mort.motes at gmail.com
To: cmake at cmake.org
Subject: [CMake] How to use FIND_PACKAGE(xxx) ?
I am building an application with cmake that depends on the Elastix library:
http://elastix.isi.uu.nl/about.php
I have already build Elastix. I am trying to do the following in a CMakeLists.txt file:
------------------------------------------------------------------------------------------------------------------------------------
# Find Elastix
FIND_PACKAGE(ELASTIX REQUIRED)
IF( ELASTIX_FOUND )
INCLUDE( ${ELASTIX_USE_FILE} )
ELSE( ELASTIX_FOUND )
MESSAGE( FATAL_ERROR "Cannot build without ELASTIX. Please set ELASTIX_DIR." )
ENDIF( ELASTIX_FOUND )
# I need to use the following:
INCLUDE_DIRECTORIES(${ELASTIX_SRC}/Core/Kernel)
INCLUDE_DIRECTORIES(${ELASTIX_SRC}/Core/Configuration)
INCLUDE_DIRECTORIES(${ELASTIX_SRC}/Core/ComponentBaseClasses)
LINK_DIRECTORIES(G:/diku/speciale/local/lib/GnuWin32/src/zlib/1.2.3/zlib-1.2.3)
LINK_DIRECTORIES(${ELASTIX_BUILD})
LINK_DIRECTORIES(${ELASTIX_BUILD}/Components/Optimizers/StandardGradientDescent)
------------------------------------------------------------------------------------------------------------------------------------
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?
to use find package an another developper must have creat findxxx.cmake macro !
this library is not yet implemented and you must creat manualy the findxxx.cmake script and distribut it with your program !
_________________________________________________________________
Vous voulez savoir ce que vous pouvez faire avec le nouveau Windows Live ? Lancez-vous !
http://www.microsoft.com/windows/windowslive/default.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090801/24b0658b/attachment-0001.htm>
More information about the CMake
mailing list