While testing recent OSG developer releases and the subversion trunk, I
have noticed that on my 64-bit Linux machines, all of the OSG libraries
get installed into the "lib64" directory as I would expect. However, the
OpenThreads library gets installed into the "lib" directory when
selecting "Build OpenThreads with Qt threading support." That is, with
the BUILD_OPENTHREADS_WITH_QT set to ON.
I am attaching the a fix for this issue in the file:
src/OpenThreads/qt/CMakeLists.txt
It simply adds ${LIB_POSTFIX} to the destination as in done with all
other CMakeLists.txt with libraries in OSG. I have tested it on both
32-bit and 64-bit Linux.
Thank you
John Cummings
# This file should only be included when using Qt threads
SET(LIB_NAME OpenThreads)
SET(LIB_PUBLIC_HEADERS ${OpenThreads_PUBLIC_HEADERS})
SOURCE_GROUP("Header Files" FILES ${LIB_PUBLIC_HEADERS})
SET_SOURCE_FILES_PROPERTIES(${LIB_PUBLIC_HEADERS} PROPERTIES HEADER_FILE_ONLY
ON)
SET(QTCLASS_HEADERS
QtThreadPrivateData.h
QtMutexPrivateData.h
QtConditionPrivateData.h
QtBarrierPrivateData.h
)
# No need to moc headers right now
#QT4_WRAP_CPP( QTCLASS_MOC ${QTCLASS_HEADERS} OPTIONS "-f" )
ADD_LIBRARY(${LIB_NAME}
${OPENTHREADS_USER_DEFINED_DYNAMIC_OR_STATIC}
${LIB_PUBLIC_HEADERS}
${QTCLASS_HEADERS}
QtThread.cpp
QtMutex.cpp
QtCondition.cpp
QtBarrier.cpp
../common/Version.cpp
../common/Atomic.cpp
${QTCLASS_MOC}
${OPENTHREADS_VERSIONINFO_RC}
)
IF(CMAKE_COMPILER_IS_GNUCXX)
# Remove -pedantic flag as it barfs on Qt headers
STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
ENDIF()
IF(OPENTHREADS_SONAMES)
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${OPENTHREADS_VERSION}
SOVERSION ${OPENTHREADS_SOVERSION})
ENDIF()
TARGET_LINK_LIBRARIES(${LIB_NAME} ${QT_QTCORE_LIBRARY})
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR})
# 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}
)
IF(MSVC AND OSG_MSVC_VERSIONED_DLL)
HANDLE_MSVC_DLL(ot ${OPENTHREADS_SOVERSION})
ENDIF()
INSTALL(
TARGETS OpenThreads
ARCHIVE DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads-dev
LIBRARY DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads
RUNTIME DESTINATION bin COMPONENT libopenthreads
)
INSTALL(
FILES ${OpenThreads_PUBLIC_HEADERS}
DESTINATION include/OpenThreads
COMPONENT libopenthreads-dev
)
#commented out# INCLUDE(ModuleInstall OPTIONAL)
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org