[CMake] Set a variable?
James C. Sutherland
James.Sutherland at utah.edu
Tue Sep 22 09:55:27 EDT 2009
On Sep 22, 2009, at 6:16 AM, motes motes wrote:
> In a CMakeList.txt file I have:
>
> SET(ELASTIX_BUILD E:/local/lib/elastix_sources_v4.1/src/build)
> ...
> LINK_DIRECTORIES(${ELASTIX_BUILD}/Components/Optimizers/
> StandardGradientDescent)
>
>
>
>
> I would to be able to specify the variable: ELASTIX_BUILD when I read
> the CMakeList.txt file and then choose it from the file browser. I
> have tried:
>
> FIND_PACKAGE(ELASTIX_BUILD REQUIRED)
>
> Its now possible to select the path when I run CMake, but I get an
> error when I press configure:
>
> ....which is not a directory containing a package configuraion
> file....
>
> Any ideas on how to specify that a variable should be set when
> running CMake?
>
Perhaps this is what you want?
SET(
ELASTIX_BUILD
E:/local/lib/elastix_sources_v4.1/src/build
CACHE PATH
)
More information about the CMake
mailing list