1 set(ASM_DIALECT "_YASM")
2 set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
5 list(APPEND ASM_FLAGS -DARCH_X86_64=1)
7 list(APPEND ASM_FLAGS -DPIC)
10 set(ARGS -f macho64 -m amd64 -DPREFIX)
11 elseif(UNIX AND NOT CYGWIN)
12 set(ARGS -f elf64 -m amd64)
14 set(ARGS -f win64 -m amd64)
17 list(APPEND ASM_FLAGS -DARCH_X86_64=0)
19 set(ARGS -f macho -DPREFIX)
20 elseif(UNIX AND NOT CYGWIN)
23 set(ARGS -f win32 -DPREFIX)
28 list(APPEND ASM_FLAGS -DHAVE_ALIGNED_STACK=1)
30 list(APPEND ASM_FLAGS -DHAVE_ALIGNED_STACK=0)
34 list(APPEND ASM_FLAGS -DHIGH_BIT_DEPTH=1 -DBIT_DEPTH=10)
36 list(APPEND ASM_FLAGS -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8)
38 set(YASM_FLAGS ${ARGS} ${ASM_FLAGS} PARENT_SCOPE)
39 string(REPLACE ";" " " CMAKE_ASM_YASM_COMPILER_ARG1 "${ARGS}")
41 # This section exists to override the one in CMakeASMInformation.cmake
42 # (the default Information file). This removes the <FLAGS>
43 # thing so that your C compiler flags that have been set via
44 # set_target_properties don't get passed to yasm and confuse it.
45 if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
46 string(REPLACE ";" " " STR_ASM_FLAGS "${ASM_FLAGS}")
47 set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> ${STR_ASM_FLAGS} -o <OBJECT> <SOURCE>")
50 include(CMakeASMInformation)