From 59e6b6c82eee1a8b8755982959224f5a47791acb Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 8 Mar 2007 15:33:50 +0000 Subject: [PATCH] From Lugi Calori, tweaks to macros and addition of CMAKE_INSTALL_PREFIX to FindOpenThreads --- CMakeModules/FindOpenThreads.cmake | 5 ++++- CMakeModules/OsgMacroUtils.cmake | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeModules/FindOpenThreads.cmake b/CMakeModules/FindOpenThreads.cmake index 3667fa6ff..c8d52fe87 100644 --- a/CMakeModules/FindOpenThreads.cmake +++ b/CMakeModules/FindOpenThreads.cmake @@ -21,7 +21,9 @@ # #include # Try the user's environment request before anything else. + FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread + ${CMAKE_INSTALL_PREFIX}/include $ENV{OPENTHREADS_DIR}/include $ENV{OSG_DIR}/include ~/Library/Frameworks @@ -37,8 +39,9 @@ FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread FIND_LIBRARY(OPENTHREADS_LIBRARY - NAMES OpenThreads OpenThreadsWin32 + NAMES OpenThreads OpenThreadsd OpenThreadsWin32 OpenThreadsWin32d PATHS + ${CMAKE_INSTALL_PREFIX}/lib $ENV{OPENTHREADS_DIR}/lib $ENV{OSG_DIR}/lib ~/Library/Frameworks diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake index 9a49b8252..0ee57c294 100644 --- a/CMakeModules/OsgMacroUtils.cmake +++ b/CMakeModules/OsgMacroUtils.cmake @@ -210,10 +210,10 @@ ENDMACRO(GET_TARGETNAME) MACRO(ADD_OSG_PLUGIN SUBDIR) GET_TARGETNAME(${SUBDIR} TARGET) - +# MESSAGE("globbing in -->${PROJECT_SOURCE_DIR}/${SUBDIR}<--") + FILE(GLOB PLUGIN_SRC ${PROJECT_SOURCE_DIR}/${SUBDIR}/*.cpp) + FILE(GLOB PLUGIN_H ${PROJECT_SOURCE_DIR}/${SUBDIR}/*.h) - FILE(GLOB PLUGIN_SRC ${OPENSCENEGRAPH_DIR}/src/osgPlugins/${SUBDIR}/*.cpp) - FILE(GLOB PLUGIN_H ${OPENSCENEGRAPH_DIR}/src/osgPlugins/${SUBDIR}/*.h) #ADD_LIBRARY(${TARGET} SHARED ${PLUGIN_SRC} ${PLUGIN_H}) ADD_LIBRARY(${TARGET} MODULE ${PLUGIN_SRC} ${PLUGIN_H}) IF(NOT MSVC)