Hi,

I want to create a config file for my package so that it can be found using find_package()

In the config file, I have to define the following variables:

 * <NAME>_FOUND
 * <NAME>_INCLUDE_DIRS
 * <NAME>_LIBRARIES
 * <NAME>_DEFINITIONS

I can't find any clear documentation concerning <NAME>_DEFINITION.
Should I export the definitions prefixed with or without "-D".

To be clear, if the package neads to be build with
add_definitions("-DMY_DEF")
in <NAME>Config.cmake should I set <NAME>_DEFINITIONS var as "MY_DEF" or "-DMY_DEF" ?

I would prefer "-DMY_DEF" so that in the project that will use my package I can simply call add_definitions(${<NAME>_DEFINITIONS}), but I'm not sure this is the recommended ?


Thanks
Fabien

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to