Author: tfaber
Date: Sun Jul 14 11:44:21 2013
New Revision: 59481
URL:
http://svn.reactos.org/svn/reactos?rev=59481&view=rev
Log:
[CMAKE]
- Do not allow add_delay_importlibs to be called on static libraries
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=59481&…
==============================================================================
--- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Sun Jul 14 11:44:21 2013
@@ -211,11 +211,15 @@
endif()
endfunction()
-function(add_delay_importlibs MODULE)
+function(add_delay_importlibs _module)
+ get_target_property(_module_type ${_module} TYPE)
+ if(_module_type STREQUAL "STATIC_LIBRARY")
+ message(FATAL_ERROR "Cannot add delay imports to a static library")
+ endif()
foreach(LIB ${ARGN})
- target_link_libraries(${MODULE} lib${LIB}_delayed)
+ target_link_libraries(${_module} lib${LIB}_delayed)
endforeach()
- target_link_libraries(${MODULE} delayimp)
+ target_link_libraries(${_module} delayimp)
endfunction()
if(NOT ARCH STREQUAL "i386")
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=59481…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Sun Jul 14 11:44:21 2013
@@ -128,13 +128,17 @@
#define those for having real libraries
set(CMAKE_IMPLIB_CREATE_STATIC_LIBRARY "LINK /LIB /NOLOGO <LINK_FLAGS>
/OUT:<TARGET> <OBJECTS>")
set(CMAKE_STUB_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> /Cp /Fo<OBJECT>
/c /Ta <SOURCE>")
-macro(add_delay_importlibs MODULE)
+function(add_delay_importlibs _module)
+ get_target_property(_module_type ${_module} TYPE)
+ if(_module_type STREQUAL "STATIC_LIBRARY")
+ message(FATAL_ERROR "Cannot add delay imports to a static library")
+ endif()
foreach(LIB ${ARGN})
- add_target_link_flags(${MODULE} "/DELAYLOAD:${LIB}.dll")
- target_link_libraries(${MODULE} lib${LIB})
+ add_target_link_flags(${_module} "/DELAYLOAD:${LIB}.dll")
+ target_link_libraries(${_module} lib${LIB})
endforeach()
- target_link_libraries(${MODULE} delayimp)
-endmacro()
+ target_link_libraries(${_module} delayimp)
+endfunction()
function(generate_import_lib _libname _dllname _spec_file)