Merge pull request #74 from mditzel/master

Fix #73: link error when cross-compiling with mingw.
This commit is contained in:
Pieter Hintjens 2014-04-11 09:51:51 +02:00
commit f3cc00b4af

View File

@ -365,7 +365,7 @@ if(MINGW)
set(CMAKE_RC_COMPILER_INIT windres) set(CMAKE_RC_COMPILER_INIT windres)
enable_language(RC) enable_language(RC)
set(CMAKE_RC_COMPILE_OBJECT set(CMAKE_RC_COMPILE_OBJECT
"<CMAKE_RC_COMPILER> <FLAGS> --target=${rc_target} <DEFINES> -i <SOURCE> -o <OBJECT>") "<CMAKE_RC_COMPILER> <FLAGS> -O coff --target=${rc_target} <DEFINES> -i <SOURCE> -o <OBJECT>")
endmacro() endmacro()
if( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i386" if( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i386"
@ -412,10 +412,6 @@ foreach(source ${cxx-sources})
list(APPEND sources ${CMAKE_CURRENT_SOURCE_DIR}/src/${source}) list(APPEND sources ${CMAKE_CURRENT_SOURCE_DIR}/src/${source})
endforeach() endforeach()
foreach(source ${rc-sources})
list(APPEND sources ${CMAKE_CURRENT_BINARY_DIR}/${source})
endforeach()
foreach(source ${rc-sources}) foreach(source ${rc-sources})
list(APPEND sources ${CMAKE_CURRENT_BINARY_DIR}/${source}) list(APPEND sources ${CMAKE_CURRENT_BINARY_DIR}/${source})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/${source}.in ${CMAKE_CURRENT_BINARY_DIR}/${source}) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/${source}.in ${CMAKE_CURRENT_BINARY_DIR}/${source})