Commit c77f85a5 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Fixed MSVC builds not supporting shared linking against module sublibs (as...

Fixed MSVC builds not supporting shared linking against module sublibs (as campvis-modules is built statically). As workaround RandomWalksLib and nlopt-stripped are forced to be build static.

refs #385
parent 9b444227
......@@ -54,6 +54,10 @@ MACRO(INCLUDE_MODULE ModuleDirectory ModuleListFile)
SET(ModuleEnabled FALSE)
INCLUDE(${ModuleListFile})
IF(NOT DEFINED ThisModExternalDependencies)
SET(ThisModExternalDependencies FALSE)
ENDIF(NOT DEFINED ThisModExternalDependencies)
# enable module if module status matches CAMPVIS_DEFAULT_ENABLED_MODULES
IF(${CAMPVIS_DEFAULT_ENABLED_MODULES} STREQUAL "STABLE_NO_DEPENDENCIES" AND ThisModStatus STREQUAL STABLE AND NOT ThisModExternalDependencies)
SET(CAMPVIS_BUILD_MODULE_${ModDirUpper} ON CACHE BOOL "Build Module ${ModDir} (${ThisModStatus})" FORCE)
......
......@@ -41,5 +41,5 @@ SET(RandomWalksLibSources ConfidenceMaps2D.cpp
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
ADD_LIBRARY(RandomWalksLib ${RandomWalksLibSources} ${RandomWalksLibHeaders})
ADD_LIBRARY(RandomWalksLib STATIC ${RandomWalksLibSources} ${RandomWalksLibHeaders})
TARGET_LINK_LIBRARIES(RandomWalksLib ${RandomWalksLibExternalLibs})
......@@ -140,6 +140,9 @@ SET ( NLOPT_SOURCES
OPTION(NLOPT_BUILD_SHARED "Build NLOPT as a shared library" OFF )
#FIXME: CAMPVIs currently does not support shared linking of modules -> nlopt needs to be linked statically
SET(NLOPT_BUILD_SHARED FALSE)
IF(NLOPT_BUILD_SHARED)
ADD_DEFINITIONS(-DNLOPT_DLL)
ADD_DEFINITIONS(-DNLOPT_DLL_EXPORT )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment