From 244c76250f1f88e9a4ada14a4671a1770d938d5a Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Sat, 24 Oct 2020 20:52:54 +0300 Subject: [PATCH 1/4] Use SSE3 in 32-bit x86 binaries --- src/CMakeLists.txt | 1 + src/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3409c49d3..3514fb477 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -549,6 +549,7 @@ if(${SRB2_CONFIG_USEASM}) endif() set(SRB2_USEASM ON) add_definitions(-DUSEASM) + set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -msse3 -mfpmath=sse) else() set(SRB2_USEASM OFF) add_definitions(-DNONX86 -DNORUSEASM) diff --git a/src/Makefile b/src/Makefile index 2fe0b26cd..5d5db056f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -277,7 +277,7 @@ OPTS += -DCOMPVERSION ifndef NONX86 ifndef GCC29 - ARCHOPTS?=-march=pentium + ARCHOPTS?=-msse3 -mfpmath=sse else ARCHOPTS?=-mpentium endif From d406340b5dd4f2768354aa2833fa613b426c281e Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Fri, 30 Oct 2020 23:37:34 -0400 Subject: [PATCH 2/4] Fix compiling using cmake if internal libs is used --- src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3409c49d3..4ee586f36 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -230,7 +230,7 @@ set(SRB2_CONFIG_HAVE_GME ON CACHE BOOL set(SRB2_CONFIG_HAVE_OPENMPT ON CACHE BOOL "Enable OpenMPT support.") set(SRB2_CONFIG_HAVE_CURL ON CACHE BOOL - "Enable curl support, used for downloading files via HTTP.") + "Enable curl support.") set(SRB2_CONFIG_HAVE_THREADS ON CACHE BOOL "Enable multithreading support.") if(${CMAKE_SYSTEM} MATCHES Windows) @@ -455,7 +455,7 @@ endif() if(${SRB2_CONFIG_HAVE_CURL}) if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES}) set(CURL_FOUND ON) - set(CURL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/libs/curl) + set(CURL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/libs/curl/include) if(${SRB2_SYSTEM_BITS} EQUAL 64) set(CURL_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/curl/lib64 -lcurl") else() # 32-bit From 62b5b86ed449f88659f45424f82f7b158611ae02 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Sat, 31 Oct 2020 00:59:51 -0400 Subject: [PATCH 3/4] CMake: Fix fullscreen toggle not working All because of a typo --- src/sdl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index bb5edf817..a7f015c86 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -272,7 +272,7 @@ if(${SDL2_FOUND}) endif() target_compile_definitions(SRB2SDL2 PRIVATE - -DDDIRECTFULLSCREEN -DHAVE_SDL + -DDIRECTFULLSCREEN -DHAVE_SDL ) ## strip debug symbols into separate file when using gcc. From 54cc9db7a5de4bda6b0b01883009b8340e8f2d92 Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Sat, 31 Oct 2020 18:04:44 +0200 Subject: [PATCH 4/4] Fix CMake SSE3 flag --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3514fb477..f201e43ea 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -549,7 +549,7 @@ if(${SRB2_CONFIG_USEASM}) endif() set(SRB2_USEASM ON) add_definitions(-DUSEASM) - set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -msse3 -mfpmath=sse) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3 -mfpmath=sse") else() set(SRB2_USEASM OFF) add_definitions(-DNONX86 -DNORUSEASM)