From 97039e9ae3127f843041c7600901d1796487fb47 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 23 May 2007 19:25:54 +0000 Subject: [PATCH] Added automatic building of plugins as static when dynamic build is switch off. --- CMakeModules/OsgMacroUtils.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake index 840a11c27..33dc40ef3 100644 --- a/CMakeModules/OsgMacroUtils.cmake +++ b/CMakeModules/OsgMacroUtils.cmake @@ -114,8 +114,12 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME) ENDIF(NOT TARGET_LABEL) # here we use the command to generate the library - - ADD_LIBRARY(${TARGET_TARGETNAME} MODULE ${TARGET_SRC} ${TARGET_H}) + + IF (DYNAMIC_OPENSCENEGRAPH) + ADD_LIBRARY(${TARGET_TARGETNAME} MODULE ${TARGET_SRC} ${TARGET_H}) + ELSE (DYNAMIC_OPENSCENEGRAPH) + ADD_LIBRARY(${TARGET_TARGETNAME} STATIC ${TARGET_SRC} ${TARGET_H}) + ENDIF(DYNAMIC_OPENSCENEGRAPH) #not sure if needed, but for plugins only msvc need the d suffix IF(NOT MSVC)