On 2009-06-15 12:30-0400 Hazen Babcock wrote:

> Hi Alan,
>
> I'm getting closer, but I can see that there is at least one missing 
> dependency. I need to link to the qt.so library that is generated by our Qt 
> bindings, but I can't figure out what its name is in our build system. At 
> present I have this:
>
> target_link_libraries(
>  plplot_pyqt
>  plplot${LIB_TAG}
>  ${QT_LIBRARIES}
>  )
>
> And I think I need something like this:
>
> target_link_libraries(
>  plplot_pyqt
>  ${PLPLOT_QT_LIBRARY}
>  plplot${LIB_TAG}
>  ${QT_LIBRARIES}
>  )

I suggest trying something like this:

if(ENABLE_DYNDRIVERS)
  target_link_libraries(
   plplot_pyqt
   qt
   plplot${LIB_TAG}
   ${QT_LIBRARIES}
   )
else(ENABLE_DYNDRIVERS)
  target_link_libraries(
   plplot_pyqt
   plplot${LIB_TAG}
   ${QT_LIBRARIES}
   )
endif(ENABLE_DYNDRIVERS)

"qt" is the target name for the qt device driver build for the
ENABLE_DYNDRIVERS case.  So I think if you insert "qt" in the
target_link_libraries list for that case, cmake will do the rest.  Of
course, if ENABLE_DYNDRIVERS is OFF, you have to treat that as a separate
case since there is no qt target name and the qt device code is part of the
PLplot core library (referenced by the plplot${LIB_TAG} target name above).

>
>
> A side question, is it possible to wildcard for generated files, i.e. instead 
> of:
>
>  set_source_files_properties(
>    ${PYQT4_CONFIG_DIRECTORY}/sipAPIplplot_pyqt.h
>    ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtcmodule.cpp
>    ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtExtWidget.cpp
>    ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLDriver.cpp
>    ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLWidget.cpp
>    PROPERTIES GENERATED ON
>    )
>
> Something like:
>  set_source_files_properties(
>    ${PYQT4_CONFIG_DIRECTORY}/*.h
>    ${PYQT4_CONFIG_DIRECTORY}/*.cpp
>    PROPERTIES GENERATED ON
>    )

It is possible to run arbitrary cmake scripts at make time (when the above
files are generated) so I think the answer to your question must be yes
although it would be a bit complicated.

Is there any reason why you expect those file names to change much?  For
other source files generated at run time (such as our python and java
bindings) we simply list out the source files as needed like you did above
in your first version of set_source_files_properties.  I far prefer that
explicit approach if the file names are not expected to change much.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to