reactos icon indicating copy to clipboard operation
reactos copied to clipboard

CMake spec2def improve

Open HBelusca opened this issue 4 years ago • 1 comments

Purpose

Do some simple cmake files cleanup, and improve some aspects of spec2def() function.

Proposed changes

Describe what you propose to change/add/fix with this pull request.

  • Some cmake files cleanup:
[CMAKE] Get rid of the macro_mc() macro.

Since COMMAND_MC is the same for both MSVC and GCC, get rid of the
macro_mc() macro and directly use said command in add_message_headers().
[CMAKE] MSVC's "SPEC2DEF_ARCH" == GCC's "ARCH2", so use a common name instead. Simplify its initialization. Move __x86_64 to global CMakeLists.txt.
[CMAKE] Simplify generate_import_lib() code.

- Simplify by storing the implib def file name in a variable, as done in msvc.cmake.
- Remove deprecated STATIC_LIBRARY_FLAGS usage.
  • Improve cmake-file spec2def() function:
[CMAKE] Move spec2def() function common implementation into CMakeMacros.cmake.

The slight different spec2def invocation command definition is stored
in a COMMAND_SPEC2DEF variable, used by both generate_import_lib() and
spec2def() functions.
[CMAKE] Allow the spec2def() function to take a list of .spec files (more than one).

When more than one .spec file are present, they get concatenated
together and the resulting file is passed to spec2def.

HBelusca avatar Dec 05 '21 01:12 HBelusca