mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
Not default nor even distributed in the .tar.gz, the cmake build allows for loadable yasm plugins by building libyasm as a shared library. Example plugins are in the plugins/ directory, and may be loaded into a cmake-built yasm using the -N command line option (non-cmake builds will not have this option). Tested only on Linux so far, but should be relatively painless to port to Windows thanks to the use of cmake rather than libtool to create shared libraries. The only modification to the main source tree is some conditional-compiled additions to yasm.c. svn path=/trunk/yasm/; revision=2098
27 lines
687 B
CMake
27 lines
687 B
CMake
YASM_GENMACRO(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/objfmts/coff/win64-nasm.mac
|
|
${CMAKE_CURRENT_BINARY_DIR}/win64-nasm.c
|
|
win64_nasm_stdmac
|
|
)
|
|
|
|
YASM_GENMACRO(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/objfmts/coff/win64-gas.mac
|
|
${CMAKE_CURRENT_BINARY_DIR}/win64-gas.c
|
|
win64_gas_stdmac
|
|
)
|
|
|
|
SET(coff_DEPS
|
|
${CMAKE_CURRENT_BINARY_DIR}/win64-nasm.c
|
|
${CMAKE_CURRENT_BINARY_DIR}/win64-gas.c
|
|
)
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(objfmts/coff/coff-objfmt.c PROPERTIES
|
|
OBJECT_DEPENDS "${coff_DEPS}"
|
|
)
|
|
|
|
YASM_ADD_MODULE(objfmt_coff
|
|
objfmts/coff/coff-objfmt.c
|
|
objfmts/coff/win64-except.c
|
|
)
|
|
list(APPEND YASM_MODULES objfmt_win32)
|
|
list(APPEND YASM_MODULES objfmt_win64)
|