[Cmake] Improvements of FindwxWindows.cmake
Bill Hoffman
bill.hoffman at kitware.com
Fri May 23 09:06:52 EDT 2003
At 03:10 AM 5/23/2003, Mathieu Malaterre wrote:
>Hi all,
> I have been hacking FindwxWindows.cmake to fit my needs. My hacked version could be find:
>
>http://www.creatis.insa-lyon.fr/~malaterre/cmake/FindwxWindows.cmake
>
>Changes:
>- Now take into account wx debug library
>- Add needed preprocessors definition (according to
>http://www.wxwindows.org/technote/vc_ide.htm)
>
> BTW I didn't really understand why WXDialog uses:
>CMake/Source/WXDialog/wxincludes.h
>
>what was the issue compared to an:
>ADD_DEFINITION(-D__WXMSW__ -DWINVER=0x0400 ...)
As a general rule, putting definitions in header files is better that on the command line.
It allows other projects to use the software without having to construct complicated
command lines. If wxwindows itself had this approach, you only have to worry about
getting the correct -I options, and that would be it. Often times it is a complicated
process to construct the -D options, and scripts are provided to be used in makefiles.
If a .h file is configured, then it isolates the build system used and avoids users of
the library having to run a script or compute the -D options.
> Now what I want is that the library (between debug and release) is choosen at compile time (instead of an option in CMakeSetup), is it possible ? Could you give me some info about how to do that, thanks.
>
TARGET_LINK_LIBRARIES can take debug and optimized libraries:
TARGET_LINK_LIBRARIES(target library1
<debug | optimized> library2
...)
Specify a list of libraries to be linked into the specified target
The debug and optimized strings may be used to indicate that
the next library listed is to be used only for that specific
type of build
-Bill
>Thanks,
>mathieu
>
>
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake
More information about the CMake
mailing list