Re: [CMake] Need help generating a config file

2016-10-13 Thread Aaron Boxer
Eric, thanks, I figured it out. On Thu, Oct 13, 2016 at 3:27 PM, Eric Noulard wrote: > > > 2016-10-13 21:18 GMT+02:00 Aaron Boxer : > >> Hello, >> >> I have a foo.h.cmake.in file that I am using to generate a >> foo_config.hfile. >> >> Here is the line in my cmake file that generates

Re: [CMake] Need help generating a config file

2016-10-13 Thread Aaron Boxer
Thanks a lot, Eric. So, I have two cmake variables, and I want to #define FOO_DEFINE if one or the other is set, otherwise I don't want FOO_DEFINE defines at all. Is this possible ? On Thu, Oct 13, 2016 at 3:27 PM, Eric Noulard wrote: > > > 2016-10-13 21:18 GMT+02:00 Aaron Boxer : > >> Hello

Re: [CMake] Need help generating a config file

2016-10-13 Thread Eric Noulard
2016-10-13 21:18 GMT+02:00 Aaron Boxer : > Hello, > > I have a foo.h.cmake.in file that I am using to generate a > foo_config.hfile. > > Here is the line in my cmake file that generates the header: > > configure_file(${CMAKE_CURRENT_SOURCE_DIR}/foo.h.cmake.in > ${CMAKE_CURRENT_BINARY

[CMake] Need help generating a config file

2016-10-13 Thread Aaron Boxer
Hello, I have a foo.h.cmake.in file that I am using to generate a foo_config.hfile. Here is the line in my cmake file that generates the header: configure_file(${CMAKE_CURRENT_SOURCE_DIR}/foo.h.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/foo_config.h @ONLY) I would like to define or und

[CMake] PROPERTIES VERSION bug in windows DLL major.minor version

2016-10-13 Thread Dave Flogeras
Hi, I noticed that on an older (3.2.2) release I was using with Win7, the behaviour described about automatically parsing VERSION major.minor and putting it into the DLL image version wasn't behaving correctly. It seemed it was applying the VERSION from the first shared library in my project, to a

Re: [CMake] How to handle options with more than two possible values?

2016-10-13 Thread Petr Kmoch
Hi. option() is a handy shortcut for boolean options, but it's little more than syntactic sugar for a cache variable of type BOOL. To create a tristate variable, you can do this: set(ENABLE_SOMETHING AUTO CACHE STRING "Enable SOMETHING support") # create the variable set_property(CACHE ENABL

[CMake] How to handle options with more than two possible values?

2016-10-13 Thread YuGiOhJCJ Mailing-List via CMake
Hello, Regarding the cmake-commands manual [1], the "option" command seems to take as argument a boolean constant that can have the two possible values: ON or OFF. I would like to use three possible values for an option: AUTO (as default value), ON or OFF. Example: option(ENABLE_SOMETHING "Ena