mirror of
https://github.com/reactos/reactos.git
synced 2025-06-06 01:40:36 +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/dxsdk
|
||||||
${REACTOS_BINARY_DIR}/sdk/include/ddk
|
${REACTOS_BINARY_DIR}/sdk/include/ddk
|
||||||
${REACTOS_BINARY_DIR}/sdk/include/reactos
|
${REACTOS_BINARY_DIR}/sdk/include/reactos
|
||||||
|
${REACTOS_BINARY_DIR}/sdk/include/reactos/mc
|
||||||
sdk/include/crt
|
sdk/include/crt
|
||||||
sdk/include/ddk
|
sdk/include/ddk
|
||||||
sdk/include/ndk
|
sdk/include/ndk
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <strsafe.h>
|
#include <strsafe.h>
|
||||||
#include <ndk/rtlfuncs.h>
|
#include <ndk/rtlfuncs.h>
|
||||||
|
|
||||||
#include <rappsmsg.h>
|
#include <rappsmsg_new.h>
|
||||||
|
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ HOTKEYS ACCELERATORS
|
||||||
|
|
||||||
#include <reactos/manifest_exe.rc>
|
#include <reactos/manifest_exe.rc>
|
||||||
|
|
||||||
#include <rappsmsg.rc>
|
#include <rappsmsg_new.rc>
|
||||||
|
|
||||||
/* UTF-8 */
|
/* UTF-8 */
|
||||||
#pragma code_page(65001)
|
#pragma code_page(65001)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
|
|
||||||
include_directories(${REACTOS_BINARY_DIR}/sdk/include/reactos)
|
|
||||||
add_library(iologmsg SHARED iologmsg.rc)
|
add_library(iologmsg SHARED iologmsg.rc)
|
||||||
set_module_type(iologmsg module UNICODE)
|
set_module_type(iologmsg module UNICODE)
|
||||||
add_dependencies(iologmsg ntiologc)
|
add_dependencies(iologmsg ntiologc)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
include_directories(${REACTOS_BINARY_DIR}/sdk/include/reactos)
|
add_library(netevent SHARED netevent.rc)
|
||||||
add_library(netevent SHARED netevt.rc)
|
|
||||||
set_module_type(netevent module UNICODE)
|
set_module_type(netevent module UNICODE)
|
||||||
add_dependencies(netevent neteventmsg)
|
add_dependencies(netevent neteventmsg)
|
||||||
add_cd_file(TARGET netevent DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET netevent DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -113,23 +113,23 @@ function(add_message_headers _type)
|
||||||
else()
|
else()
|
||||||
set(_flag "-A")
|
set(_flag "-A")
|
||||||
endif()
|
endif()
|
||||||
foreach(_in_FILE ${ARGN})
|
foreach(_file ${ARGN})
|
||||||
get_filename_component(FILE ${_in_FILE} NAME_WE)
|
get_filename_component(_file_name ${_file} NAME_WE)
|
||||||
set(_converted_item ${REACTOS_BINARY_DIR}/sdk/include/reactos/mc/${FILE}.mc)
|
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_file}) ## ${_file_name}.mc
|
||||||
set(_source_item ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc)
|
set(_source_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file}) ## ${_file_name}.mc
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${_converted_item}"
|
OUTPUT "${_converted_file}"
|
||||||
COMMAND native-utf16le "${_source_item}" "${_converted_item}" "nobom"
|
COMMAND native-utf16le "${_source_file}" "${_converted_file}" nobom
|
||||||
DEPENDS native-utf16le "${_source_item}")
|
DEPENDS native-utf16le "${_source_file}")
|
||||||
macro_mc(${_flag} ${FILE})
|
macro_mc(${_flag} ${_converted_file})
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.rc ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.h
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.h ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.rc
|
||||||
COMMAND ${COMMAND_MC} ${MC_FLAGS}
|
COMMAND ${COMMAND_MC}
|
||||||
DEPENDS "${_converted_item}")
|
DEPENDS "${_converted_file}")
|
||||||
set_source_files_properties(
|
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)
|
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()
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|
|
@ -379,7 +379,7 @@ function(spec2def _dllname _spec_file)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
macro(macro_mc FLAG FILE)
|
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()
|
endmacro()
|
||||||
|
|
||||||
# PSEH lib, needed with mingw
|
# PSEH lib, needed with mingw
|
||||||
|
|
|
@ -374,7 +374,7 @@ function(spec2def _dllname _spec_file)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
macro(macro_mc FLAG FILE)
|
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()
|
endmacro()
|
||||||
|
|
||||||
# PSEH workaround
|
# PSEH workaround
|
||||||
|
|
|
@ -22,7 +22,7 @@ list(APPEND SOURCE
|
||||||
tools.cpp
|
tools.cpp
|
||||||
precomp.h)
|
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)
|
set_module_type(rosautotest win32cui UNICODE)
|
||||||
add_importlibs(rosautotest advapi32 shell32 user32 wininet msvcrt kernel32 ntdll)
|
add_importlibs(rosautotest advapi32 shell32 user32 wininet msvcrt kernel32 ntdll)
|
||||||
add_pch(rosautotest precomp.h SOURCE)
|
add_pch(rosautotest precomp.h SOURCE)
|
||||||
|
|
|
@ -3,19 +3,15 @@
|
||||||
## rc /fo $(IntDir)MyEventProvider.res MyEventProvider.rc
|
## rc /fo $(IntDir)MyEventProvider.res MyEventProvider.rc
|
||||||
## link /dll /noentry /SUBSYSTEM:CONSOLE",5.0" /out:$(SolutionDir)$(Configuration)\MyEventProvider.dll $(IntDir)MyEventProvider.res
|
## link /dll /noentry /SUBSYSTEM:CONSOLE",5.0" /out:$(SolutionDir)$(Configuration)\MyEventProvider.dll $(IntDir)MyEventProvider.res
|
||||||
|
|
||||||
## add_message_headers(UNICODE MyEventProvider.mc)
|
add_message_headers(UNICODE MyEventProvider.mc)
|
||||||
|
add_library(MyEventProvider_dll SHARED ${CMAKE_CURRENT_BINARY_DIR}/MyEventProvider.rc)
|
||||||
add_custom_command(
|
add_dependencies(MyEventProvider_dll MyEventProvider)
|
||||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/MyEventProvider.rc ${CMAKE_CURRENT_BINARY_DIR}/MyEventProvider.h
|
set_module_type(MyEventProvider_dll module UNICODE)
|
||||||
COMMAND ${CMAKE_MC_COMPILER} -U ${CMAKE_CURRENT_SOURCE_DIR}/MyEventProvider.mc -r ${CMAKE_CURRENT_BINARY_DIR}/
|
set_target_properties(MyEventProvider_dll PROPERTIES OUTPUT_NAME "MyEventProvider")
|
||||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/MyEventProvider.mc)
|
add_cd_file(TARGET MyEventProvider_dll DESTINATION reactos/bin FOR all)
|
||||||
|
|
||||||
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_executable(evtlogtest EvtLogTest.c)
|
add_executable(evtlogtest EvtLogTest.c)
|
||||||
add_dependencies(evtlogtest MyEventProvider)
|
|
||||||
set_module_type(evtlogtest win32cui UNICODE)
|
set_module_type(evtlogtest win32cui UNICODE)
|
||||||
|
add_dependencies(evtlogtest MyEventProvider MyEventProvider_dll)
|
||||||
add_importlibs(evtlogtest advapi32 msvcrt kernel32)
|
add_importlibs(evtlogtest advapi32 msvcrt kernel32)
|
||||||
add_cd_file(TARGET evtlogtest DESTINATION reactos/bin FOR all)
|
add_cd_file(TARGET evtlogtest DESTINATION reactos/bin FOR all)
|
||||||
|
|
Loading…
Reference in a new issue