Author: tfaber
Date: Sun Aug 21 21:18:59 2011
New Revision: 53361
URL:
http://svn.reactos.org/svn/reactos?rev=53361&view=rev
Log:
[CMAKE]
- Add current source directory to MS RC include paths
- Add include directories to WRC include paths
- Now they should behave identically enough. Thanks to Amine.
Modified:
trunk/reactos/cmake/gcc.cmake
trunk/reactos/cmake/msvc.cmake
Modified: trunk/reactos/cmake/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=53361&…
==============================================================================
--- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Sun Aug 21 21:18:59 2011
@@ -187,7 +187,7 @@
#set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${rc_result_defs}
${rc_result_incs} -i <SOURCE> -O coff -o <OBJECT>" PARENT_SCOPE)
set(CMAKE_RC_COMPILE_OBJECT
"<CMAKE_C_COMPILER> -DRC_INVOKED -D__WIN32__=1 -D__FLAT__=1
${rc_result_defs} -I${CMAKE_CURRENT_SOURCE_DIR} ${rc_result_incs} -xc -E <SOURCE> -o
<OBJECT>"
- "${WRC} -I${CMAKE_CURRENT_SOURCE_DIR} -i <OBJECT> -o <OBJECT>"
+ "${WRC} -I${CMAKE_CURRENT_SOURCE_DIR} ${rc_result_incs} -i <OBJECT> -o
<OBJECT>"
"<CMAKE_RC_COMPILER> -i <OBJECT> -J res -O coff -o
<OBJECT>" PARENT_SCOPE)
endfunction()
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=53361…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Sun Aug 21 21:18:59 2011
@@ -132,7 +132,18 @@
endfunction()
function(set_rc_compiler)
-# dummy, this workaround is only needed in mingw due to lack of RC support in cmake
+ get_directory_property(defines COMPILE_DEFINITIONS)
+ get_directory_property(includes INCLUDE_DIRECTORIES)
+
+ foreach(arg ${defines})
+ set(rc_result_defs "${rc_result_defs} /D${arg}")
+ endforeach()
+
+ foreach(arg ${includes})
+ set(rc_result_incs "/I${arg} ${rc_result_incs}")
+ endforeach()
+
+ set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${rc_result_defs}
/I${CMAKE_CURRENT_SOURCE_DIR} ${rc_result_incs} /fo <OBJECT> <SOURCE>"
PARENT_SCOPE)
endfunction()
# Thanks MS for creating a stupid linker