Fixed win32 static part

This commit is contained in:
Jan Möbius
2022-02-23 09:29:19 +01:00
parent a81865c6ff
commit 09267c3e3d
2 changed files with 9 additions and 18 deletions

View File

@@ -140,19 +140,14 @@ if (WIN32)
if ( OPENMESH_BUILD_SHARED ) if ( OPENMESH_BUILD_SHARED )
add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL) add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL)
vci_add_library (OpenMeshCore SHARED ${sources} ${headers}) vci_add_library (OpenMeshCore SHARED ${sources} ${headers})
else()
vci_add_library (OpenMeshCore STATIC ${sources} ${headers})
endif()
target_include_directories(OpenMeshCore PUBLIC target_include_directories(OpenMeshCore PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>
$<INSTALL_INTERFACE:include>) $<INSTALL_INTERFACE:include>)
else()
# OpenMesh has no dll exports so we have to build a static library on windows
vci_add_library (OpenMeshCore STATIC ${sources} ${headers})
target_include_directories(OpenMeshCoreStatic PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>
$<INSTALL_INTERFACE:include>)
endif()
else () else ()
vci_add_library (OpenMeshCore SHAREDANDSTATIC ${sources} ${headers}) vci_add_library (OpenMeshCore SHAREDANDSTATIC ${sources} ${headers})

View File

@@ -106,18 +106,14 @@ if (WIN32)
if ( OPENMESH_BUILD_SHARED ) if ( OPENMESH_BUILD_SHARED )
add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL) add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL)
vci_add_library (OpenMeshTools SHARED ${sources} ${headers}) vci_add_library (OpenMeshTools SHARED ${sources} ${headers})
else()
# OpenMesh has no dll exports so we have to build a static library on windows
vci_add_library (OpenMeshTools STATIC ${sources} ${headers})
endif()
target_include_directories(OpenMeshTools PUBLIC target_include_directories(OpenMeshTools PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>
$<INSTALL_INTERFACE:include>) $<INSTALL_INTERFACE:include>)
else()
# OpenMesh has no dll exports so we have to build a static library on windows
vci_add_library (OpenMeshTools STATIC ${sources} ${headers})
target_include_directories(OpenMeshToolsStatic PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>
$<INSTALL_INTERFACE:include>)
endif()
else () else ()
vci_add_library (OpenMeshTools SHAREDANDSTATIC ${sources} ${headers}) vci_add_library (OpenMeshTools SHAREDANDSTATIC ${sources} ${headers})