Author: tkreuzer
Date: Mon Jan 24 18:13:40 2011
New Revision: 50478
URL:
http://svn.reactos.org/svn/reactos?rev=50478&view=rev
Log:
[CMAKE]
Refactor IDL compilation:
- Move all macros to idl-support.cmake
- Make rpc proxy a static library, instead of fiddeling with SOURCE variable
- Merge client and server rpc libraries into one library
- Reorder global makelist file a little
- Improve configure script
- Improve naming, use add_* when a target is added, generate_* when only a file is
generated
- Don't compile wbemcli.idl on MSVC (temp hack)
- Don't compile rossym on MSVC, we don't use it
- Use ml64 as assembler when compiling for amd64
- fix spec2def invocation
Added:
branches/cmake-bringup/cmake/idl-support.cmake (with props)
Modified:
branches/cmake-bringup/CMakeLists.txt
branches/cmake-bringup/CMakeMacros.cmake
branches/cmake-bringup/base/services/eventlog/CMakeLists.txt
branches/cmake-bringup/base/services/rpcss/CMakeLists.txt
branches/cmake-bringup/base/services/umpnpmgr/CMakeLists.txt
branches/cmake-bringup/base/services/wlansvc/CMakeLists.txt
branches/cmake-bringup/base/system/services/CMakeLists.txt
branches/cmake-bringup/configure.cmd
branches/cmake-bringup/dll/directx/quartz/CMakeLists.txt
branches/cmake-bringup/dll/win32/actxprxy/CMakeLists.txt
branches/cmake-bringup/dll/win32/advapi32/CMakeLists.txt
branches/cmake-bringup/dll/win32/atl/CMakeLists.txt
branches/cmake-bringup/dll/win32/lsasrv/CMakeLists.txt
branches/cmake-bringup/dll/win32/mshtml/CMakeLists.txt
branches/cmake-bringup/dll/win32/msi/CMakeLists.txt
branches/cmake-bringup/dll/win32/mstask/CMakeLists.txt
branches/cmake-bringup/dll/win32/ole32/CMakeLists.txt
branches/cmake-bringup/dll/win32/oleaut32/CMakeLists.txt
branches/cmake-bringup/dll/win32/qmgr/CMakeLists.txt
branches/cmake-bringup/dll/win32/qmgrprxy/CMakeLists.txt
branches/cmake-bringup/dll/win32/rpcrt4/CMakeLists.txt
branches/cmake-bringup/dll/win32/setupapi/CMakeLists.txt
branches/cmake-bringup/dll/win32/shell32/CMakeLists.txt
branches/cmake-bringup/dll/win32/sti/CMakeLists.txt
branches/cmake-bringup/dll/win32/urlmon/CMakeLists.txt
branches/cmake-bringup/dll/win32/wlanapi/CMakeLists.txt
branches/cmake-bringup/gcc.cmake
branches/cmake-bringup/include/dxsdk/CMakeLists.txt
branches/cmake-bringup/include/psdk/CMakeLists.txt
branches/cmake-bringup/include/reactos/idl/CMakeLists.txt
branches/cmake-bringup/include/reactos/wine/CMakeLists.txt
branches/cmake-bringup/lib/rossym/CMakeLists.txt
branches/cmake-bringup/msc.cmake
branches/cmake-bringup/toolchain-mingw32.cmake
branches/cmake-bringup/toolchain-msvc.cmake
Modified: branches/cmake-bringup/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeLists.txt?re…
==============================================================================
--- branches/cmake-bringup/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/CMakeLists.txt [iso-8859-1] Mon Jan 24 18:13:40 2011
@@ -7,6 +7,14 @@
# Don't escape preprocessor definition values added via add_definitions
cmake_policy(SET CMP0005 OLD)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
+set(CMAKE_SHARED_LIBRARY_PREFIX "")
+set(CMAKE_SKIP_PREPROCESSED_SOURCE_RULES TRUE)
+set(CMAKE_SKIP_ASSEMBLY_SOURCE_RULES TRUE)
+set(CMAKE_COLOR_MAKEFILE OFF)
+set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
if(NOT ARCH)
set(ARCH i386)
@@ -22,6 +30,8 @@
include(config-arm.cmake)
endif()
+add_definitions(-D__REACTOS__)
+
if(NOT CMAKE_CROSSCOMPILING)
add_definitions(-DTARGET_${ARCH})
@@ -51,41 +61,7 @@
else()
- if(NOT DEFINED REACTOS_BUILD_TOOLS_DIR)
- set(REACTOS_BUILD_TOOLS_DIR ${REACTOS_SOURCE_DIR}/build)
- endif()
-
- set(IMPORT_EXECUTABLES "${REACTOS_BUILD_TOOLS_DIR}/ImportExecutables.cmake"
CACHE FILEPATH "Host executables")
- include(${IMPORT_EXECUTABLES})
-
-endif()
-
-# Compiler specific definitions and macros
-if(MSVC)
- include(msc.cmake)
-else()
- include(gcc.cmake)
-endif()
-
-# Generic macros
-include(CMakeMacros.cmake)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
-set(CMAKE_SHARED_LIBRARY_PREFIX "")
-
-set(CMAKE_SKIP_PREPROCESSED_SOURCE_RULES TRUE)
-set(CMAKE_SKIP_ASSEMBLY_SOURCE_RULES TRUE)
-
-set(CMAKE_COLOR_MAKEFILE OFF)
-
-set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
-
-add_definitions(-D__REACTOS__)
-
-if(CMAKE_CROSSCOMPILING)
-
- #Some cleanup
+ # Do some cleanup
file(REMOVE
${REACTOS_BINARY_DIR}/dependencies.graphml
${REACTOS_BINARY_DIR}/boot/ros_livecd.txt
@@ -95,6 +71,26 @@
${REACTOS_BINARY_DIR}/boot/ros_cab.txt
${REACTOS_BINARY_DIR}/boot/ros_cab_target.txt)
+ if(NOT DEFINED REACTOS_BUILD_TOOLS_DIR)
+ set(REACTOS_BUILD_TOOLS_DIR ${REACTOS_SOURCE_DIR}/build)
+ endif()
+
+ set(IMPORT_EXECUTABLES "${REACTOS_BUILD_TOOLS_DIR}/ImportExecutables.cmake"
CACHE FILEPATH "Host executables")
+ include(${IMPORT_EXECUTABLES})
+
+ # Compiler specific definitions and macros
+ if(MSVC)
+ include(msc.cmake)
+ else()
+ include(gcc.cmake)
+ endif()
+
+ # Generic macros
+ include(CMakeMacros.cmake)
+
+ # IDL macros for widl/midl
+ include(cmake/idl-support.cmake)
+
#Some useful variables
set(LIVECD_DIR "${REACTOS_BINARY_DIR}/boot/livecd")
set(BOOTCD_DIR "${REACTOS_BINARY_DIR}/boot/bootcd")
@@ -118,7 +114,11 @@
endif()
# Version Options
- add_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502
-D_WIN32_WINDOWS=0x502 -D_SETUPAPI_VER=0x502)
+ add_definitions(-DWINVER=0x502
+ -D_WIN32_IE=0x600
+ -D_WIN32_WINNT=0x502
+ -D_WIN32_WINDOWS=0x502
+ -D_SETUPAPI_VER=0x502)
# Arch Options
if(ARCH MATCHES i386)
Modified: branches/cmake-bringup/CMakeMacros.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeMacros.cmake…
==============================================================================
--- branches/cmake-bringup/CMakeMacros.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/CMakeMacros.cmake [iso-8859-1] Mon Jan 24 18:13:40 2011
@@ -31,40 +31,6 @@
endmacro()
endif()
-
-macro(idl_compile_object OBJECT SOURCE)
- get_property(FLAGS SOURCE ${SOURCE} PROPERTY COMPILE_FLAGS)
- get_property(DEFINES SOURCE ${SOURCE} PROPERTY COMPILE_DEFINITIONS)
- get_property(INCLUDE_DIRECTORIES DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
-
- foreach(DIR ${INCLUDE_DIRECTORIES})
- set(FLAGS "${FLAGS} -I${DIR}")
- endforeach()
-
- set(IDL_COMMAND ${CMAKE_IDL_COMPILE_OBJECT})
- string(REPLACE "<CMAKE_IDL_COMPILER>"
"${CMAKE_IDL_COMPILER}" IDL_COMMAND "${IDL_COMMAND}")
- string(REPLACE <FLAGS> "${FLAGS}" IDL_COMMAND
"${IDL_COMMAND}")
- string(REPLACE "<DEFINES>" "${DEFINES}" IDL_COMMAND
"${IDL_COMMAND}")
- string(REPLACE "<OBJECT>" "${OBJECT}" IDL_COMMAND
"${IDL_COMMAND}")
- string(REPLACE "<SOURCE>" "${SOURCE}" IDL_COMMAND
"${IDL_COMMAND}")
- separate_arguments(IDL_COMMAND)
-
- add_custom_command(
- OUTPUT ${OBJECT}
- COMMAND ${IDL_COMMAND}
- DEPENDS ${SOURCE}
- VERBATIM)
-endmacro()
-
-macro(add_interface_definitions TARGET)
- foreach(SOURCE ${ARGN})
- get_filename_component(FILE ${SOURCE} NAME_WE)
- set(OBJECT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}.h)
- idl_compile_object(${OBJECT} ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE})
- list(APPEND OBJECTS ${OBJECT})
- endforeach()
- add_custom_target(${TARGET} ALL DEPENDS ${OBJECTS})
-endmacro()
macro(add_minicd_target _targetname _dir) # optional parameter: _nameoncd
if("${ARGN}" STREQUAL "")
@@ -151,97 +117,6 @@
add_livecd(${FILENAME} ${_dir})
endmacro()
-macro(custom_incdefs)
- if(NOT DEFINED result_incs) #rpc_defines
- get_directory_property(rpc_defines COMPILE_DEFINITIONS)
- get_directory_property(rpc_includes INCLUDE_DIRECTORIES)
-
- foreach(arg ${rpc_defines})
- set(result_defs ${result_defs} -D${arg})
- endforeach()
-
- foreach(arg ${rpc_includes})
- set(result_incs -I${arg} ${result_incs})
- endforeach()
- endif()
-endmacro()
-
-macro(rpcproxy TARGET)
- custom_incdefs()
- list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c)
-
- foreach(_in_FILE ${ARGN})
- get_filename_component(FILE ${_in_FILE} NAME_WE)
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c
- COMMAND ${IDL_COMPILER} ${result_incs} ${result_defs} ${IDL_FLAGS}
${IDL_HEADER_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.h ${IDL_PROXY_ARG}
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl)
- set_source_files_properties(
- ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c
- PROPERTIES GENERATED TRUE)
- list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c)
- list(APPEND IDLS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl)
- endforeach()
-
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c
- COMMAND ${IDL_COMPILER} ${result_incs} ${result_defs} ${IDL_FLAGS}
${IDL_DLLDATA_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c ${IDLS}
- DEPENDS ${IDLS})
- set_source_files_properties(
- ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c
- PROPERTIES GENERATED TRUE)
-endmacro()
-
-macro(idl_files)
- custom_incdefs()
- foreach(_in_FILE ${ARGN})
- get_filename_component(FILE ${_in_FILE} NAME_WE)
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c
- COMMAND ${IDL_COMPILER} ${result_incs} ${result_defs} ${IDL_FLAGS} -h -H
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${IDL_SERVER_ARG}
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl
- DEPENDS ${_in_file})
- set_source_files_properties(
- ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c
- PROPERTIES GENERATED TRUE)
- add_library(${FILE}_server ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c)
- add_dependencies(${FILE}_server psdk)
-
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c
- COMMAND ${IDL_COMPILER} ${result_incs} ${result_defs} ${IDL_FLAGS} -h -H
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${IDL_CLIENT_ARG}
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl
- DEPENDS ${_in_file})
- set_source_files_properties(
- ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c
- PROPERTIES GENERATED TRUE)
- add_library(${FILE}_client ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c)
- add_dependencies(${FILE}_client psdk)
- endforeach()
-endmacro()
-
-macro(add_typelib TARGET)
- custom_incdefs()
- foreach(SOURCE ${ARGN})
- get_filename_component(FILE ${SOURCE} NAME_WE)
- set(OBJECT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}.tlb)
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}.tlb
- COMMAND ${IDL_COMPILER} ${result_incs} ${IDL_FLAGS} ${IDL_TYPELIB_ARG}
${CMAKE_CURRENT_BINARY_DIR}/${FILE}.tlb ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE}
- DEPENDS ${SOURCE})
- list(APPEND OBJECTS ${OBJECT})
- endforeach()
- add_custom_target(${TARGET} ALL DEPENDS ${OBJECTS})
-endmacro()
-
-macro(add_idl_interface IDL_FILE)
- custom_incdefs()
- get_filename_component(FILE ${IDL_FILE} NAME_WE)
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_i.c
- COMMAND ${IDL_COMPILER} ${result_incs} ${result_defs} ${IDL_FLAGS}
${IDL_INTERFACE_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_i.c
${CMAKE_CURRENT_SOURCE_DIR}/${IDL_FILE}
- DEPENDS ${IDL_FILE})
- set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${FILE}_i.c PROPERTIES
GENERATED TRUE)
-endmacro()
-
macro(add_dependency_node _node)
if(GENERATE_DEPENDENCY_GRAPH)
get_target_property(_type ${_node} TYPE)
Modified: branches/cmake-bringup/base/services/eventlog/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/services/eve…
==============================================================================
--- branches/cmake-bringup/base/services/eventlog/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/base/services/eventlog/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -12,7 +12,7 @@
add_executable(eventlog ${CMAKE_CURRENT_BINARY_DIR}/eventlog_eventlog.h.gch ${SOURCE})
-target_link_libraries(eventlog eventlogrpc_server ${PSEH_LIB})
+target_link_libraries(eventlog eventlogrpc ${PSEH_LIB})
add_pch(eventlog ${CMAKE_CURRENT_SOURCE_DIR}/eventlog.h ${SOURCE})
Modified: branches/cmake-bringup/base/services/rpcss/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/services/rpc…
==============================================================================
--- branches/cmake-bringup/base/services/rpcss/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/base/services/rpcss/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -12,7 +12,7 @@
add_executable(rpcss ${SOURCE})
-target_link_libraries(rpcss epm_server irot_server ${PSEH_LIB} wine)
+target_link_libraries(rpcss epmrpc irotrpc ${PSEH_LIB} wine)
set_module_type(rpcss win32cui)
Modified: branches/cmake-bringup/base/services/umpnpmgr/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/services/ump…
==============================================================================
--- branches/cmake-bringup/base/services/umpnpmgr/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/base/services/umpnpmgr/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -7,7 +7,7 @@
add_definitions(-D_WIN32_WINNT=0x600)
add_executable(umpnpmgr umpnpmgr.c umpnpmgr.rc)
-target_link_libraries(umpnpmgr pnp_server wdmguid ${PSEH_LIB})
+target_link_libraries(umpnpmgr pnprpc wdmguid ${PSEH_LIB})
set_module_type(umpnpmgr win32cui)
add_importlibs(umpnpmgr advapi32 rpcrt4 userenv msvcrt kernel32 ntdll)
Modified: branches/cmake-bringup/base/services/wlansvc/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/services/wla…
==============================================================================
--- branches/cmake-bringup/base/services/wlansvc/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/base/services/wlansvc/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -4,7 +4,7 @@
add_executable(wlansvc wlansvc.c rpcserver.c)
-target_link_libraries(wlansvc wlansvc_server ${PSEH_LIB})
+target_link_libraries(wlansvc wlansvcrpc ${PSEH_LIB})
set_module_type(wlansvc win32cui)
add_importlibs(wlansvc advapi32 rpcrt4 iphlpapi msvcrt kernel32 ntdll)
Modified: branches/cmake-bringup/base/system/services/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/system/servi…
==============================================================================
--- branches/cmake-bringup/base/system/services/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/base/system/services/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -17,7 +17,7 @@
add_executable(services ${CMAKE_CURRENT_BINARY_DIR}/services_services.h.gch ${SOURCE})
target_link_libraries(services
- svcctl_server
+ svcctlrpc
${PSEH_LIB})
add_pch(services ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${SOURCE})
Added: branches/cmake-bringup/cmake/idl-support.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/cmake/idl-support…
==============================================================================
--- branches/cmake-bringup/cmake/idl-support.cmake (added)
+++ branches/cmake-bringup/cmake/idl-support.cmake [iso-8859-1] Mon Jan 24 18:13:40 2011
@@ -1,0 +1,151 @@
+
+#idl files support
+if(MSVC)
+ set(IDL_COMPILER midl)
+ set(IDL_HEADER_ARG /h) #.h
+ set(IDL_HEADER_ARG2 /h) #.h
+ set(IDL_TYPELIB_ARG /tlb) #.tlb
+ set(IDL_SERVER_ARG /sstub) #.c for stub server library
+ set(IDL_CLIENT_ARG /cstub) #.c for stub client library
+ set(IDL_PROXY_ARG /proxy)
+ set(IDL_INTERFACE_ARG /iid)
+ if(ARCH MATCHES i386)
+ set(IDL_FLAGS /win32)
+ elseif(ARCH MATCHES amd64)
+ set(IDL_FLAGS /amd64)
+ else()
+ set(IDL_FLAGS "")
+ endif()
+else()
+ set(IDL_COMPILER native-widl)
+ set(IDL_HEADER_ARG -h -o) #.h
+ set(IDL_HEADER_ARG2 -h -H) #.h
+ set(IDL_TYPELIB_ARG -t -o) #.tlb
+ set(IDL_SERVER_ARG -s -S) #.c for server library
+ set(IDL_CLIENT_ARG -c -C) #.c for stub client library
+ set(IDL_PROXY_ARG -p -P)
+ set(IDL_INTERFACE_ARG -u -o)
+ if(ARCH MATCHES i386)
+ set(IDL_FLAGS -m32 --win32)
+ elseif(ARCH MATCHES amd64)
+ set(IDL_FLAGS -m64 --win64)
+ else()
+ set(IDL_FLAGS "")
+ endif()
+endif()
+
+
+macro(get_includes OUTPUT_VAR)
+ get_directory_property(_includes INCLUDE_DIRECTORIES)
+ foreach(arg ${_includes})
+ set(${OUTPUT_VAR} -I${arg} ${${OUTPUT_VAR}})
+ endforeach()
+endmacro()
+
+macro(get_defines OUTPUT_VAR)
+ get_directory_property(_defines COMPILE_DEFINITIONS)
+ foreach(arg ${_defines})
+ set(${OUTPUT_VAR} ${${OUTPUT_VAR}} -D${arg})
+ endforeach()
+endmacro()
+
+macro(add_typelib TARGET)
+ get_includes(INCLUDES)
+ get_defines(DEFINES)
+ foreach(FILE ${ARGN})
+ get_filename_component(NAME ${FILE} NAME_WE)
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.tlb
+ COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS}
${IDL_TYPELIB_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.tlb
${CMAKE_CURRENT_SOURCE_DIR}/${FILE}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE})
+ list(APPEND OBJECTS ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.tlb)
+ endforeach()
+ add_custom_target(${TARGET} ALL DEPENDS ${OBJECTS})
+endmacro()
+
+macro(add_idl_headers TARGET)
+ get_includes(INCLUDES)
+ get_defines(DEFINES)
+ foreach(FILE ${ARGN})
+ get_filename_component(NAME ${FILE} NAME_WE)
+ set(HEADER ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.h)
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.h
+ COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_HEADER_ARG}
${CMAKE_CURRENT_BINARY_DIR}/${NAME}.h ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE})
+ list(APPEND HEADERS ${HEADER})
+ endforeach()
+ add_custom_target(${TARGET} ALL DEPENDS ${HEADERS})
+endmacro()
+
+macro(add_rpcproxy_library TARGET)
+ get_includes(INCLUDES)
+ get_defines(DEFINES)
+ foreach(FILE ${ARGN})
+ get_filename_component(NAME ${FILE} NAME_WE)
+ if(MSVC)
+ set(IDL_DLLDATA_ARG /dlldata
${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c)
+ else()
+ set(IDL_DLLDATA_ARG "")
+ endif()
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.h
${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c
+ COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_HEADER_ARG}
${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.h ${IDL_PROXY_ARG}
${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c ${IDL_DLLDATA_ARG}
${CMAKE_CURRENT_SOURCE_DIR}/${FILE}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE})
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.h
${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c
+ PROPERTIES GENERATED TRUE)
+ list(APPEND rpcproxy_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c)
+ list(APPEND IDLS ${CMAKE_CURRENT_SOURCE_DIR}/${NAME}.idl)
+ endforeach()
+
+ if(NOT MSVC)
+ # Extra pass to generate dlldata for widl
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c
+ COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} --dlldata-only -o
${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c ${IDLS}
+ DEPENDS ${IDLS})
+ endif()
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c
+ PROPERTIES GENERATED TRUE)
+ add_library(${TARGET} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c
${rpcproxy_SOURCES})
+endmacro()
+
+macro(add_rpc_library TARGET)
+ get_includes(INCLUDES)
+ get_defines(DEFINES)
+ foreach(FILE ${ARGN})
+ get_filename_component(NAME ${FILE} NAME_WE)
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.h
${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c
+ COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS}
${IDL_HEADER_ARG2} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.h ${IDL_SERVER_ARG}
${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE})
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.h
${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c
+ PROPERTIES GENERATED TRUE)
+ list(APPEND server_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c)
+
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.h
${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c
+ COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS}
${IDL_HEADER_ARG2} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.h ${IDL_CLIENT_ARG}
${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE})
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.h
${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c
+ PROPERTIES GENERATED TRUE)
+ list(APPEND client_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c)
+ endforeach()
+ add_library(${TARGET} ${server_SOURCES} ${client_SOURCES})
+ add_dependencies(${TARGET} psdk)
+endmacro()
+
+macro(generate_idl_iids IDL_FILE)
+ get_includes(INCLUDES)
+ get_defines(DEFINES)
+ get_filename_component(NAME ${IDL_FILE} NAME_WE)
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c
+ COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_INTERFACE_ARG}
${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c ${CMAKE_CURRENT_SOURCE_DIR}/${IDL_FILE}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${IDL_FILE})
+ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c PROPERTIES
GENERATED TRUE)
+endmacro()
Propchange: branches/cmake-bringup/cmake/idl-support.cmake
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/cmake-bringup/configure.cmd
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/configure.cmd?rev…
==============================================================================
--- branches/cmake-bringup/configure.cmd [iso-8859-1] (original)
+++ branches/cmake-bringup/configure.cmd [iso-8859-1] Mon Jan 24 18:13:40 2011
@@ -11,9 +11,11 @@
)
if not "%DDK_TARGET_OS%" == "" (
echo Detected DDK/WDK for %_BUILDARCH%
- set ARCH=%_BUILDARCH%
if "%_BUILDARCH%" == "x86" (
set ARCH=i386
+ )
+ if "%_BUILDARCH%" == "AMD64" (
+ set ARCH=amd64
)
set BUILD_ENVIRONMENT=WDK
)
@@ -25,7 +27,9 @@
mkdir host-tools
)
cd host-tools
-del CMakeCache.txt /q
+if EXIST CMakeCache.txt (
+ del CMakeCache.txt /q
+)
set REACTOS_BUILD_TOOLS_DIR=%CD%
if "%BUILD_ENVIRONMENT%" == "MINGW" (
cmake -G "MinGW Makefiles" -DARCH=%ARCH% %ROS_SOURCE_DIR%
@@ -41,7 +45,9 @@
)
cd reactos
-del CMakeCache.txt /q
+if EXIST CMakeCache.txt (
+ del CMakeCache.txt /q
+)
if "%BUILD_ENVIRONMENT%" == "MINGW" (
cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake
-DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%"
%ROS_SOURCE_DIR%
)
Modified: branches/cmake-bringup/dll/directx/quartz/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/directx/quart…
==============================================================================
--- branches/cmake-bringup/dll/directx/quartz/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/directx/quartz/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -14,7 +14,7 @@
spec2def(quartz.dll quartz.spec)
-rpcproxy(quartz quartz_strmif.idl)
+add_rpcproxy_library(quartzproxy quartz_strmif.idl)
list(APPEND SOURCE
avidec.c
@@ -49,6 +49,7 @@
set_module_type(quartz win32dll)
target_link_libraries(quartz
+ quartzproxy
strmiids
uuid
wine
Modified: branches/cmake-bringup/dll/win32/actxprxy/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/actxprx…
==============================================================================
--- branches/cmake-bringup/dll/win32/actxprxy/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/actxprxy/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -4,7 +4,7 @@
spec2def(actxprxy.dll actxprxy.spec)
-rpcproxy(actxprxy
+add_rpcproxy_library(actxprxylib
actxprxy_activscp.idl
actxprxy_comcat.idl
actxprxy_docobj.idl
@@ -25,6 +25,7 @@
set_entrypoint(actxprxy 0)
target_link_libraries(actxprxy
+ actxprxylib
uuid
wine
${PSEH_LIB})
Modified: branches/cmake-bringup/dll/win32/advapi32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/advapi3…
==============================================================================
--- branches/cmake-bringup/dll/win32/advapi32/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/advapi32/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -52,9 +52,9 @@
set_module_type(advapi32 win32dll)
target_link_libraries(advapi32
- svcctl_client
- lsa_client
- eventlogrpc_client
+ svcctlrpc
+ lsarpc
+ eventlogrpc
wine
${PSEH_LIB})
Modified: branches/cmake-bringup/dll/win32/atl/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/atl/CMa…
==============================================================================
--- branches/cmake-bringup/dll/win32/atl/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/atl/CMakeLists.txt [iso-8859-1] Mon Jan 24 18:13:40
2011
@@ -6,7 +6,7 @@
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-add_interface_definitions(atl_atliface_header atliface.idl)
+add_idl_headers(atl_atliface_header atliface.idl)
set_rc_compiler()
spec2def(atl.dll atl.spec)
Modified: branches/cmake-bringup/dll/win32/lsasrv/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/lsasrv/…
==============================================================================
--- branches/cmake-bringup/dll/win32/lsasrv/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/lsasrv/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -23,7 +23,7 @@
set_entrypoint(lsasrv 0)
target_link_libraries(lsasrv
- lsa_server
+ lsarpc
wine
${PSEH_LIB})
Modified: branches/cmake-bringup/dll/win32/mshtml/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/mshtml/…
==============================================================================
--- branches/cmake-bringup/dll/win32/mshtml/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/mshtml/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -9,7 +9,7 @@
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-add_interface_definitions(mshtml_nsiface_header nsiface.idl)
+add_idl_Headers(mshtml_nsiface_header nsiface.idl)
set_rc_compiler()
Modified: branches/cmake-bringup/dll/win32/msi/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/msi/CMa…
==============================================================================
--- branches/cmake-bringup/dll/win32/msi/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/msi/CMakeLists.txt [iso-8859-1] Mon Jan 24 18:13:40
2011
@@ -7,7 +7,7 @@
spec2def(msi.dll msi.spec)
-add_idl_interface(msiserver.idl)
+generate_idl_iids(msiserver.idl)
list(APPEND SOURCE
action.c
@@ -60,7 +60,7 @@
add_library(msi SHARED ${SOURCE})
-add_interface_definitions(msi_idlheader msiserver.idl)
+add_idl_Headers(msi_idlheader msiserver.idl)
add_typelib(msi_tlb msiserver.idl)
Modified: branches/cmake-bringup/dll/win32/mstask/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/mstask/…
==============================================================================
--- branches/cmake-bringup/dll/win32/mstask/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/mstask/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -9,7 +9,7 @@
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-add_idl_interface(mstask_local.idl)
+generate_idl_iids(mstask_local.idl)
spec2def(mstask.dll mstask.spec)
Modified: branches/cmake-bringup/dll/win32/ole32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/ole32/C…
==============================================================================
--- branches/cmake-bringup/dll/win32/ole32/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/ole32/CMakeLists.txt [iso-8859-1] Mon Jan 24 18:13:40
2011
@@ -54,9 +54,9 @@
${CMAKE_CURRENT_BINARY_DIR}
${REACTOS_SOURCE_DIR}/include/reactos/wine)
-add_interface_definitions(ole32idl dcom.idl irot.idl)
+add_idl_headers(ole32idl dcom.idl irot.idl)
-rpcproxy(ole32
+add_rpcproxy_library(ole32proxy
dcom.idl
ole32_unknwn.idl
ole32_objidl.idl
@@ -69,8 +69,9 @@
set_module_type(ole32 win32dll)
target_link_libraries(ole32
+ ole32proxy
wine
- irot_client
+ irotrpc
uuid
${PSEH_LIB})
Modified: branches/cmake-bringup/dll/win32/oleaut32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/oleaut3…
==============================================================================
--- branches/cmake-bringup/dll/win32/oleaut32/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/oleaut32/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -46,13 +46,14 @@
spec2def(oleaut32.dll oleaut32.spec)
-rpcproxy(oleaut32 oleaut32_oaidl.idl oleaut32_ocidl.idl)
+add_rpcproxy_library(oleaut32proxy oleaut32_oaidl.idl oleaut32_ocidl.idl)
add_library(oleaut32 SHARED ${SOURCE})
set_module_type(oleaut32 win32dll)
target_link_libraries(oleaut32
+ oleaut32proxy
wine
wineldr
uuid
Modified: branches/cmake-bringup/dll/win32/qmgr/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/qmgr/CM…
==============================================================================
--- branches/cmake-bringup/dll/win32/qmgr/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/qmgr/CMakeLists.txt [iso-8859-1] Mon Jan 24 18:13:40
2011
@@ -2,7 +2,7 @@
add_definitions(-D__WINESRC__)
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-add_idl_interface(qmgr_local.idl)
+generate_idl_iids(qmgr_local.idl)
spec2def(qmgr.dll qmgr.spec)
@@ -21,7 +21,7 @@
add_library(qmgr SHARED ${SOURCE})
-add_interface_definitions(qmgr_idlheader qmgr_local.idl)
+add_idl_headers(qmgr_idlheader qmgr_local.idl)
set_module_type(qmgr win32dll)
target_link_libraries(qmgr uuid wine)
Modified: branches/cmake-bringup/dll/win32/qmgrprxy/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/qmgrprx…
==============================================================================
--- branches/cmake-bringup/dll/win32/qmgrprxy/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/qmgrprxy/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -5,7 +5,7 @@
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-add_idl_interface(qmgrprxy.idl)
+generate_idl_iids(qmgrprxy.idl)
spec2def(qmgrprxy.dll qmgrprxy.spec)
@@ -14,11 +14,11 @@
${CMAKE_CURRENT_BINARY_DIR}/qmgrprxy_i.c
${CMAKE_CURRENT_BINARY_DIR}/qmgrprxy.def)
-rpcproxy(qmgrprxy qmgrprxy.idl)
+add_rpcproxy_library(qmgrprxylib qmgrprxy.idl)
add_library(qmgrprxy SHARED ${SOURCE})
set_module_type(qmgrprxy win32dll)
-target_link_libraries(qmgrprxy ${PSEH_LIB} wine)
+target_link_libraries(qmgrprxy qmgrprxylib ${PSEH_LIB} wine)
add_importlibs(qmgrprxy rpcrt4 msvcrt kernel32 ntdll)
add_cab_target(qmgrprxy 1)
Modified: branches/cmake-bringup/dll/win32/rpcrt4/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/rpcrt4/…
==============================================================================
--- branches/cmake-bringup/dll/win32/rpcrt4/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/rpcrt4/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -43,7 +43,7 @@
target_link_libraries(rpcrt4
wine
uuid
- epm_client
+ epmrpc
${PSEH_LIB})
add_importlibs(rpcrt4 msvcrt user32 advapi32 secur32 iphlpapi ws2_32 kernel32 ntdll)
Modified: branches/cmake-bringup/dll/win32/setupapi/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/setupap…
==============================================================================
--- branches/cmake-bringup/dll/win32/setupapi/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/setupapi/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -40,7 +40,7 @@
set_module_type(setupapi win32dll)
target_link_libraries(setupapi
- pnp_client
+ pnprpc
uuid
wine
${PSEH_LIB})
Modified: branches/cmake-bringup/dll/win32/shell32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/shell32…
==============================================================================
--- branches/cmake-bringup/dll/win32/shell32/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/shell32/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -12,7 +12,7 @@
${REACTOS_SOURCE_DIR}/lib/recyclebin
${REACTOS_SOURCE_DIR})
-add_idl_interface(shobjidl_local.idl)
+generate_idl_iids(shobjidl_local.idl)
spec2def(shell32.dll shell32.spec)
Modified: branches/cmake-bringup/dll/win32/sti/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/sti/CMa…
==============================================================================
--- branches/cmake-bringup/dll/win32/sti/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/sti/CMakeLists.txt [iso-8859-1] Mon Jan 24 18:13:40
2011
@@ -18,13 +18,14 @@
sti_main.c
${CMAKE_CURRENT_BINARY_DIR}/sti.def)
-rpcproxy(sti sti_wia.idl)
+add_rpcproxy_library(stiproxy sti_wia.idl)
add_library(sti SHARED ${SOURCE})
set_entrypoint(sti 0)
target_link_libraries(sti
+ stiproxy
wine
uuid
${PSEH_LIB})
Modified: branches/cmake-bringup/dll/win32/urlmon/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/urlmon/…
==============================================================================
--- branches/cmake-bringup/dll/win32/urlmon/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/urlmon/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -8,7 +8,7 @@
spec2def(urlmon.dll urlmon.spec)
-rpcproxy(urlmon urlmon_urlmon.idl)
+add_rpcproxy_library(urlmonproxy urlmon_urlmon.idl)
list(APPEND SOURCE
bindctx.c
@@ -42,6 +42,7 @@
set_module_type(urlmon win32dll)
target_link_libraries(urlmon
+ urlmonproxy
uuid
wine
${PSEH_LIB})
Modified: branches/cmake-bringup/dll/win32/wlanapi/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/wlanapi…
==============================================================================
--- branches/cmake-bringup/dll/win32/wlanapi/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/wlanapi/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -12,7 +12,7 @@
set_entrypoint(wlanapi 0)
target_link_libraries(wlanapi
- wlansvc_client
+ wlansvcrpc
wine
${PSEH_LIB})
Modified: branches/cmake-bringup/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=504…
==============================================================================
--- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Mon Jan 24 18:13:40 2011
@@ -1,5 +1,3 @@
-
-if(CMAKE_CROSSCOMPILING)
# Linking
if(ARCH MATCHES i386)
@@ -317,5 +315,3 @@
#pseh lib, needed with mingw
set(PSEH_LIB "pseh")
-
-endif(CMAKE_CROSSCOMPILING)
Modified: branches/cmake-bringup/include/dxsdk/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/dxsdk/CMa…
==============================================================================
--- branches/cmake-bringup/include/dxsdk/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/include/dxsdk/CMakeLists.txt [iso-8859-1] Mon Jan 24 18:13:40
2011
@@ -24,4 +24,4 @@
#vmrender.idl
)
-add_interface_definitions(dxsdk ${SOURCE})
+add_idl_headers(dxsdk ${SOURCE})
Modified: branches/cmake-bringup/include/psdk/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/psdk/CMak…
==============================================================================
--- branches/cmake-bringup/include/psdk/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/include/psdk/CMakeLists.txt [iso-8859-1] Mon Jan 24 18:13:40
2011
@@ -92,7 +92,6 @@
urlmon.idl
vmr9.idl
# vmrender.idl
- wbemcli.idl
wia_lh.idl
wia_xp.idl
winsxs.idl
@@ -104,10 +103,11 @@
if(NOT MSVC)
list(APPEND SOURCE
+ wbemcli.idl
wincodec.idl
wuapi.idl)
endif()
-add_interface_definitions(psdk ${SOURCE})
+add_idl_headers(psdk ${SOURCE})
add_typelib(stdole2 stdole2.idl)
Modified: branches/cmake-bringup/include/reactos/idl/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/reactos/i…
==============================================================================
--- branches/cmake-bringup/include/reactos/idl/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/include/reactos/idl/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -1,15 +1,12 @@
include_directories(.)
-list(APPEND SOURCE
- eventlogrpc.idl
- lsa.idl
- svcctl.idl
- wlansvc.idl)
-
-idl_files(${SOURCE})
+add_rpc_library(eventlogrpc eventlogrpc.idl)
+add_rpc_library(lsarpc lsa.idl)
+add_rpc_library(svcctlrpc svcctl.idl)
+add_rpc_library(wlansvcrpc wlansvc.idl)
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
-idl_files(pnp.idl)
+add_rpc_library(pnprpc pnp.idl)
Modified: branches/cmake-bringup/include/reactos/wine/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/reactos/w…
==============================================================================
--- branches/cmake-bringup/include/reactos/wine/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/include/reactos/wine/CMakeLists.txt [iso-8859-1] Mon Jan 24
18:13:40 2011
@@ -1,9 +1,7 @@
-add_interface_definitions(wineheaders itss.idl wined3d.idl)
+add_idl_headers(wineheaders itss.idl wined3d.idl)
+add_idl_headers(winesdk epm.idl irot.idl)
-list(APPEND SOURCE
- epm.idl
- irot.idl)
+add_rpc_library(epmrpc epm.idl)
+add_rpc_library(irotrpc irot.idl)
-idl_files(${SOURCE})
-add_interface_definitions(winesdk ${SOURCE})
Modified: branches/cmake-bringup/lib/rossym/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/CMakeL…
==============================================================================
--- branches/cmake-bringup/lib/rossym/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/rossym/CMakeLists.txt [iso-8859-1] Mon Jan 24 18:13:40
2011
@@ -1,4 +1,5 @@
+if(NOT MSVC)
add_definitions(-D_NTSYSTEM_)
list(APPEND SOURCE
delete.c
@@ -20,3 +21,4 @@
zwfile.c)
add_library(rossym ${SOURCE})
add_dependencies(rossym psdk bugcodes)
+endif()
Modified: branches/cmake-bringup/msc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=504…
==============================================================================
--- branches/cmake-bringup/msc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/msc.cmake [iso-8859-1] Mon Jan 24 18:13:40 2011
@@ -1,11 +1,3 @@
-
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
- add_definitions(-D__i386__)
-endif()
-
-add_definitions(-Dinline=__inline)
-
-if(CMAKE_CROSSCOMPILING)
if(OPTIMIZE STREQUAL "1")
add_definitions(/O1)
@@ -26,6 +18,10 @@
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
+endif()
+
+if(${ARCH} MATCHES amd64)
+ add_definitions(-D__x86_64)
endif()
link_directories("${REACTOS_BINARY_DIR}/importlibs"
${REACTOS_BINARY_DIR}/lib/3rdparty/mingw)
@@ -137,16 +133,6 @@
# dummy, this workaround is only needed in mingw due to lack of RC support in cmake
endmacro()
-#idl files support
-set(IDL_COMPILER midl)
-set(IDL_FLAGS /win32)
-set(IDL_HEADER_ARG /h) #.h
-set(IDL_TYPELIB_ARG /tlb) #.tlb
-set(IDL_SERVER_ARG /sstub) #.c for stub server library
-set(IDL_CLIENT_ARG /cstub) #.c for stub client library
-set(IDL_PROXY_ARG /proxy)
-set(IDL_DLLDATA_ARG /dlldata )
-
# Thanks MS for creating a stupid linker
macro(add_importlib_target _exports_file)
get_filename_component(_name ${_exports_file} NAME_WE)
@@ -154,7 +140,7 @@
# Generate the asm stub file and the export def file
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm
${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def
- COMMAND native-spec2def -@ -r
-d=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def
-l=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm
${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file}
+ COMMAND native-spec2def --kill-at -r
-d=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def
-l=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm
${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file})
# Assemble the stub file
@@ -180,7 +166,7 @@
add_custom_target(
lib${_name}
DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib)
-
+
add_dependencies(lib${_name} asm ${_dependencies})
endmacro()
@@ -195,7 +181,7 @@
get_filename_component(_file ${_spec_file} NAME_WE)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c
- COMMAND native-spec2def -@ -n=${_dllname}
-d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
-s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
+ COMMAND native-spec2def --kill-at -n=${_dllname}
-d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
-s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file})
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c
PROPERTIES GENERATED TRUE)
@@ -222,5 +208,3 @@
#pseh workaround
set(PSEH_LIB "")
-endif(CMAKE_CROSSCOMPILING)
-
Modified: branches/cmake-bringup/toolchain-mingw32.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/toolchain-mingw32…
==============================================================================
--- branches/cmake-bringup/toolchain-mingw32.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/toolchain-mingw32.cmake [iso-8859-1] Mon Jan 24 18:13:40 2011
@@ -34,16 +34,6 @@
set(CMAKE_RC_COMPILER ${MINGW_PREFIX}windres)
set(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc)
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o
<OBJECT> -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm
<FLAGS> <DEFINES> -D__ASM__ -c <SOURCE>")
-set(CMAKE_IDL_COMPILER native-widl)
-
-if(ARCH MATCHES i386)
-set(CMAKE_IDL_COMPILE_OBJECT "<CMAKE_IDL_COMPILER> <FLAGS>
<DEFINES> -m32 --win32 -h -o <OBJECT> <SOURCE>")
-elseif(ARCH MATCHES amd64)
-set(CMAKE_IDL_COMPILE_OBJECT "<CMAKE_IDL_COMPILER> <FLAGS>
<DEFINES> -m64 --win64 -h -o <OBJECT> <SOURCE>")
-elseif(ARCH MATCHES arm)
-set(CMAKE_IDL_COMPILE_OBJECT "<CMAKE_IDL_COMPILER> <FLAGS>
<DEFINES> -h -o <OBJECT> <SOURCE>")
-endif()
-
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -i <SOURCE>
<CMAKE_C_LINK_FLAGS> <DEFINES> -I${REACTOS_SOURCE_DIR}/include/psdk
-I${REACTOS_BINARY_DIR}/include/psdk -I${REACTOS_SOURCE_DIR}/include/
-I${REACTOS_SOURCE_DIR}/include/reactos -I${REACTOS_BINARY_DIR}/include/reactos
-I${REACTOS_SOURCE_DIR}/include/reactos/wine -I${REACTOS_SOURCE_DIR}/include/crt
-I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -O coff -o <OBJECT> ")
# Use stdcall fixups, and don't link with anything by default unless we say so
Modified: branches/cmake-bringup/toolchain-msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/toolchain-msvc.cm…
==============================================================================
--- branches/cmake-bringup/toolchain-msvc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/toolchain-msvc.cmake [iso-8859-1] Mon Jan 24 18:13:40 2011
@@ -6,12 +6,14 @@
# which compilers to use for C and C++
set(CMAKE_C_COMPILER cl)
set(CMAKE_CXX_COMPILER cl)
-SET(CMAKE_RC_COMPILER rc)
-SET(CMAKE_ASM_COMPILER ml)
-SET(CMAKE_IDL_COMPILER midl)
+set(CMAKE_RC_COMPILER rc)
+if(${ARCH} MATCHES amd64)
+ set(CMAKE_ASM_COMPILER ml64)
+else()
+ set(CMAKE_ASM_COMPILER ml)
+endif()
-SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <DEFINES>
/I${REACTOS_SOURCE_DIR}/include/psdk /I${REACTOS_BINARY_DIR}/include/psdk
/I${REACTOS_SOURCE_DIR}/include /I${REACTOS_SOURCE_DIR}/include/reactos
/I${REACTOS_BINARY_DIR}/include/reactos /I${REACTOS_SOURCE_DIR}/include/reactos/wine
/I${REACTOS_SOURCE_DIR}/include/crt /I${REACTOS_SOURCE_DIR}/include/crt/mingw32 /fo
<OBJECT> <SOURCE>")
-SET(CMAKE_IDL_COMPILE_OBJECT "<CMAKE_IDL_COMPILER> <FLAGS>
<DEFINES> /win32 /Dstrict_context_handle= /h <OBJECT> <SOURCE>")
+set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <DEFINES>
/I${REACTOS_SOURCE_DIR}/include/psdk /I${REACTOS_BINARY_DIR}/include/psdk
/I${REACTOS_SOURCE_DIR}/include /I${REACTOS_SOURCE_DIR}/include/reactos
/I${REACTOS_BINARY_DIR}/include/reactos /I${REACTOS_SOURCE_DIR}/include/reactos/wine
/I${REACTOS_SOURCE_DIR}/include/crt /I${REACTOS_SOURCE_DIR}/include/crt/mingw32 /fo
<OBJECT> <SOURCE>")
SET(CMAKE_ASM_COMPILE_OBJECT
"<CMAKE_C_COMPILER> /nologo /X /I${REACTOS_SOURCE_DIR}/include/asm
/I${REACTOS_BINARY_DIR}/include/asm <FLAGS> <DEFINES> /D__ASM__ /D_USE_ML /EP
/c <SOURCE> > <OBJECT>.tmp"
@@ -29,3 +31,7 @@
set(CMAKE_BUILD_TYPE "RelwithDebInfo" CACHE STRING "Build Type")
set(CMAKE_C_STANDARD_LIBRARIES "" CACHE INTERNAL "")
+
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
+ add_definitions(-D__i386__)
+endif()