I don't understand how to configure project and handling command line options using CMake. I need to set variables of directories of 3rd party library (for example Poco and GTest). Usual, i just run ./configure with necessary parameters. For example:
./configure --poco-inc=~/libs/poco/include --poco-lib=~/libs/poco/lib --gtest-inc=~/libs/gtest/include --gtest-lib=~/libs/gtest/lib
But how do I pass the equivalent information to CMake ? How to specify options and handling it with 'set' or 'property' in cmake file ?
Additionally, you can use OPTION command
option(<option_variable> "help string describing option" [initial value])
See also
http://cmake.org/cmake/help/v2.8.10/cmake.html#command:option
The options are defined by cmake command line arguments
-D<variable-name>=<value>
You can also use
cmake -LH
to display the options and their help messages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With