Skip to content

Commit

Permalink
Fixed build under aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
Blzut3 committed Jul 8, 2023
1 parent 0775947 commit 2323797
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.3...3.26)
project(Slade3 VERSION 3.2.0)

if(COMMAND cmake_policy)
Expand All @@ -11,7 +11,7 @@ if(COMMAND cmake_policy)
endif(POLICY CMP0072)
endif(COMMAND cmake_policy)

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)

if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
Expand Down
7 changes: 6 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,12 @@ if(APPLE)
endif(APPLE)

# Enable SSE instructions for dumb library
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_USE_SSE -msse")
include(CheckCCompilerFlag)
check_c_compiler_flag(-msse HAVE_SSE)
if(HAVE_SSE)
add_compile_options(-msse)
add_definitions(-D_USE_SSE)
endif()

# Enable debug symbols for glib (so gdb debugging works properly with strings etc.)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG")
Expand Down
4 changes: 2 additions & 2 deletions src/Utility/Colour.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct ColRGBA
if (na < 0)
na = 0;

return { (uint8_t)nr, (uint8_t)ng, (uint8_t)nb, (uint8_t)na, -1 };
return { (uint8_t)nr, (uint8_t)ng, (uint8_t)nb, (uint8_t)na };
}

// Amplify/fade colour components by factors
Expand Down Expand Up @@ -122,7 +122,7 @@ struct ColRGBA
if (na < 0)
na = 0;

return { (uint8_t)nr, (uint8_t)ng, (uint8_t)nb, (uint8_t)na, -1 };
return { (uint8_t)nr, (uint8_t)ng, (uint8_t)nb, (uint8_t)na };
}

void write(uint8_t* ptr) const
Expand Down

0 comments on commit 2323797

Please sign in to comment.