Alan W. Irwin wrote:
> 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).
This works in that it causes qt to get built first but it still does not
seem to get linked correctly. I also tried adding:
include_directories(
${CMAKE_BINARY_DIR}/drivers
)
Since that is the location of qt.so but that did not seem to help.
>>
>> 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.
No I don't think they will change very often so I will just leave this
part as is.
I also have two other issues:
(1) plplot_pyqt.so is built as libplplot_pyqt.so
How do I avoid getting the lib tag on the front?
(2) I seem to have to explicitly do "make generate_pyqt_source" before
doing "make". How do I make that happen automatically?
-Hazen
------------------------------------------------------------------------------
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