[Cmake] Upper case for package names

Stefan Schmidt Stefan.Schmidt at sophia.inria.fr
Fri Apr 25 09:41:46 EDT 2003


Thanks for the quick answer.

> There is no easy way right now to upper-case a string from cmake listfile
> code, but this has been added to the list of features for the next
> version.  If you are willing to invest the time, it is possible to write a
> dynamically loaded command in C code that does anything you want.

Sounds interesting, but... doesn't this command needs to be compiled, somehow, 
before using it. So, can it be part of my source tree and be compiled 
automatically by CMake before it's used in the same build?

> What are you trying to accomplish by automatically generating *_DIR
> entries?  Do you mean you are trying to set their values automatically, or
> just make the entries available?
I want to set them.
I'm trying to setup a build framework which is a little bit more complicated. 
My CMake project consists of several "packages" which can be either compiled 
as part of the project or used from a prebuilt source. I want to use the 
FIND_PACKAGE mechanism to setup the proper INCLUDE_DIRs and LINK_DIRs (so the 
package can be used stand-alone, too).
As in my main CMakeList, I already know where to look for the 
<pkg>Config.cmake file, I wanted to preset the _DIR cache entry 
automatically. 


Regards,
Stefan




More information about the CMake mailing list