Explicitly set the source language for the mdZ80 and starscream asm files.
authorDavid Korth <gerbilsoft@gerbilsoft.com>
Wed, 2 Sep 2015 05:00:47 +0000 (01:00 -0400)
committerDavid Korth <gerbilsoft@gerbilsoft.com>
Wed, 2 Sep 2015 05:00:47 +0000 (01:00 -0400)
CMake assumed these were nasm, but due to the issues with the
zlib assembler files, we might as well explicitly specify that
these are, in fact, nasm files.

Prefixed the mdZ80 SRCS variable name with "mdZ80_" instead of
just using "SRCS".

src/libgens/mdZ80/CMakeLists.txt
src/libgens/starscream/CMakeLists.txt

index 3e543e9..cb5f064 100644 (file)
@@ -4,14 +4,22 @@ PROJECT(mdZ80)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.4)
 
 # Sources.
-SET(SRCS
-       mdZ80_x86.asm
+SET(mdZ80_SRCS
        mdZ80.c
        mdZ80_reg.c
        mdZ80_DAA.c
        mdZ80_INC_DEC.c
        )
 
+# i386 assembler sources.
+SET(mdZ80_ASM_NASM_SRCS
+       mdZ80_x86.asm
+       )
+
+# Explicitly specify ASM_NASM as the source language.
+SET_SOURCE_FILES_PROPERTIES(${mdZ80_ASM_NASM_SRCS}
+       PROPERTIES LANGUAGE ASM_NASM)
+
 ######################
 # Build the library. #
 ######################
@@ -32,4 +40,7 @@ IF(MSVC)
 ENDIF(MSVC)
 
 ENABLE_LANGUAGE(ASM_NASM)
-ADD_LIBRARY(mdZ80 STATIC ${SRCS})
+ADD_LIBRARY(mdZ80 STATIC
+       ${mdZ80_SRCS}
+       ${mdZ80_ASM_NASM_SRCS}
+       )
index bffb5b7..39a39b3 100644 (file)
@@ -40,12 +40,21 @@ ADD_CUSTOM_COMMAND(
        DEPENDS star_s68k
        )
 
-# Starscream library.
-ENABLE_LANGUAGE(ASM_NASM)
-ADD_LIBRARY(starscream STATIC
+# i386 assembler sources.
+SET(starscream_ASM_NASM_SRCS
        ${CMAKE_CURRENT_BINARY_DIR}/main68k.asm
        ${CMAKE_CURRENT_BINARY_DIR}/sub68k.asm
        asm-wrapper.asm
+       )
+
+# Explicitly specify ASM_NASM as the source language.
+SET_SOURCE_FILES_PROPERTIES(${starscream_ASM_NASM_SRCS}
+       PROPERTIES LANGUAGE ASM_NASM)
+
+# Starscream library.
+ENABLE_LANGUAGE(ASM_NASM)
+ADD_LIBRARY(starscream STATIC
+       ${starscream_ASM_NASM_SRCS}
 
        # Dummy C file to force CMake to handle this as a C library.
        # (CMake's NMake generator can't handle a pure ASM_NASM library.)