diff options
author | Brad King <brad.king@kitware.com> | 2010-01-13 17:58:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-01-13 17:58:34 (GMT) |
commit | 879b47e6ba23b164cba070cc4fc875d828cd3f46 (patch) | |
tree | b1ad04d529c600348a89ffb8d6fe733908b59bd1 /Source/kwsys/SharedForward.h.in | |
parent | 5b5372059c655b8501ea842940627cf8516ca31d (diff) | |
download | CMake-879b47e6ba23b164cba070cc4fc875d828cd3f46.zip CMake-879b47e6ba23b164cba070cc4fc875d828cd3f46.tar.gz CMake-879b47e6ba23b164cba070cc4fc875d828cd3f46.tar.bz2 |
KWSys: Fix SharedForward on Cygwin without -mwin32
When building on Cygwin without -mwin32, the _WIN32 macro may not be
defined. SharedForward must still set the PATH environment variable to
ensure runtime dependencies are found.
The 'ldd' wrapping feature uses 'cygcheck' for now since a real ldd tool
is not available in Cygwin 1.5. We can change to use the real ldd when
we choose to stop supporting legacy Cygwin and require 1.7.
Diffstat (limited to 'Source/kwsys/SharedForward.h.in')
-rw-r--r-- | Source/kwsys/SharedForward.h.in | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/kwsys/SharedForward.h.in b/Source/kwsys/SharedForward.h.in index a5f3a4d..da62d84 100644 --- a/Source/kwsys/SharedForward.h.in +++ b/Source/kwsys/SharedForward.h.in @@ -246,12 +246,14 @@ static const char kwsys_shared_forward_path_slash[2] = {KWSYS_SHARED_FORWARD_PAT # define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY64_PATH" # endif +/* Cygwin */ +#elif defined(__CYGWIN__) +# define KWSYS_SHARED_FORWARD_LDD "cygcheck" /* TODO: cygwin 1.7 has ldd */ +# define KWSYS_SHARED_FORWARD_LDD_N 1 +# define KWSYS_SHARED_FORWARD_LDPATH "PATH" + /* Windows */ #elif defined(_WIN32) -# if defined(__CYGWIN__) -# define KWSYS_SHARED_FORWARD_LDD "cygcheck" -# define KWSYS_SHARED_FORWARD_LDD_N 1 -# endif # define KWSYS_SHARED_FORWARD_LDPATH "PATH" /* Guess on this unknown system. */ |