Changeset 6430
- Timestamp:
- 03/29/07 12:56:07
- Files:
-
- OpenSceneGraph/trunk/CMakeLists.txt (modified) (3 diffs)
- OpenSceneGraph/trunk/CMakeModules/FindOpenThreads.cmake (modified) (1 diff)
- OpenSceneGraph/trunk/src/osg/CMakeLists.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OpenSceneGraph/trunk/CMakeLists.txt
r6417 r6430 48 48 49 49 ENDIF(USING_OSG_OP_OT_TRIPLE_SET) 50 51 # Okay, here's the problem: On some platforms, linking against OpenThreads 52 # is not enough and explicit linking to the underlying thread library 53 # is also required (e.g. FreeBSD). But OpenThreads may be built with different 54 # backends (Pthreads, Sproc, Windows) so we don't know what the underlying 55 # thread library is because some platforms support multiple backends (e.g. 56 # IRIX supports Sproc and Pthreads). Linking all libraries won't work 57 # because the libraries may be incompatible. 58 # So the current solution is to attempt best guess linking and exempt certain 59 # cases. With IRIX, we're going to hope explicit linking to the underlying 60 # library is not necessary. We currently don't case for pthreads on Windows 61 # which might be an issue on things like Cygwin. This may need to be fixed. 62 FIND_PACKAGE(Threads) 63 IF(CMAKE_SYSTEM MATCHES IRIX) 64 # Erase CMAKE_THREAD_LIBS_INIT and hope it works 65 SET(CMAKE_THREAD_LIBS_INIT "" CACHE INTERNAL "") 66 ENDIF(CMAKE_SYSTEM MATCHES IRIX) 67 50 68 51 69 # Find OpenGL … … 108 126 ################################################################################ 109 127 # 3rd Party Dependency Stuff 110 IF( MSVC)128 IF(WIN32) 111 129 INCLUDE(Find3rdPartyDependencies) 112 ENDIF( MSVC)130 ENDIF(WIN32) 113 131 114 132 # Common to all platforms: … … 165 183 166 184 SET(LIB_POSTFIX "") 167 if (UNIX AND NOT WIN32)168 if(CMAKE_SIZEOF_VOID_P MATCHES "8")185 IF(UNIX AND NOT WIN32 AND NOT APPLE) 186 IF(CMAKE_SIZEOF_VOID_P MATCHES "8") 169 187 SET(LIB_POSTFIX "64") 170 endif(CMAKE_SIZEOF_VOID_P MATCHES "8")171 endif (UNIX AND NOT WIN32)188 ENDIF(CMAKE_SIZEOF_VOID_P MATCHES "8") 189 ENDIF(UNIX AND NOT WIN32 AND NOT APPLE) 172 190 173 191 #SET(OUTPUT_BINDIR ${PROJECT_BINARY_DIR}/bin/${CMAKE_SYSTEM_NAME}) OpenSceneGraph/trunk/CMakeModules/FindOpenThreads.cmake
r6424 r6430 81 81 # MESSAGE("-- Found OpenThreads: "${OPENTHREADS_LIBRARY}) 82 82 IF(NOT OPENTHREADS_LIBRARY_DEBUG) 83 MESSAGE("-- Warning Debug OpenThreads not found, using: ${OPENTHREADS_LIBRARY}")83 # MESSAGE("-- Warning Debug OpenThreads not found, using: ${OPENTHREADS_LIBRARY}") 84 84 SET(OPENTHREADS_LIBRARY_DEBUG "${OPENTHREADS_LIBRARY}") 85 85 ENDIF(NOT OPENTHREADS_LIBRARY_DEBUG) OpenSceneGraph/trunk/src/osg/CMakeLists.txt
r6402 r6430 292 292 ) 293 293 294 LINK_EXTERNAL(${LIB_NAME} ${MATH_LIBRARY} )295 LINK_CORELIB_DEFAULT(${LIB_NAME} ${MATH_LIBRARY} )294 LINK_EXTERNAL(${LIB_NAME} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIBRARY} ) 295 LINK_CORELIB_DEFAULT(${LIB_NAME} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIBRARY} ) 296 296 297 297 INCLUDE(ModuleInstall OPTIONAL)
