Author: akhaldi
Date: Mon Jun 13 12:05:22 2011
New Revision: 52211
URL:
http://svn.reactos.org/svn/reactos?rev=52211&view=rev
Log:
[CMAKE]
* Deduplicate add_importlibs.
Modified:
trunk/reactos/cmake/CMakeMacros.cmake
trunk/reactos/cmake/gcc.cmake
trunk/reactos/cmake/msvc.cmake
Modified: trunk/reactos/cmake/CMakeMacros.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/CMakeMacros.cmake?re…
==============================================================================
--- trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] Mon Jun 13 12:05:22 2011
@@ -226,3 +226,15 @@
DEPENDS ${_file2})
endmacro()
endif()
+
+macro(add_importlibs MODULE)
+ add_dependency_node(${MODULE})
+ foreach(LIB ${ARGN})
+ if ("${LIB}" MATCHES "msvcrt")
+ target_link_libraries(${MODULE} msvcrtex)
+ endif()
+ target_link_libraries(${MODULE}
${CMAKE_BINARY_DIR}/importlibs/lib${LIB}${CMAKE_STATIC_LIBRARY_SUFFIX})
+ add_dependencies(${MODULE} lib${LIB})
+ add_dependency_edge(${MODULE} ${LIB})
+ endforeach()
+endmacro()
Modified: trunk/reactos/cmake/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=52211&…
==============================================================================
--- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Mon Jun 13 12:05:22 2011
@@ -207,19 +207,6 @@
set(IDL_INTERFACE_ARG -u -o)
set(IDL_DLLDATA_ARG --dlldata-only -o)
-
-macro(add_importlibs MODULE)
- add_dependency_node(${MODULE})
- foreach(LIB ${ARGN})
- if ("${LIB}" MATCHES "msvcrt")
- target_link_libraries(${MODULE} msvcrtex)
- endif()
- target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}.a)
- add_dependencies(${MODULE} lib${LIB})
- add_dependency_edge(${MODULE} ${LIB})
- endforeach()
-endmacro()
-
macro(add_delay_importlibs MODULE)
foreach(LIB ${ARGN})
target_link_libraries(${MODULE}
${CMAKE_BINARY_DIR}/importlibs/lib${LIB}_delayed.a)
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=52211…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Mon Jun 13 12:05:22 2011
@@ -158,16 +158,6 @@
add_dependencies(lib${_name} asm ${_dependencies})
endmacro()
-macro(add_importlibs MODULE)
- foreach(LIB ${ARGN})
- if ("${LIB}" MATCHES "msvcrt")
- target_link_libraries(${MODULE} msvcrtex)
- endif()
- target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}.lib)
- add_dependencies(${MODULE} lib${LIB})
- endforeach()
-endmacro()
-
macro(add_delay_importlibs MODULE)
# TODO
endmacro()