Author: jgardou
Date: Mon Dec 20 23:51:41 2010
New Revision: 50075
URL:
http://svn.reactos.org/svn/reactos?rev=50075&view=rev
Log:
[CMAKE]
- issue an error when an invalid module type is provided
- add nativedll module type.
Modified:
branches/cmake-bringup/gcc.cmake
Modified: branches/cmake-bringup/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=500…
==============================================================================
--- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Mon Dec 20 23:51:41 2010
@@ -107,8 +107,7 @@
if(${TYPE} MATCHES nativecui)
set_subsystem(${MODULE} native)
set_entrypoint(${MODULE} NtProcessStartup@4)
- endif()
- if(${TYPE} MATCHES win32gui)
+ elseif(${TYPE} MATCHES win32gui)
set_subsystem(${MODULE} windows)
set_entrypoint(${MODULE} WinMainCRTStartup)
if(NOT IS_UNICODE)
@@ -117,8 +116,7 @@
target_link_libraries(${MODULE} mingw_wmain)
endif(NOT IS_UNICODE)
target_link_libraries(${MODULE} mingw_common)
- endif()
- if(${TYPE} MATCHES win32cui)
+ elseif(${TYPE} MATCHES win32cui)
set_subsystem(${MODULE} console)
set_entrypoint(${MODULE} mainCRTStartup)
if(NOT IS_UNICODE)
@@ -127,8 +125,7 @@
target_link_libraries(${MODULE} mingw_wmain)
endif(NOT IS_UNICODE)
target_link_libraries(${MODULE} mingw_common)
- endif()
- if(${TYPE} MATCHES win32dll)
+ elseif(${TYPE} MATCHES win32dll)
set_entrypoint(${MODULE} DllMainCRTStartup@12)
target_link_libraries(${MODULE} mingw_dllmain mingw_common)
if(DEFINED baseaddress_${MODULE})
@@ -136,24 +133,25 @@
else()
message(STATUS "${MODULE} has no base address")
endif()
- endif()
- if(${TYPE} MATCHES win32ocx)
+ elseif(${TYPE} MATCHES win32ocx)
set_entrypoint(${MODULE} DllMainCRTStartup@12)
target_link_libraries(${MODULE} mingw_dllmain mingw_common)
set_target_properties(${MODULE} PROPERTIES SUFFIX ".ocx")
- endif()
- if(${TYPE} MATCHES cpl)
+ elseif(${TYPE} MATCHES cpl)
set_entrypoint(${MODULE} DllMainCRTStartup@12)
target_link_libraries(${MODULE} mingw_dllmain mingw_common)
set_target_properties(${MODULE} PROPERTIES SUFFIX ".cpl")
- endif()
- if(${TYPE} MATCHES kernelmodedriver)
+ elseif(${TYPE} MATCHES kernelmodedriver)
set_target_properties(${MODULE} PROPERTIES LINK_FLAGS
"-Wl,--exclude-all-symbols -Wl,-file-alignment=0x1000
-Wl,-section-alignment=0x1000" SUFFIX ".sys")
set_entrypoint(${MODULE} DriverEntry@8)
set_subsystem(${MODULE} native)
set_image_base(${MODULE} 0x00010000)
add_dependencies(${MODULE} bugcodes)
- endif()
+ elseif(${TYPE} MATCHES nativedll)
+ set_subsystem(${MODULE} native)
+ else()
+ message(FATAL_ERROR "Unknown module type : ${TYPE}")
+ endif()
endmacro()
macro(set_unicode)