Notes |
|
(0035657)
|
Brad King
|
2014-04-08 13:22
|
|
I don't think the extension needs to be stripped at all. It will not interfere with matching "windres" as a regex. Please try:
-GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
+GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME) |
|
|
(0035658)
|
Kai Pastor
|
2014-04-08 15:20
|
|
I'm very sorry but I somehow missed the point when I created and named the ticket.
The critical section is in CMakeRCInformation.cmake (which claims to set the basic flags for the Fortran language in CMake, BTW):
get_filename_component(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
if("${CMAKE_BASE_NAME}" MATCHES "windres")
set(CMAKE_BASE_NAME "windres")
endif()
set(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
What goes wrong for i686-w64-mingw32.shared-windres is including Platform/Windows-windres.cmake which would set the correct CMAKE_RC_COMPILE_OBJECT.
(The reason why I think you may still want to strip the extension is that there might be some other Platform/Windows-ResourceCompiler.cmake which shall be used for ResourceCompiler.exe CMAKE_RC_COMPILER.) |
|
|
(0035659)
|
Brad King
|
2014-04-08 15:37
|
|
Okay, here is another quick patch (untested):
-get_filename_component(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
-if("${CMAKE_BASE_NAME}" MATCHES "windres")
- set(CMAKE_BASE_NAME "windres")
-endif()
+if(CMAKE_RC_COMPILER MATCHES "windres[^/]*$")
+ set(CMAKE_BASE_NAME "windres")
+else()
+ get_filename_component(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
+endif() |
|
|
(0035661)
|
Kai Pastor
|
2014-04-09 16:24
|
|
I tested the proposed change to CMakeRCInformation.cmake, and it solves the problem.
(And again, this file's comments reference Fortran...) |
|
|
(0035665)
|
Brad King
|
2014-04-10 10:21
|
|
|
|
(0035675)
|
Brad King
|
2014-04-11 09:14
|
|
|
|
(0036967)
|
Robert Maynard
|
2014-10-06 10:33
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|