diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake index b55e9cb9e..86759d8c2 100644 --- a/CMakeModules/OsgMacroUtils.cmake +++ b/CMakeModules/OsgMacroUtils.cmake @@ -34,14 +34,11 @@ ENDMACRO(LINK_EXTERNAL TRGTNAME) ####################################################################################################### -# macro for common setup of core libraries: it links OPENGL_LIBRARIES in undifferentiated mode and -# OPENTHREADS_LIBRARY as Differentiated, so if existe the variable OPENTHREADS_LIBRARY_DEBUG, it uses -# the content of this library for linking when in debugging +# macro for common setup of core libraries: it links OPENGL_LIBRARIES in undifferentiated mode ####################################################################################################### MACRO(LINK_CORELIB_DEFAULT CORELIB_NAME) LINK_EXTERNAL(${CORELIB_NAME} ${OPENGL_LIBRARIES}) - LINK_WITH_VARIABLES(${CORELIB_NAME} OPENTHREADS_LIBRARY) ENDMACRO(LINK_CORELIB_DEFAULT CORELIB_NAME) diff --git a/src/osgDB/CMakeLists.txt b/src/osgDB/CMakeLists.txt index bc9ee8ea7..183f10f97 100644 --- a/src/osgDB/CMakeLists.txt +++ b/src/osgDB/CMakeLists.txt @@ -75,6 +75,7 @@ ENDIF(VRML_FOUND) LINK_INTERNAL(${LIB_NAME} osg + OpenThreads ) LINK_EXTERNAL(${LIB_NAME} ${OSGDB_PLATFORM_SPECIFIC_LIBRARIES} ) LINK_CORELIB_DEFAULT(${LIB_NAME}) diff --git a/src/osgFX/CMakeLists.txt b/src/osgFX/CMakeLists.txt index 4e24348bf..01e15a0ac 100644 --- a/src/osgFX/CMakeLists.txt +++ b/src/osgFX/CMakeLists.txt @@ -41,6 +41,7 @@ LINK_INTERNAL(${LIB_NAME} osgUtil osgDB osg + OpenThreads ) LINK_CORELIB_DEFAULT(${LIB_NAME}) diff --git a/src/osgGA/CMakeLists.txt b/src/osgGA/CMakeLists.txt index 75f4a7cad..92ee09345 100644 --- a/src/osgGA/CMakeLists.txt +++ b/src/osgGA/CMakeLists.txt @@ -48,11 +48,10 @@ ADD_LIBRARY(${LIB_NAME} Version.cpp ) -TARGET_LINK_LIBRARIES(${LIB_NAME} - osgUtil +LINK_INTERNAL(${LIB_NAME} + osgDB osg - ${OPENTHREADS_LIBRARY} - ${OPENGL_LIBRARIES} + OpenThreads ) INCLUDE(ModuleInstall OPTIONAL) diff --git a/src/osgManipulator/CMakeLists.txt b/src/osgManipulator/CMakeLists.txt index 48802d1d4..061dc450f 100644 --- a/src/osgManipulator/CMakeLists.txt +++ b/src/osgManipulator/CMakeLists.txt @@ -61,6 +61,7 @@ LINK_INTERNAL(${LIB_NAME} osgGA osgUtil osg + OpenThreads ) LINK_CORELIB_DEFAULT(${LIB_NAME}) diff --git a/src/osgParticle/CMakeLists.txt b/src/osgParticle/CMakeLists.txt index eab0d6f98..7ce4199d2 100644 --- a/src/osgParticle/CMakeLists.txt +++ b/src/osgParticle/CMakeLists.txt @@ -80,6 +80,7 @@ LINK_INTERNAL(${LIB_NAME} osgUtil osgDB osg + OpenThreads ) LINK_CORELIB_DEFAULT(${LIB_NAME}) diff --git a/src/osgShadow/CMakeLists.txt b/src/osgShadow/CMakeLists.txt index 8fc213d63..6d5b8aae8 100644 --- a/src/osgShadow/CMakeLists.txt +++ b/src/osgShadow/CMakeLists.txt @@ -37,6 +37,7 @@ LINK_INTERNAL(${LIB_NAME} osgUtil osgDB osg + OpenThreads ) LINK_CORELIB_DEFAULT(${LIB_NAME}) diff --git a/src/osgSim/CMakeLists.txt b/src/osgSim/CMakeLists.txt index 66cf679a8..cd201400f 100644 --- a/src/osgSim/CMakeLists.txt +++ b/src/osgSim/CMakeLists.txt @@ -67,6 +67,7 @@ LINK_INTERNAL(${LIB_NAME} osgText osgUtil osg + OpenThreads ) LINK_CORELIB_DEFAULT(${LIB_NAME}) diff --git a/src/osgTerrain/CMakeLists.txt b/src/osgTerrain/CMakeLists.txt index 9510a408b..6ddcbbaa1 100644 --- a/src/osgTerrain/CMakeLists.txt +++ b/src/osgTerrain/CMakeLists.txt @@ -32,6 +32,7 @@ LINK_INTERNAL(${LIB_NAME} osgUtil osgDB osg + OpenThreads ) LINK_CORELIB_DEFAULT(${LIB_NAME}) diff --git a/src/osgText/CMakeLists.txt b/src/osgText/CMakeLists.txt index 6c91e7592..cb456d1f7 100644 --- a/src/osgText/CMakeLists.txt +++ b/src/osgText/CMakeLists.txt @@ -32,6 +32,7 @@ ADD_LIBRARY(${LIB_NAME} LINK_INTERNAL(${LIB_NAME} osgDB osg + OpenThreads ) LINK_CORELIB_DEFAULT(${LIB_NAME}) diff --git a/src/osgUtil/CMakeLists.txt b/src/osgUtil/CMakeLists.txt index aa98afbcb..a61425328 100644 --- a/src/osgUtil/CMakeLists.txt +++ b/src/osgUtil/CMakeLists.txt @@ -82,6 +82,7 @@ ADD_LIBRARY(${LIB_NAME} LINK_INTERNAL(${LIB_NAME} osg + OpenThreads ) LINK_CORELIB_DEFAULT(${LIB_NAME}) diff --git a/src/osgViewer/CMakeLists.txt b/src/osgViewer/CMakeLists.txt index dcdec015d..1cb2e0b00 100644 --- a/src/osgViewer/CMakeLists.txt +++ b/src/osgViewer/CMakeLists.txt @@ -77,6 +77,7 @@ LINK_INTERNAL(${LIB_NAME} osgDB osgUtil osg + OpenThreads ) LINK_CORELIB_DEFAULT(${LIB_NAME})