From: <ai...@us...> - 2011-11-24 19:20:34
|
Revision: 12036 http://plplot.svn.sourceforge.net/plplot/?rev=12036&view=rev Author: airwin Date: 2011-11-24 19:20:27 +0000 (Thu, 24 Nov 2011) Log Message: ----------- Expand non-transitive linking to libplplot, libcsironn, libcsirocsa, and libqsastime. The pkg-config results for libplplot are still unsatisfactory because the libcsironn, libcsirocsa, and libqsastime compile and link data are lumped in with plplotd.pc rather than having that data stored properly in a separate *.pc file for each of libcsironn, libcsirocsa, and libqsastime. Modified Paths: -------------- trunk/lib/csa/CMakeLists.txt trunk/lib/nn/CMakeLists.txt trunk/lib/qsastime/CMakeLists.txt trunk/src/CMakeLists.txt Modified: trunk/lib/csa/CMakeLists.txt =================================================================== --- trunk/lib/csa/CMakeLists.txt 2011-11-24 18:33:08 UTC (rev 12035) +++ trunk/lib/csa/CMakeLists.txt 2011-11-24 19:20:27 UTC (rev 12036) @@ -33,6 +33,12 @@ add_library(csirocsa ${csirocsa_LIB_SRCS}) + if(NON_TRANSITIVE) + # empty list ==> non-transitive linking for everything that links to + # libcsirocsa in the shared libraries case. + target_link_libraries(csirocsa LINK_INTERFACE_LIBRARIES) + endif(NON_TRANSITIVE) + set_target_properties(csirocsa PROPERTIES SOVERSION ${csirocsa_SOVERSION} VERSION ${csirocsa_VERSION} INSTALL_NAME_DIR "${LIB_DIR}" Modified: trunk/lib/nn/CMakeLists.txt =================================================================== --- trunk/lib/nn/CMakeLists.txt 2011-11-24 18:33:08 UTC (rev 12035) +++ trunk/lib/nn/CMakeLists.txt 2011-11-24 19:20:27 UTC (rev 12036) @@ -38,6 +38,13 @@ endif(BUILD_SHARED_LIBS) add_library(csironn ${csironn_LIB_SRCS}) + + if(NON_TRANSITIVE) + # empty list ==> non-transitive linking for everything that links to + # libcsironn in the shared libraries case. + target_link_libraries(csironn LINK_INTERFACE_LIBRARIES) + endif(NON_TRANSITIVE) + set_target_properties( csironn PROPERTIES @@ -47,6 +54,7 @@ INSTALL_NAME_DIR "${LIB_DIR}" ) target_link_libraries(csironn ${QHULL_LIBRARIES}) + install(TARGETS csironn EXPORT export_plplot ARCHIVE DESTINATION ${LIB_DIR} Modified: trunk/lib/qsastime/CMakeLists.txt =================================================================== --- trunk/lib/qsastime/CMakeLists.txt 2011-11-24 18:33:08 UTC (rev 12035) +++ trunk/lib/qsastime/CMakeLists.txt 2011-11-24 19:20:27 UTC (rev 12036) @@ -98,6 +98,12 @@ add_library(qsastime ${qsastime_LIB_SRCS}) add_dependencies(qsastime tai-utc.h_built deltaT.h_built) +if(NON_TRANSITIVE) + # empty list ==> non-transitive linking for everything that links to + # libqsatime in the shared libraries case. + target_link_libraries(qsastime LINK_INTERFACE_LIBRARIES) +endif(NON_TRANSITIVE) + if(MATH_LIB) target_link_libraries(qsastime ${MATH_LIB}) endif(MATH_LIB) Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2011-11-24 18:33:08 UTC (rev 12035) +++ trunk/src/CMakeLists.txt 2011-11-24 19:20:27 UTC (rev 12036) @@ -182,6 +182,17 @@ add_library(plplot${LIB_TAG} ${plplot${LIB_TAG}_LIB_SRCS}) add_dependencies(plplot${LIB_TAG} plhershey-unicode.h_built ${qt_dependency}) +if(NON_TRANSITIVE) + # empty list ==> non-transitive linking for everything that links to + # libplplotd in the shared libraries case. + target_link_libraries(plplot${LIB_TAG} LINK_INTERFACE_LIBRARIES) + # This configures the pkg-config method to use non-transitive linking. + set(PC_REQUIRES_TAG "Requires.private") +else(NON_TRANSITIVE) + # This configures the pkg-config method to use transitive linking + set(PC_REQUIRES_TAG "Requires") +endif(NON_TRANSITIVE) + set(LIB_INSTALL_RPATH ${LIB_DIR}) if(ENABLE_DYNDRIVERS) set(libplplot${LIB_TAG}_LINK_LIBRARIES ${LTDL_LIBRARIES}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |