diff --git a/src/OpenMesh/Apps/CMakeLists.txt b/src/OpenMesh/Apps/CMakeLists.txt index ff97b175..04149453 100644 --- a/src/OpenMesh/Apps/CMakeLists.txt +++ b/src/OpenMesh/Apps/CMakeLists.txt @@ -9,6 +9,11 @@ if ( BUILD_APPS ) # Only build and fixbundle apps, when we are building OpenMesh standalone if(${PROJECT_NAME} MATCHES "OpenMesh") + if ( WIN32 AND OPENMESH_BUILD_SHARED ) + #!!!! Experimental Feature!!! + add_definitions(-DOPENMESHDLL ...) + endif() + add_subdirectory (Dualizer) add_subdirectory (Decimating/commandlineDecimater) add_subdirectory (Smoothing) diff --git a/src/OpenMesh/Core/CMakeLists.txt b/src/OpenMesh/Core/CMakeLists.txt index f5aa9535..68ae5f04 100644 --- a/src/OpenMesh/Core/CMakeLists.txt +++ b/src/OpenMesh/Core/CMakeLists.txt @@ -39,7 +39,7 @@ if (WIN32) if ( OPENMESH_BUILD_SHARED ) # Experimental Feature!!!! - add_definitions( -DOPENMESHDLL) + add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL) acg_add_library (OpenMeshCore SHARED ${sources} ${headers}) else() # OpenMesh has no dll exports so we have to build a static library on windows diff --git a/src/OpenMesh/Core/System/OpenMeshDLLMacros.hh b/src/OpenMesh/Core/System/OpenMeshDLLMacros.hh index 5fface2d..1b0ff182 100644 --- a/src/OpenMesh/Core/System/OpenMeshDLLMacros.hh +++ b/src/OpenMesh/Core/System/OpenMeshDLLMacros.hh @@ -47,12 +47,12 @@ #ifndef OPENMESHDLLEXPORT #ifdef WIN32 #ifdef OPENMESHDLL - #ifdef USEOPENMESH - #define OPENMESHDLLEXPORT __declspec(dllimport) - #define OPENMESHDLLEXPORTONLY + #ifdef BUILDOPENMESHDLL + #define OPENMESHDLLEXPORT __declspec(dllexport) + #define OPENMESHDLLEXPORTONLY __declspec(dllexport) #else - #define OPENMESHDLLEXPORT __declspec(dllexport) - #define OPENMESHDLLEXPORTONLY __declspec(dllexport) + #define OPENMESHDLLEXPORT __declspec(dllimport) + #define OPENMESHDLLEXPORTONLY #endif #else #define OPENMESHDLLEXPORT diff --git a/src/OpenMesh/Tools/CMakeLists.txt b/src/OpenMesh/Tools/CMakeLists.txt index c77c0119..fe79d28c 100644 --- a/src/OpenMesh/Tools/CMakeLists.txt +++ b/src/OpenMesh/Tools/CMakeLists.txt @@ -39,7 +39,7 @@ if (WIN32) if ( OPENMESH_BUILD_SHARED ) # Experimental Feature!!!! - add_definitions( -DOPENMESHDLL) + add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL) acg_add_library (OpenMeshTools SHARED ${sources} ${headers}) else() # OpenMesh has no dll exports so we have to build a static library on windows