|
From: <ai...@us...> - 2013-07-12 19:22:29
|
Revision: 12420
http://sourceforge.net/p/plplot/code/12420
Author: airwin
Date: 2013-07-12 19:22:25 +0000 (Fri, 12 Jul 2013)
Log Message:
-----------
All use of the dll subdirectory workaround is now controlled by
the USE_DLL_SUBDIRECTORY variable. That variable is set to true
only for the case of shared libraries and either WIN32 or Cygwin.
We do this for Cygwin only because CMake currently does not use the
-rpath linker capability (which apparently works according to
anecedotal evidence) on that platform. But we should review this
Cygwin decision in the future if/when CMake changes to use the -rpath
linker capability on that platform.
Modified Paths:
--------------
trunk/CMakeLists.txt
trunk/bindings/ada/CMakeLists.txt
trunk/drivers/CMakeLists.txt
trunk/examples/lua/CMakeLists.txt
trunk/examples/python/CMakeLists.txt
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2013-07-12 18:08:01 UTC (rev 12419)
+++ trunk/CMakeLists.txt 2013-07-12 19:22:25 UTC (rev 12420)
@@ -118,12 +118,6 @@
add_definitions("/D_CRT_SECURE_NO_DEPRECATE")
endif(MSVC_VERSION GREATER 1399)
-# in windows all created dlls are gathered in the dll directory
-# if you add this directory to your PATH all shared libraries are available
-if(BUILD_SHARED_LIBS AND WIN32_AND_NOT_CYGWIN)
- set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dll)
-endif(BUILD_SHARED_LIBS AND WIN32_AND_NOT_CYGWIN)
-
# Borland Compiler must compile in ANSII mode
if(BORLAND)
add_definitions(-A)
@@ -144,6 +138,22 @@
)
install(FILES ${top_level_DOCFILES} DESTINATION ${DOC_DIR})
+if(BUILD_SHARED_LIBS AND WIN32_OR_CYGWIN)
+ # For platforms (currently WIN32 or Cygwin, although the Cygwin version
+ # of CMake may support this in future since -rpath apparently does work
+ # on that platform) where CMake does not use -rpath, use a workaround
+ # where all dll's are collected in the dll subdirectory of the build tree.
+ set(USE_DLL_SUBDIRECTORY ON)
+else(BUILD_SHARED_LIBS AND WIN32_OR_CYGWIN)
+ set(USE_DLL_SUBDIRECTORY OFF)
+endif(BUILD_SHARED_LIBS AND WIN32_OR_CYGWIN)
+
+# in windows all created dlls are gathered in the dll directory
+# if you add this directory to your PATH all shared libraries are available
+if(USE_DLL_SUBDIRECTORY)
+ set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dll)
+endif(USE_DLL_SUBDIRECTORY)
+
# Process other directories including using configured variables to
# process configurable files in those directories.
# N.B. Order is important here at the cmake stage because targets must
Modified: trunk/bindings/ada/CMakeLists.txt
===================================================================
--- trunk/bindings/ada/CMakeLists.txt 2013-07-12 18:08:01 UTC (rev 12419)
+++ trunk/bindings/ada/CMakeLists.txt 2013-07-12 19:22:25 UTC (rev 12420)
@@ -70,7 +70,7 @@
# Work around an issue in our CMake Ada language
# support for MinGW/Windows. FIXME. This issue should be fixed
# at the Ada language support level and not worked around here.
- if(WIN32_AND_NOT_CYGWIN)
+ if(USE_DLL_SUBDIRECTORY)
add_custom_command(
TARGET plplotada${LIB_TAG} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
@@ -78,7 +78,7 @@
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/dll
VERBATIM
)
- endif(WIN32_AND_NOT_CYGWIN)
+ endif(USE_DLL_SUBDIRECTORY)
target_link_libraries(plplotada${LIB_TAG}
plplot${LIB_TAG} ${GNAT_LIB}
Modified: trunk/drivers/CMakeLists.txt
===================================================================
--- trunk/drivers/CMakeLists.txt 2013-07-12 18:08:01 UTC (rev 12419)
+++ trunk/drivers/CMakeLists.txt 2013-07-12 19:22:25 UTC (rev 12420)
@@ -50,12 +50,12 @@
# in windows we move test-drv-info to the dll directory
# otherwise we use the RPATH functionality
- if(WIN32_AND_NOT_CYGWIN)
+ if(USE_DLL_SUBDIRECTORY)
set_target_properties(
test-drv-info
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/dll
)
- else(WIN32_AND_NOT_CYGWIN)
+ else(USE_DLL_SUBDIRECTORY)
set(test-drv-info_RPATH
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/src
@@ -71,7 +71,7 @@
INSTALL_RPATH "${test-drv-info_RPATH}"
BUILD_WITH_INSTALL_RPATH ON
)
- endif(WIN32_AND_NOT_CYGWIN)
+ endif(USE_DLL_SUBDIRECTORY)
get_target_property(test-drv-info_LOCATION test-drv-info LOCATION)
set(test_dyndrivers_TDEPENDS test-drv-info)
Modified: trunk/examples/lua/CMakeLists.txt
===================================================================
--- trunk/examples/lua/CMakeLists.txt 2013-07-12 18:08:01 UTC (rev 12419)
+++ trunk/examples/lua/CMakeLists.txt 2013-07-12 19:22:25 UTC (rev 12420)
@@ -102,11 +102,11 @@
set_property(GLOBAL PROPERTY FILES_examples_lua ${command_DEPENDS})
endif(BUILD_TEST)
- if(WIN32_AND_NOT_CYGWIN)
+ if(USE_DLL_SUBDIRECTORY)
set(lua_lib_location ${CMAKE_BINARY_DIR}/dll)
- else(WIN32_AND_NOT_CYGWIN)
+ else(USE_DLL_SUBDIRECTORY)
set(lua_lib_location ${CMAKE_BINARY_DIR}/bindings/lua)
- endif(WIN32_AND_NOT_CYGWIN)
+ endif(USE_DLL_SUBDIRECTORY)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/plplot_examples.lua.in
${CMAKE_CURRENT_BINARY_DIR}/plplot_examples.lua
Modified: trunk/examples/python/CMakeLists.txt
===================================================================
--- trunk/examples/python/CMakeLists.txt 2013-07-12 18:08:01 UTC (rev 12419)
+++ trunk/examples/python/CMakeLists.txt 2013-07-12 19:22:25 UTC (rev 12420)
@@ -232,11 +232,11 @@
set(python_location1 ${CMAKE_SOURCE_DIR}/bindings/python)
set(python_location2 ${CMAKE_BINARY_DIR}/bindings/python)
set(python_location3 ${CMAKE_BINARY_DIR}/examples/python)
- if(WIN32_AND_NOT_CYGWIN)
+ if(USE_DLL_SUBDIRECTORY)
set(python_location4 ${CMAKE_BINARY_DIR}/dll)
- else(WIN32_AND_NOT_CYGWIN)
- set(python_location3)
- endif(WIN32_AND_NOT_CYGWIN)
+ else(USE_DLL_SUBDIRECTORY)
+ set(python_location4)
+ endif(USE_DLL_SUBDIRECTORY)
set(python_location5 ${CMAKE_BINARY_DIR}/bindings/qt_gui/pyqt4)
set(python_location6 ${CMAKE_BINARY_DIR}/bindings/gnome2/python)
configure_file(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|