diff options
Diffstat (limited to 'Modules/CMakeDetermineRCCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineRCCompiler.cmake | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake index e48f21f..51b0ecf 100644 --- a/Modules/CMakeDetermineRCCompiler.cmake +++ b/Modules/CMakeDetermineRCCompiler.cmake @@ -24,19 +24,19 @@ IF(NOT CMAKE_RC_COMPILER) SET(CMAKE_RC_COMPILER_INIT ${CMAKE_GENERATOR_RC}) ENDIF(NOT CMAKE_RC_COMPILER_INIT) ENDIF(CMAKE_GENERATOR_RC) - - - # if no compiler has been specified yet, then look for one - IF(NOT CMAKE_RC_COMPILER_INIT) - SET(CMAKE_RC_COMPILER_LIST rc) - FIND_PROGRAM(CMAKE_RC_COMPILER_FULLPATH NAMES ${CMAKE_RC_COMPILER_LIST} ) - GET_FILENAME_COMPONENT(CMAKE_RC_COMPILER_INIT - ${CMAKE_RC_COMPILER_FULLPATH} NAME) - SET(CMAKE_RC_COMPILER_FULLPATH "${CMAKE_RC_COMPILER_FULLPATH}" - CACHE INTERNAL "full path to the compiler cmake found") - ENDIF(NOT CMAKE_RC_COMPILER_INIT) - SET(CMAKE_RC_COMPILER ${CMAKE_RC_COMPILER_INIT} CACHE STRING "RC compiler") + # finally list compilers to try + IF(CMAKE_RC_COMPILER_INIT) + SET(CMAKE_RC_COMPILER_LIST ${CMAKE_RC_COMPILER_INIT}) + ELSE(CMAKE_RC_COMPILER_INIT) + SET(CMAKE_RC_COMPILER_LIST c++ g++ CC aCC cl bcc xlC) + ENDIF(CMAKE_RC_COMPILER_INIT) + + # Find the compiler. + FIND_PROGRAM(CMAKE_RC_COMPILER NAMES ${CMAKE_RC_COMPILER_LIST} DOC "RC compiler") + IF(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER) + SET(CMAKE_RC_COMPILER "${CMAKE_RC_COMPILER_INIT}" CACHE FILEPATH "RC compiler" FORCE) + ENDIF(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER) ENDIF(NOT CMAKE_RC_COMPILER) MARK_AS_ADVANCED(CMAKE_RC_COMPILER) |