root/OpenSceneGraph/trunk/src/OpenThreads/win32/CMakeLists.txt @ 9677

Revision 9677, 1.5 kB (checked in by robert, 5 years ago)

Added support for VS versioning of OpenThreads?

Line 
1# This file should only be included when WIN32
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
9ADD_LIBRARY(${LIB_NAME}
10    ${OPENTHREADS_USER_DEFINED_DYNAMIC_OR_STATIC}
11    ${LIB_PUBLIC_HEADERS}
12    HandleHolder.h
13    Win32BarrierPrivateData.h
14    WIN32Condition.cpp
15    Win32Condition.h
16    Win32ConditionPrivateData.h
17    Win32Mutex.cpp
18    Win32MutexPrivateData.h
19    Win32Thread.cpp
20    Win32ThreadBarrier.cpp
21    Win32ThreadPrivateData.h
22    ../common/Version.cpp
23    ../common/Atomic.cpp
24    ${OPENTHREADS_VERSIONINFO_RC}
25)
26
27
28IF(OPENTHREADS_SONAMES)
29  SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${OPENTHREADS_VERSION} SOVERSION ${OPENTHREADS_SOVERSION})
30ENDIF(OPENTHREADS_SONAMES)
31
32# Since we're building different platforms binaries in
33# their respective directories, we need to set the
34# link directory so it can find this location.
35LINK_DIRECTORIES(
36    ${CMAKE_CURRENT_BINARY_DIR}
37)
38
39IF(MSVC AND OSG_MSVC_VERSIONED_DLL)
40    HANDLE_MSVC_DLL(ot ${OPENTHREADS_SOVERSION})
41ENDIF(MSVC AND OSG_MSVC_VERSIONED_DLL)
42
43INSTALL(
44    TARGETS OpenThreads
45    ARCHIVE DESTINATION lib COMPONENT libopenthreads-dev
46    LIBRARY DESTINATION lib COMPONENT libopenthreads
47    RUNTIME DESTINATION bin COMPONENT libopenthreads
48)
49INSTALL(
50    FILES ${OpenThreads_PUBLIC_HEADERS}
51    DESTINATION include/OpenThreads
52    COMPONENT libopenthreads-dev
53)
54
55#commented out# INCLUDE(ModuleInstall OPTIONAL)
Note: See TracBrowser for help on using the browser.