Remove boost hash (#59)

* replace MT RNG with PCG

* replace boost hashing with FNV-1a

removes boost as a dependency

* remove boost dependency references

* format

* post rebase fix

---------

Co-authored-by: Demur Rumed <junkmute@hotmail.com>
This commit is contained in:
aMannus
2025-05-07 20:51:57 +02:00
committed by GitHub
parent c94139e0fa
commit 59ce387614
16 changed files with 70 additions and 470 deletions

View File

@@ -274,33 +274,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR})
endif()
################################################################################
# Find/download Boost
################################################################################
include(FetchContent)
FetchContent_Declare(
Boost
URL https://archives.boost.io/release/1.81.0/source/boost_1_81_0.tar.gz
URL_HASH SHA256=205666dea9f6a7cfed87c7a6dfbeb52a2c1b9de55712c9c1a87735d7181452b6
SOURCE_SUBDIR "null" # Set to a nonexistent directory so boost is not built (we don't need to build it)
DOWNLOAD_EXTRACT_TIMESTAMP false # supress timestamp warning, not needed since the url wont change
)
set(Boost_NO_BOOST_CMAKE false)
set(BOOST_INCLUDEDIR ${FETCHCONTENT_BASE_DIR}/boost-src) # Location where FetchContent stores the source
message("Searching for Boost installation")
find_package(Boost)
if (NOT ${Boost_FOUND})
message("Boost not found. Downloading now...")
FetchContent_MakeAvailable(Boost)
message("Boost downloaded to " ${FETCHCONTENT_BASE_DIR}/boost-src)
set(BOOST-INCLUDE ${FETCHCONTENT_BASE_DIR}/boost-src)
else()
message("Boost found in " ${Boost_INCLUDE_DIRS})
set(BOOST-INCLUDE ${Boost_INCLUDE_DIRS})
endif()
################################################################################
# apclientpp + dependencies
################################################################################
@@ -365,7 +338,6 @@ target_include_directories(${PROJECT_NAME} PRIVATE assets
${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPD/resource/type
${SDL2-INCLUDE}
${SDL2-NET-INCLUDE}
${BOOST-INCLUDE}
${CMAKE_CURRENT_SOURCE_DIR}/assets/
.
)