On Sun, Nov 22, 2009 at 6:53 AM, Alex H <aditya15...@hotmail.com> wrote:
> If I have a .h file and I want to create a library using that .h file and
> some other file, how can I set the preprocessor definition to some FLAG?
> So far I think the way to go is the following:
> set_source_files_properties(vehicle.h PROPERTIES COMPILE_FLAGS "-DPROJECT")
> is this right? I tried it and it doesn't work

>From your explanation, I don't really understand what you want to do.
It seems like want to define __decl(dllimport) / __decl(dllexport),
right? If it's that, then take a look to SET_TARGET_PROPERTIES( target
PROPERTIES DEFINE_SYMBOL blah ). You may not even need that, as CMake
automagically defines targetname_EXPORTS when you do ADD_LIBRARY(
target SHARED sources ). In any case, read the docs for
SET_TARGET_PROPERTIES :-)

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
_______________________________________________
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to