root/OpenSceneGraph/trunk/src/OpenThreads/qt/CMakeLists.txt @ 12540

Revision 12540, 1.9 kB (checked in by robert, 4 years ago)

From John Cummings, "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."

  • Property svn:eol-style set to native
Line 
1# This file should only be included when using Qt threads
2
3SET(LIB_NAME OpenThreads)
4SET(LIB_PUBLIC_HEADERS ${OpenThreads_PUBLIC_HEADERS})
5
6SOURCE_GROUP("Header Files" FILES ${LIB_PUBLIC_HEADERS})
7SET_SOURCE_FILES_PROPERTIES(${LIB_PUBLIC_HEADERS} PROPERTIES HEADER_FILE_ONLY ON)
8
9SET(QTCLASS_HEADERS
10    QtThreadPrivateData.h
11    QtMutexPrivateData.h
12    QtConditionPrivateData.h
13    QtBarrierPrivateData.h
14)
15
16# No need to moc headers right now
17#QT4_WRAP_CPP( QTCLASS_MOC ${QTCLASS_HEADERS} OPTIONS "-f" )
18
19ADD_LIBRARY(${LIB_NAME}
20    ${OPENTHREADS_USER_DEFINED_DYNAMIC_OR_STATIC}
21    ${LIB_PUBLIC_HEADERS}
22    ${QTCLASS_HEADERS}
23    QtThread.cpp
24    QtMutex.cpp
25    QtCondition.cpp
26    QtBarrier.cpp
27    ../common/Version.cpp
28    ../common/Atomic.cpp
29    ${QTCLASS_MOC}
30    ${OPENTHREADS_VERSIONINFO_RC}
31)
32
33IF(CMAKE_COMPILER_IS_GNUCXX)
34    # Remove -pedantic flag as it barfs on Qt headers
35   STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
36ENDIF()
37
38IF(OPENTHREADS_SONAMES)
39  SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${OPENTHREADS_VERSION} SOVERSION ${OPENTHREADS_SOVERSION})
40ENDIF()
41
42TARGET_LINK_LIBRARIES(${LIB_NAME} ${QT_QTCORE_LIBRARY})
43INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR})
44
45# Since we're building different platforms binaries in
46# their respective directories, we need to set the
47# link directory so it can find this location.
48LINK_DIRECTORIES(
49    ${CMAKE_CURRENT_BINARY_DIR}
50)
51
52IF(MSVC AND OSG_MSVC_VERSIONED_DLL)
53    HANDLE_MSVC_DLL(ot ${OPENTHREADS_SOVERSION})
54ENDIF()
55
56INSTALL(
57    TARGETS OpenThreads
58    ARCHIVE DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads-dev
59    LIBRARY DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads
60    RUNTIME DESTINATION bin COMPONENT libopenthreads
61)
62INSTALL(
63    FILES ${OpenThreads_PUBLIC_HEADERS}
64    DESTINATION include/OpenThreads
65    COMPONENT libopenthreads-dev
66)
67
68#commented out# INCLUDE(ModuleInstall OPTIONAL)
Note: See TracBrowser for help on using the browser.