]> OCCT Git - occt-copy.git/commitdiff
0029377: Configuration, CMake - linkage errors while using static OCCT libraries...
authorkgv <kgv@opencascade.com>
Fri, 8 Dec 2017 12:13:14 +0000 (15:13 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 20 Dec 2017 15:50:45 +0000 (18:50 +0300)
HAVE_NO_DLL is now defined when building Static libraries.

adm/cmake/occt_toolkit.cmake
adm/cmake/occt_toolkit_tool.cmake
dox/dev_guides/building/cmake/cmake.md

index 4c50df233e2e4cd03b3df6f214cfef282cf38d3b..60b0fe63f82067cfb8fdf45d0ec3b8b9cb0ddeaf 100644 (file)
@@ -11,6 +11,9 @@ set (PRECOMPILED_DEFS)
 
 if (NOT BUILD_SHARED_LIBS)
   list (APPEND PRECOMPILED_DEFS "-DOCCT_NO_PLUGINS")
+  if (WIN32)
+    list (APPEND PRECOMPILED_DEFS "-DHAVE_NO_DLL")
+  endif()
 endif()
 
 # Get all used packages from toolkit
index f289675b85fa0580dbe381ef5bc69ff0511f4d24..b62d8052c59432dbd5d1475d598d1eba13ab7361 100644 (file)
@@ -37,6 +37,9 @@ set (PRECOMPILED_DEFS)
 
 if (NOT BUILD_SHARED_LIBS)
   list (APPEND PRECOMPILED_DEFS "-DOCCT_NO_PLUGINS")
+  if (WIN32)
+    list (APPEND PRECOMPILED_DEFS "-DHAVE_NO_DLL")
+  endif()
 endif()
 
 # Get all used packages from toolkit
index a1cfdac17f665adc83de820339036fab83942157..79a1a85da1baa958003e7df5c915db6157d50526 100644 (file)
@@ -93,7 +93,7 @@ The following table gives the full list of environment variables used at the con
 | 3RDPARTY_TBB* | Path | Path to TBB binaries |
 | 3RDPARTY_VTK_* | Path | Path to VTK binaries |
 | BUILD_MODULE_<MODULE>| Boolean flag | Indicates whether the corresponding OCCT module should be built or not. It should be noted that some toolkits of a module can be built even if this module is not checked (this happens if some other modules depend on these toolkits). The main modules and their descriptions can be found in @ref user_guides |
-| BUILD_LIBRARY_TYPE | String |  Specifies the type of library to be created. "Shared" libraries are linked dynamically and loaded at runtime. "Static" libraries are archives of object files used when linking other targets |
+| BUILD_LIBRARY_TYPE | String |  Specifies the type of library to be created. "Shared" libraries are linked dynamically and loaded at runtime. "Static" libraries are archives of object files used when linking other targets. Note that Draw Harness plugin system is incompatible with "Static" builds, and therefore it should be excluded. Using "Static" libraries also might require modification in building procedures of user application (and OCCT samples); on Windows platform, user application should define HAVE_NO_DLL.  |
 | BUILD_ADDITIONAL_TOOLKITS | String | Semicolon-separated individual toolkits to include into build process. If you want to build some particular libraries (toolkits) only, then you may uncheck all modules in the corresponding *BUILD_MODUE_\<MODULE\>* options and provide the list of necessary libraries here. Of course, all dependencies will be resolved automatically |
 | BUILD_YACCLEX | Boolean flag | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this option leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
 | BUILD_MODULE_MfcSamples | Boolean flag | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms |