From Mathieu Marache, "I came across a bug when building OpenSceneGraph with

MSVC_VERSIONED_DLL, NMake makefiles and CMake 2.6.2.
The compilation fails because it tries to copy ot11-OpenThreads.lib to
OpenThreads.lib which is valid for the 2.4.x era of CMake but not
anymore in 2.6.x era.
The provided file from the CMakeModules directory adds a tests on the
CMake version and corrects this. Works for me now."
This commit is contained in:
Robert Osfield 2008-10-27 09:48:34 +00:00
parent 32907d679f
commit 71814fe266

View File

@ -337,6 +337,7 @@ MACRO(HANDLE_MSVC_DLL)
IF(NOT MSVC_IDE)
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "../bin/${LIB_PREFIX}${LIB_SOVERSION}-")
IF (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
SET(NEW_LIB_NAME "${OUTPUT_BINDIR}/${LIB_PREFIX}${LIB_SOVERSION}-${LIB_NAME}")
ADD_CUSTOM_COMMAND(
TARGET ${LIB_NAME}
@ -346,6 +347,7 @@ MACRO(HANDLE_MSVC_DLL)
COMMAND ${CMAKE_COMMAND} -E remove "${NEW_LIB_NAME}.lib"
COMMAND ${CMAKE_COMMAND} -E remove "${NEW_LIB_NAME}.exp"
)
ENDIF (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
ELSE(NOT MSVC_IDE)
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "../../bin/${LIB_PREFIX}${LIB_SOVERSION}-" IMPORT_PREFIX "../")
ENDIF(NOT MSVC_IDE)