Merge topic 'watcom-rtdll-version'

b052902c Remove hard-coded version of RTDLL for Open Watcom
This commit is contained in:
Brad King 2014-03-05 11:08:05 -05:00 committed by CMake Topic Stage
commit c03f42ef32
1 changed files with 14 additions and 10 deletions

View File

@ -366,18 +366,22 @@ endif()
if(WATCOM)
get_filename_component( CompilerPath ${CMAKE_C_COMPILER} PATH )
if(WATCOM17)
set( __install__libs ${CompilerPath}/clbr17.dll
${CompilerPath}/mt7r17.dll ${CompilerPath}/plbr17.dll )
if(CMAKE_C_COMPILER_VERSION)
set(_compiler_version ${CMAKE_C_COMPILER_VERSION})
else()
set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION})
endif()
if(WATCOM18)
set( __install__libs ${CompilerPath}/clbr18.dll
${CompilerPath}/mt7r18.dll ${CompilerPath}/plbr18.dll )
endif()
if(WATCOM19)
set( __install__libs ${CompilerPath}/clbr19.dll
${CompilerPath}/mt7r19.dll ${CompilerPath}/plbr19.dll )
string(REGEX MATCHALL "[0-9]+" _watcom_version_list "${_compiler_version}")
list(GET _watcom_version_list 0 _watcom_major)
list(GET _watcom_version_list 1 _watcom_minor)
if(${_watcom_major} GREATER 11)
math(EXPR _watcom_major "${_watcom_major} - 11")
endif()
math(EXPR _watcom_minor "${_watcom_minor} / 10")
set( __install__libs
${CompilerPath}/clbr${_watcom_major}${_watcom_minor}.dll
${CompilerPath}/mt7r${_watcom_major}${_watcom_minor}.dll
${CompilerPath}/plbr${_watcom_major}${_watcom_minor}.dll )
foreach(lib
${__install__libs}
)