From Philip Lowman, post 1:
"Here is a collection of changes which should fix issues building the OSG with CMake 2.6.0 (along with some other changes) CMakeLists.txt: * Set CMP0003 to supress warning about linking against -lpthread (which is a non-absolute library location). (CMake 2.6.x fix) * Modified the WIN32_USE_MP and a couple of other Visual Studio specific flags to be in an IF(MSVC) block (minor tweak to reduce exposing this stuff on MinGW builds) * Includes my second set of glu tesselator autodetection changes that you seemed to want but haven't committed yet. src/OpenThreads/pthreads/CMakeLists.txt: * Eliminates warning when compiling on Linux about spaces in link line (CMake 2.6.x fix) CMakeModules/OsgMacroUtils.cmake: * Tweaks to make the macros behave properly under CMake 2.6.0 (doesn't change behavior under CMake 2.4.x) CMakeModules/Find3rdPartyDependencies.cmake: * Adds the NO_DEFAULT_PATH option to all of the search options so that things in C:\Program Files\OpenSceneGraph aren't accidently picked up during configure time and instead only things in the "3rdParty" folder are discovered. (general bugfix) " post 2: "Ok, hold the presses. I just discovered that for some odd reason the osgdb_* plugins under Linux aren't getting put under the osgPlugins-2.5.0 folder. Not exactly sure why this broke, the folder was there, just empty. I'll have to look into it this evening." post 3: "Fixed, was caused by the switch to CMAKE_LIBRARY_OUTPUT_DIRECTORY and some code in osgPlugins/CMakeLists.txt that effectively overrides LIBRARY_OUTPUT_PATH on non-MSVC compilers to dump the plugins in the plugins folder. I tweaked it to override CMAKE_LIBRARY_OUTPUT_DIRECTORY as well. Seems to work fine."
This commit is contained in:
@@ -11,15 +11,15 @@ SET(LIB_PUBLIC_HEADERS ${OpenThreads_PUBLIC_HEADERS})
|
||||
ADD_LIBRARY(${LIB_NAME}
|
||||
${OPENTHREADS_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||
${LIB_PUBLIC_HEADERS}
|
||||
PThread.c++
|
||||
PThreadBarrier.c++
|
||||
PThreadBarrierPrivateData.h
|
||||
PThreadCondition.c++
|
||||
PThreadConditionPrivateData.h
|
||||
PThreadMutex.c++
|
||||
PThreadMutexPrivateData.h
|
||||
PThreadPrivateData.h
|
||||
../common/Version.cpp
|
||||
PThread.c++
|
||||
PThreadBarrier.c++
|
||||
PThreadBarrierPrivateData.h
|
||||
PThreadCondition.c++
|
||||
PThreadConditionPrivateData.h
|
||||
PThreadMutex.c++
|
||||
PThreadMutexPrivateData.h
|
||||
PThreadPrivateData.h
|
||||
../common/Version.cpp
|
||||
)
|
||||
|
||||
IF(OPENTHREADS_SONAMES)
|
||||
@@ -27,7 +27,7 @@ IF(OPENTHREADS_SONAMES)
|
||||
ENDIF(OPENTHREADS_SONAMES)
|
||||
|
||||
SET(CMAKE_REQUIRED_LIBRARIES_SAFE "${CMAKE_REQUIRED_LIBRARIES}")
|
||||
SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}")
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
CHECK_FUNCTION_EXISTS(pthread_yield HAVE_PTHREAD_YIELD)
|
||||
IF(HAVE_PTHREAD_YIELD)
|
||||
@@ -92,25 +92,25 @@ ENDIF(HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES_SAFE}")
|
||||
|
||||
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
|
||||
# Since we're building different platforms binaries in
|
||||
# their respective directories, we need to set the
|
||||
# link directory so it can find this location.
|
||||
LINK_DIRECTORIES(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
TARGETS OpenThreads
|
||||
ARCHIVE DESTINATION lib${LIB_POSTFIX}
|
||||
LIBRARY DESTINATION lib${LIB_POSTFIX}
|
||||
RUNTIME DESTINATION bin
|
||||
TARGETS OpenThreads
|
||||
ARCHIVE DESTINATION lib${LIB_POSTFIX}
|
||||
LIBRARY DESTINATION lib${LIB_POSTFIX}
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
INSTALL(
|
||||
FILES ${OpenThreads_PUBLIC_HEADERS}
|
||||
DESTINATION include/OpenThreads
|
||||
FILES ${OpenThreads_PUBLIC_HEADERS}
|
||||
DESTINATION include/OpenThreads
|
||||
)
|
||||
|
||||
#commented out# INCLUDE(ModuleInstall OPTIONAL)
|
||||
|
||||
@@ -9,6 +9,7 @@ PROJECT(OSG_PLUGINS_MASTER)
|
||||
|
||||
IF(NOT MSVC)
|
||||
SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/${OSG_PLUGINS}")
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${OSG_PLUGINS}")
|
||||
ENDIF(NOT MSVC)
|
||||
|
||||
SET(CMAKE_SHARED_MODULE_PREFIX ${OSG_PLUGIN_PREFIX})
|
||||
|
||||
Reference in New Issue
Block a user