|
From: <ai...@us...> - 2011-11-26 21:33:41
|
Revision: 12054
http://plplot.svn.sourceforge.net/plplot/?rev=12054&view=rev
Author: airwin
Date: 2011-11-26 21:33:35 +0000 (Sat, 26 Nov 2011)
Log Message:
-----------
Implement NON_TRANSITIVE case for the wxwidgets and qt_gui bindings.
This commit should complete my NON_TRANSITIVE work.
scripts/comprehensive_test.sh showed no errors with the
--cmake_added_options -DNON_TRANSITIVE=ON --do_shared yes
--do_nondynamic yes --do_static no
options. The most recent Linux distributions such as Fedora
and Debian unstable have stricter linkers than my Debian stable
platform, and there is more work to do on those systems before
the above test will pass.
That leaves the "--do_static yes" case where I encountered some
pkg-config trouble in the traditional installed examples build because
the --static option for pkg-config has the side effect that only
static external libraries are looked for, and one of those was missing
on my system. This bad result was due to inconsistency between the
forced static libraries used by pkg-config when the --static option is
used and the shared libraries that CMake tends to look for and use.
That issue can be solved on Unix by configuring our CMake-based build
system to only look for and use static external libraries. But
implementing that idea will take some substantial additional effort.
Modified Paths:
--------------
trunk/bindings/qt_gui/CMakeLists.txt
trunk/bindings/wxwidgets/CMakeLists.txt
Modified: trunk/bindings/qt_gui/CMakeLists.txt
===================================================================
--- trunk/bindings/qt_gui/CMakeLists.txt 2011-11-26 20:51:54 UTC (rev 12053)
+++ trunk/bindings/qt_gui/CMakeLists.txt 2011-11-26 21:33:35 UTC (rev 12054)
@@ -57,6 +57,16 @@
${MATH_LIB}
${QT_LIBRARIES}
)
+ if(NON_TRANSITIVE)
+ # empty list ==> non-transitive linking for everything that links to
+ # libplplotqtd in the shared libraries case.
+ target_link_libraries(plplotqt${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)
# qt_RPATH set in cmake/modules/qt.cmake. This is only used for the
# install-tree rpath since cmake handles the build-tree rpath
# automatically (so long as full pathnames to libraries are used).
Modified: trunk/bindings/wxwidgets/CMakeLists.txt
===================================================================
--- trunk/bindings/wxwidgets/CMakeLists.txt 2011-11-26 20:51:54 UTC (rev 12053)
+++ trunk/bindings/wxwidgets/CMakeLists.txt 2011-11-26 21:33:35 UTC (rev 12054)
@@ -49,6 +49,17 @@
# Create plplotwxwidgets[d] library
add_library(plplotwxwidgets${LIB_TAG} ${plplotwxwidgets${LIB_TAG}_LIB_SRCS})
+ if(NON_TRANSITIVE)
+ # empty list ==> non-transitive linking for everything that links to
+ # libplplotwxwidgetsd in the shared libraries case.
+ target_link_libraries(plplotwxwidgets${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)
+
if(BUILD_SHARED_LIBS)
SET_SOURCE_FILES_PROPERTIES(${plplotwxwidgets${LIB_TAG}_LIB_SRCS}
PROPERTIES COMPILE_FLAGS "-DUSINGDLL" )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|