[CMake] Some minor issues for 2.6.0-RC-8
Hendrik Sattler
post at hendrik-sattler.de
Thu Apr 24 09:45:46 EDT 2008
Zitat von "Alan W. Irwin" <irwin at beluga.phys.uvic.ca>:
> which is equivalent to the pkg-config --libs option, but unlike pkg-config
> there doesn't appear to be any other linker flag options for wx-config.
> However, I suggest you use the appropriate CMake logic to transform the
> contents of what is delivered by --libs into the equivalent of the results
> returned by FindPkgConfig.cmake such as
>
> # wxWidgets_LIBRARIES ... only the libraries (w/o the '-l')
> # wxWidgets_LIBRARY_DIRS ... the paths of the libraries (w/o the '-L')
The dirs provided with -L are only needed when using find_library() to
put libraries with full path into wxWidgets_LIBRARIES. After that, it
should not be needed anymore.
> # wxWidgets_LDFLAGS ... all required linker flags
> # wxWidgets_LDFLAGS_OTHER ... all other linker flags
>
>> What is the correct thing to do with these
>> parameters in CMake? I would need to check this too, I suppose.
>
> Users would be advised to use the LINK_FLAGS and/or LINK_FLAGS_<CONFIG>
> property set by SET_TARGET_PROPERTIES to pass the separated out (by e.g.,
> wxWidgets_LDFLAGS_OTHER) -framework, -isysroot, -arch, -pthread options to
> the linker.
So such a module only needs to return: xxx_LIBRARIES_<> with full-path
libraries and (optional) support for (general|debug|optimized),
xxx_INCLUDE_DIRS for position of header files, xxx_COMPILE_FLAGS_<>
and xxx_LINK_FLAGS_<> (with support for <> being at least RELEASE and
DEBUG).
Problem may be that the last two are highly compiler-specific :-(
Anything less than that is incomplete, IMHO.
HS
More information about the CMake
mailing list