From 194ce626e1b29717ef2746448b9bc43a9bf2b85f Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Sun, 1 Feb 2015 19:18:25 -0600 Subject: [PATCH] cmake: Add nasm support Enables ASM-NASM and adds tmap*.nas to sdl target. No idea if this actually works. --- src/CMakeLists.txt | 10 +++++++++- src/sdl/CMakeLists.txt | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b3e01cce..b1e8e6f5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -198,6 +198,13 @@ set(SRB2_R_OPENGL_HEADERS prepend_sources(SRB2_R_OPENGL_SOURCES) prepend_sources(SRB2_R_OPENGL_HEADERS) +set(SRB2_NASM_SOURCES + tamp_mmx.nas + tmap.nas +) + +prepend_sources(SRB2_NASM_SOURCES) + ### Configuration set(SRB2_CONFIG_HAVE_BLUA ON CACHE BOOL "Enable Lua interpreter support") @@ -210,7 +217,7 @@ set(SRB2_CONFIG_HAVE_GME ON CACHE BOOL set(SRB2_CONFIG_HWRENDER ON CACHE BOOL "Enable hardware rendering through OpenGL") set(SRB2_CONFIG_USEASM OFF CACHE BOOL - "Enable nasm-implemented blit functions for moderate speedup") + "Enable NASM tmap implementation for software mode speedup.") set(SRB2_CONFIG_STATIC_OPENGL OFF CACHE BOOL "Use statically linked OpenGL. NOT RECOMMENDED.") @@ -341,6 +348,7 @@ if(${SRB2_CONFIG_HWRENDER} AND ${SRB2_CONFIG_STATIC_OPENGL}) endif() if(${SRB2_CONFIG_USEASM}) + enable_language(ASM-NASM) set(SRB2_USEASM ON) add_definitions(-DUSEASM) else() diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 383e5025..7df73acf 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -71,6 +71,12 @@ if(${SDL2_FOUND}) ) endif() + if(${SRB2_USEASM}) + set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} + ${SRB2_NASM_SOURCES} + ) + endif() + if(${CMAKE_SYSTEM} MATCHES Windows) set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} ${CMAKE_SOURCE_DIR}/src/win32/win_dbg.c