summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-05 16:08:05 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-03-05 16:08:05 (GMT)
commitc03f42ef326eb3794e7bf095b69709d095febc6a (patch)
tree39d99da12af7ad5b548e6e599f71173935c88272 /Modules
parent30464fda2cc2317a5f9b5b66d5f1fabfd4017dfe (diff)
parentb052902c32190f6c10c703ab07310a91fa50d46a (diff)
downloadCMake-c03f42ef326eb3794e7bf095b69709d095febc6a.zip
CMake-c03f42ef326eb3794e7bf095b69709d095febc6a.tar.gz
CMake-c03f42ef326eb3794e7bf095b69709d095febc6a.tar.bz2
Merge topic 'watcom-rtdll-version'
b052902c Remove hard-coded version of RTDLL for Open Watcom
Diffstat (limited to 'Modules')
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake24
1 files changed, 14 insertions, 10 deletions
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 013a028..7e68e8f 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -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 )
- endif()
- if(WATCOM18)
- set( __install__libs ${CompilerPath}/clbr18.dll
- ${CompilerPath}/mt7r18.dll ${CompilerPath}/plbr18.dll )
+ if(CMAKE_C_COMPILER_VERSION)
+ set(_compiler_version ${CMAKE_C_COMPILER_VERSION})
+ else()
+ set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION})
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}
)