mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[REACTOS]: Do not gather all the generated message resource files in the same directory (sdk/include/reactos/), so that to avoid potential file collisions, but instead place them into their respective per-target directories.
CORE-12062 #resolve [RAPPS_NEW]: Fix rapps_new message header & resource files inclusion. [ROSTESTS]: Adjust the CMakeLists files in accordance. svn path=/trunk/; revision=72846
This commit is contained in:
parent
fb4cb1c8c5
commit
4b67338a7f
11 changed files with 27 additions and 32 deletions
|
@ -235,6 +235,7 @@ else()
|
|||
${REACTOS_BINARY_DIR}/sdk/include/dxsdk
|
||||
${REACTOS_BINARY_DIR}/sdk/include/ddk
|
||||
${REACTOS_BINARY_DIR}/sdk/include/reactos
|
||||
${REACTOS_BINARY_DIR}/sdk/include/reactos/mc
|
||||
sdk/include/crt
|
||||
sdk/include/ddk
|
||||
sdk/include/ndk
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <strsafe.h>
|
||||
#include <ndk/rtlfuncs.h>
|
||||
|
||||
#include <rappsmsg.h>
|
||||
#include <rappsmsg_new.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ HOTKEYS ACCELERATORS
|
|||
|
||||
#include <reactos/manifest_exe.rc>
|
||||
|
||||
#include <rappsmsg.rc>
|
||||
#include <rappsmsg_new.rc>
|
||||
|
||||
/* UTF-8 */
|
||||
#pragma code_page(65001)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
include_directories(${REACTOS_BINARY_DIR}/sdk/include/reactos)
|
||||
add_library(iologmsg SHARED iologmsg.rc)
|
||||
set_module_type(iologmsg module UNICODE)
|
||||
add_dependencies(iologmsg ntiologc)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
include_directories(${REACTOS_BINARY_DIR}/sdk/include/reactos)
|
||||
add_library(netevent SHARED netevt.rc)
|
||||
add_library(netevent SHARED netevent.rc)
|
||||
set_module_type(netevent module UNICODE)
|
||||
add_dependencies(netevent neteventmsg)
|
||||
add_cd_file(TARGET netevent DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -113,23 +113,23 @@ function(add_message_headers _type)
|
|||
else()
|
||||
set(_flag "-A")
|
||||
endif()
|
||||
foreach(_in_FILE ${ARGN})
|
||||
get_filename_component(FILE ${_in_FILE} NAME_WE)
|
||||
set(_converted_item ${REACTOS_BINARY_DIR}/sdk/include/reactos/mc/${FILE}.mc)
|
||||
set(_source_item ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc)
|
||||
foreach(_file ${ARGN})
|
||||
get_filename_component(_file_name ${_file} NAME_WE)
|
||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_file}) ## ${_file_name}.mc
|
||||
set(_source_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file}) ## ${_file_name}.mc
|
||||
add_custom_command(
|
||||
OUTPUT "${_converted_item}"
|
||||
COMMAND native-utf16le "${_source_item}" "${_converted_item}" "nobom"
|
||||
DEPENDS native-utf16le "${_source_item}")
|
||||
macro_mc(${_flag} ${FILE})
|
||||
OUTPUT "${_converted_file}"
|
||||
COMMAND native-utf16le "${_source_file}" "${_converted_file}" nobom
|
||||
DEPENDS native-utf16le "${_source_file}")
|
||||
macro_mc(${_flag} ${_converted_file})
|
||||
add_custom_command(
|
||||
OUTPUT ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.rc ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.h
|
||||
COMMAND ${COMMAND_MC} ${MC_FLAGS}
|
||||
DEPENDS "${_converted_item}")
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.h ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.rc
|
||||
COMMAND ${COMMAND_MC}
|
||||
DEPENDS "${_converted_file}")
|
||||
set_source_files_properties(
|
||||
${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.rc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.h ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.rc
|
||||
PROPERTIES GENERATED TRUE)
|
||||
add_custom_target(${FILE} ALL DEPENDS ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.rc)
|
||||
add_custom_target(${_file_name} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.h ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.rc)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
|
|
|
@ -379,7 +379,7 @@ function(spec2def _dllname _spec_file)
|
|||
endfunction()
|
||||
|
||||
macro(macro_mc FLAG FILE)
|
||||
set(COMMAND_MC ${CMAKE_MC_COMPILER} -u ${FLAG} -b ${REACTOS_BINARY_DIR}/sdk/include/reactos/mc/${FILE}.mc -r ${REACTOS_BINARY_DIR}/sdk/include/reactos -h ${REACTOS_BINARY_DIR}/sdk/include/reactos)
|
||||
set(COMMAND_MC ${CMAKE_MC_COMPILER} -u ${FLAG} -b -h ${CMAKE_CURRENT_BINARY_DIR}/ -r ${CMAKE_CURRENT_BINARY_DIR}/ ${FILE})
|
||||
endmacro()
|
||||
|
||||
# PSEH lib, needed with mingw
|
||||
|
|
|
@ -374,7 +374,7 @@ function(spec2def _dllname _spec_file)
|
|||
endfunction()
|
||||
|
||||
macro(macro_mc FLAG FILE)
|
||||
set(COMMAND_MC ${CMAKE_MC_COMPILER} ${FLAG} -b ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc -r ${REACTOS_BINARY_DIR}/sdk/include/reactos -h ${REACTOS_BINARY_DIR}/sdk/include/reactos)
|
||||
set(COMMAND_MC ${CMAKE_MC_COMPILER} -u ${FLAG} -b -h ${CMAKE_CURRENT_BINARY_DIR}/ -r ${CMAKE_CURRENT_BINARY_DIR}/ ${FILE})
|
||||
endmacro()
|
||||
|
||||
# PSEH workaround
|
||||
|
|
|
@ -22,7 +22,7 @@ list(APPEND SOURCE
|
|||
tools.cpp
|
||||
precomp.h)
|
||||
|
||||
add_executable(rosautotest ${SOURCE} ${REACTOS_BINARY_DIR}/sdk/include/reactos/rosautotestmsg.rc)
|
||||
add_executable(rosautotest ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/rosautotestmsg.rc)
|
||||
set_module_type(rosautotest win32cui UNICODE)
|
||||
add_importlibs(rosautotest advapi32 shell32 user32 wininet msvcrt kernel32 ntdll)
|
||||
add_pch(rosautotest precomp.h SOURCE)
|
||||
|
|
|
@ -3,19 +3,15 @@
|
|||
## rc /fo $(IntDir)MyEventProvider.res MyEventProvider.rc
|
||||
## link /dll /noentry /SUBSYSTEM:CONSOLE",5.0" /out:$(SolutionDir)$(Configuration)\MyEventProvider.dll $(IntDir)MyEventProvider.res
|
||||
|
||||
## add_message_headers(UNICODE MyEventProvider.mc)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/MyEventProvider.rc ${CMAKE_CURRENT_BINARY_DIR}/MyEventProvider.h
|
||||
COMMAND ${CMAKE_MC_COMPILER} -U ${CMAKE_CURRENT_SOURCE_DIR}/MyEventProvider.mc -r ${CMAKE_CURRENT_BINARY_DIR}/
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/MyEventProvider.mc)
|
||||
|
||||
add_library(MyEventProvider SHARED ${CMAKE_CURRENT_BINARY_DIR}/MyEventProvider.rc)
|
||||
set_module_type(MyEventProvider module UNICODE)
|
||||
add_cd_file(TARGET MyEventProvider DESTINATION reactos/bin FOR all)
|
||||
add_message_headers(UNICODE MyEventProvider.mc)
|
||||
add_library(MyEventProvider_dll SHARED ${CMAKE_CURRENT_BINARY_DIR}/MyEventProvider.rc)
|
||||
add_dependencies(MyEventProvider_dll MyEventProvider)
|
||||
set_module_type(MyEventProvider_dll module UNICODE)
|
||||
set_target_properties(MyEventProvider_dll PROPERTIES OUTPUT_NAME "MyEventProvider")
|
||||
add_cd_file(TARGET MyEventProvider_dll DESTINATION reactos/bin FOR all)
|
||||
|
||||
add_executable(evtlogtest EvtLogTest.c)
|
||||
add_dependencies(evtlogtest MyEventProvider)
|
||||
set_module_type(evtlogtest win32cui UNICODE)
|
||||
add_dependencies(evtlogtest MyEventProvider MyEventProvider_dll)
|
||||
add_importlibs(evtlogtest advapi32 msvcrt kernel32)
|
||||
add_cd_file(TARGET evtlogtest DESTINATION reactos/bin FOR all)
|
||||
|
|
Loading…
Reference in a new issue