diff options
Diffstat (limited to 'cpp/include')
-rw-r--r-- | cpp/include/Freeze/Initialize.h | 16 | ||||
-rw-r--r-- | cpp/include/Glacier2/.headers | 1 | ||||
-rw-r--r-- | cpp/include/Glacier2/Config.h | 28 | ||||
-rw-r--r-- | cpp/include/Ice/Config.h | 15 | ||||
-rw-r--r-- | cpp/include/IceBox/Config.h | 28 | ||||
-rw-r--r-- | cpp/include/IceGrid/.headers | 1 | ||||
-rw-r--r-- | cpp/include/IceGrid/Config.h | 28 | ||||
-rw-r--r-- | cpp/include/IcePatch2/Config.h | 29 | ||||
-rw-r--r-- | cpp/include/IceSSL/Config.h | 5 | ||||
-rw-r--r-- | cpp/include/IceSSL/Plugin.h | 15 | ||||
-rw-r--r-- | cpp/include/IceStorm/.headers | 1 | ||||
-rw-r--r-- | cpp/include/IceStorm/Config.h | 28 | ||||
-rw-r--r-- | cpp/include/IceUtil/Config.h | 19 | ||||
-rw-r--r-- | cpp/include/Makefile.mak | 19 | ||||
-rw-r--r-- | cpp/include/Slice/Parser.h | 15 |
15 files changed, 240 insertions, 8 deletions
diff --git a/cpp/include/Freeze/Initialize.h b/cpp/include/Freeze/Initialize.h index e0d6d853f0f..8eb72e05dcc 100644 --- a/cpp/include/Freeze/Initialize.h +++ b/cpp/include/Freeze/Initialize.h @@ -17,6 +17,22 @@ #include <Freeze/Transaction.h> // +// Automatically link Freeze[D].lib with Visual C++ +// +#ifdef _MSC_VER +# if defined(ICE_STATIC_LIBS) +# pragma comment(lib, "Freeze.lib") +# elif !defined(FREEZE_API_EXPORTS) +# if defined(_DEBUG) +# pragma comment(lib, "FreezeD.lib") +# else +# pragma comment(lib, "Freeze.lib") +# endif +# endif +#endif + + +// // Berkeley DB's DbEnv and DbTxn // class DbEnv; diff --git a/cpp/include/Glacier2/.headers b/cpp/include/Glacier2/.headers index 553626bb597..05f3ad31278 100644 --- a/cpp/include/Glacier2/.headers +++ b/cpp/include/Glacier2/.headers @@ -1,5 +1,6 @@ SDK_HEADERS = \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Application.h \ + $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Config.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Glacier2.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Metrics.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\NullPermissionsVerifier.h \ diff --git a/cpp/include/Glacier2/Config.h b/cpp/include/Glacier2/Config.h new file mode 100644 index 00000000000..1d78cac66a0 --- /dev/null +++ b/cpp/include/Glacier2/Config.h @@ -0,0 +1,28 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef GLACIER2_CONFIG_H +#define GLACIER2_CONFIG_H + +#ifdef _MSC_VER +// +// Automatically link with Glacier2[D].lib +// +# if defined(ICE_STATIC_LIBS) +# pragma comment(lib, "Glacier2.lib") +# elif !defined(GLACIER2_API_EXPORTS) +# if defined(_DEBUG) +# pragma comment(lib, "Glacier2D.lib") +# else +# pragma comment(lib, "Glacier2.lib") +# endif +# endif +#endif + +#endif diff --git a/cpp/include/Ice/Config.h b/cpp/include/Ice/Config.h index e0c63f79bd0..91e75030aa8 100644 --- a/cpp/include/Ice/Config.h +++ b/cpp/include/Ice/Config.h @@ -33,6 +33,21 @@ #endif // +// Automatically link Ice[D].lib with Visual C++ +// +#ifdef _MSC_VER +# if defined(ICE_STATIC_LIBS) +# pragma comment(lib, "Ice.lib") +# elif !defined(ICE_API_EXPORTS) +# if defined(_DEBUG) +# pragma comment(lib, "IceD.lib") +# else +# pragma comment(lib, "Ice.lib") +# endif +# endif +#endif + +// // Define the Ice and IceInternal namespace, so that we can use the following // everywhere in our code: // diff --git a/cpp/include/IceBox/Config.h b/cpp/include/IceBox/Config.h new file mode 100644 index 00000000000..61a451bd5e5 --- /dev/null +++ b/cpp/include/IceBox/Config.h @@ -0,0 +1,28 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef ICE_BOX_CONFIG_H +#define ICE_BOX_CONFIG_H + +#ifdef _MSC_VER +// +// Automatically link with IceBox[D].lib +// +# if defined(ICE_STATIC_LIBS) +# pragma comment(lib, "IceBox.lib") +# elif !defined(ICE_BOX_API_EXPORTS) +# if defined(_DEBUG) +# pragma comment(lib, "IceBoxD.lib") +# else +# pragma comment(lib, "IceBox.lib") +# endif +# endif +#endif + +#endif diff --git a/cpp/include/IceGrid/.headers b/cpp/include/IceGrid/.headers index ee7a0fc5f48..a10f5bdac20 100644 --- a/cpp/include/IceGrid/.headers +++ b/cpp/include/IceGrid/.headers @@ -1,5 +1,6 @@ SDK_HEADERS = \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Admin.h \ + $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Config.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Descriptor.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Discovery.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Exception.h \ diff --git a/cpp/include/IceGrid/Config.h b/cpp/include/IceGrid/Config.h new file mode 100644 index 00000000000..883c8a39820 --- /dev/null +++ b/cpp/include/IceGrid/Config.h @@ -0,0 +1,28 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef ICE_GRID_CONFIG_H +#define ICE_GRID_CONFIG_H + +#ifdef _MSC_VER +// +// Automatically link with IceGrid[D].lib +// +# if defined(ICE_STATIC_LIBS) +# pragma comment(lib, "IceGrid.lib") +# elif !defined(ICE_GRID_API_EXPORTS) +# if defined(_DEBUG) +# pragma comment(lib, "IceGridD.lib") +# else +# pragma comment(lib, "IceGrid.lib") +# endif +# endif +#endif + +#endif diff --git a/cpp/include/IcePatch2/Config.h b/cpp/include/IcePatch2/Config.h new file mode 100644 index 00000000000..6626a5f8dc4 --- /dev/null +++ b/cpp/include/IcePatch2/Config.h @@ -0,0 +1,29 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef ICE_PATCH2_CONFIG_H +#define ICE_PATCH2_CONFIG_H + +#ifdef _MSC_VER +// +// Automatically link with IcePatch2[D].lib +// +# if defined(ICE_STATIC_LIBS) +# pragma comment(lib, "IcePatch2.lib") +# elif !defined(ICE_PATCH2_API_EXPORTS) +# if defined(_DEBUG) +# pragma comment(lib, "IcePatch2D.lib") +# else +# pragma comment(lib, "IcePatch2.lib") +# endif +# endif +#endif + +#endif + diff --git a/cpp/include/IceSSL/Config.h b/cpp/include/IceSSL/Config.h index c1a71e40ea8..fa339bcba95 100644 --- a/cpp/include/IceSSL/Config.h +++ b/cpp/include/IceSSL/Config.h @@ -7,6 +7,9 @@ // // ********************************************************************** +#ifndef ICE_SSL_CONFIG_H +#define ICE_SSL_CONFIG_H + #include <Ice/Config.h> #if defined(__APPLE__) @@ -16,3 +19,5 @@ #else # define ICE_USE_OPENSSL 1 #endif + +#endif diff --git a/cpp/include/IceSSL/Plugin.h b/cpp/include/IceSSL/Plugin.h index 743918ea755..ed4b0b91ec7 100644 --- a/cpp/include/IceSSL/Plugin.h +++ b/cpp/include/IceSSL/Plugin.h @@ -18,6 +18,21 @@ #include <vector> #include <list> +// +// Automatically link IceSSL[D].lib with Visual C++ +// +#ifdef _MSC_VER +# if defined(ICE_STATIC_LIBS) +# error("IceSSL Plugin does not support static libraries") +# elif !defined(ICE_SSL_API_EXPORTS) +# if defined(_DEBUG) +# pragma comment(lib, "IceSSLD.lib") +# else +# pragma comment(lib, "IceSSL.lib") +# endif +# endif +#endif + // For struct sockaddr_storage #ifdef _WIN32 # include <winsock2.h> diff --git a/cpp/include/IceStorm/.headers b/cpp/include/IceStorm/.headers index 699039cdb0d..71130c8ed79 100644 --- a/cpp/include/IceStorm/.headers +++ b/cpp/include/IceStorm/.headers @@ -1,3 +1,4 @@ SDK_HEADERS = \ + $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Config.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\IceStorm.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Metrics.h \ diff --git a/cpp/include/IceStorm/Config.h b/cpp/include/IceStorm/Config.h new file mode 100644 index 00000000000..e27f8ff8da8 --- /dev/null +++ b/cpp/include/IceStorm/Config.h @@ -0,0 +1,28 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef ICE_STORM_CONFIG_H +#define ICE_STORM_CONFIG_H + +#ifdef _MSC_VER +// +// Automatically link with IceStorm[D].lib +// +# if defined(ICE_STATIC_LIBS) +# pragma comment(lib, "IceStorm.lib") +# elif !defined(ICE_STORM_LIB_API_EXPORTS) +# if defined(_DEBUG) +# pragma comment(lib, "IceStormD.lib") +# else +# pragma comment(lib, "IceStorm.lib") +# endif +# endif +#endif + +#endif diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h index d830f49f81c..a6be6d33946 100644 --- a/cpp/include/IceUtil/Config.h +++ b/cpp/include/IceUtil/Config.h @@ -145,10 +145,6 @@ #endif #ifdef _WIN32 -# if !defined(ICE_STATIC_LIBS) && defined(_MSC_VER) && (!defined(_DLL) || !defined(_MT)) -# error "Only multi-threaded DLL libraries can be used with Ice!" -# endif - # include <windows.h> # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x600) @@ -174,6 +170,21 @@ #endif #ifdef _MSC_VER +# if !defined(ICE_STATIC_LIBS) && (!defined(_DLL) || !defined(_MT)) +# error "Only multi-threaded DLL libraries can be used with Ice!" +# endif +// +// Automatically link with IceUtil[D].lib +// +# if defined(ICE_STATIC_LIBS) +# pragma comment(lib, "IceUtil.lib") +# elif !defined(ICE_UTIL_API_EXPORTS) +# if defined(_DEBUG) +# pragma comment(lib, "IceUtilD.lib") +# else +# pragma comment(lib, "IceUtil.lib") +# endif +# endif // // Move some warnings to level 4 // diff --git a/cpp/include/Makefile.mak b/cpp/include/Makefile.mak index ded44f28178..ddeaf38328b 100644 --- a/cpp/include/Makefile.mak +++ b/cpp/include/Makefile.mak @@ -10,15 +10,26 @@ top_srcdir = .. !include $(top_srcdir)/config/Make.rules.mak + +!if "$(WINRT)" == "yes" +SUBDIRS = IceUtil \ + Ice \ + IceSSL \ + Glacier2 \ + IceStorm \ + IceGrid \ +!elseif "$(CPP_COMPILER)" == "VC100" +SUBDIRS = IceUtil \ + Slice \ + Ice \ + IceSSL +!else SUBDIRS = Glacier2 \ Ice \ IceSSL \ IceGrid \ IceStorm \ - IceUtil - -!if "$(WINRT)" != "yes" -SUBDIRS = $(SUBDIRS) \ + IceUtil \ Freeze \ IceBox \ IcePatch2 \ diff --git a/cpp/include/Slice/Parser.h b/cpp/include/Slice/Parser.h index 0b70f236476..d4893173b99 100644 --- a/cpp/include/Slice/Parser.h +++ b/cpp/include/Slice/Parser.h @@ -20,6 +20,21 @@ #include <set> #include <stdio.h> +// +// Automatically link Slice[D].lib with Visual C++ +// +#ifdef _MSC_VER +# if defined(ICE_STATIC_LIBS) +# pragma comment(lib, "Slice.lib") +# elif !defined(SLICE_API_EXPORTS) +# if defined(_DEBUG) +# pragma comment(lib, "SliceD.lib") +# else +# pragma comment(lib, "Slice.lib") +# endif +# endif +#endif + #ifndef SLICE_API # ifdef SLICE_API_EXPORTS # define SLICE_API ICE_DECLSPEC_EXPORT |