r5sdk/r5dev/mathlib/CMakeLists.txt
Kawe Mazidjatari 0de507713b Make fbits inline, and add PopCount
Floating point bitwise functions are now inline, also implemented a 'PopCount' function, which replicates the '__popcnt' instruction, but does not require the CPU to feature the instruction. This was mainly added as the SDK launcher doesn't check the CPU for SSSe3/popcnt, as it doesn't involve any instruction sets past SSE2.
2023-07-13 00:06:56 +02:00

69 lines
1.2 KiB
CMake

cmake_minimum_required( VERSION 3.16 )
add_module( "lib" "mathlib" "" ${FOLDER_CONTEXT} TRUE TRUE )
start_sources()
add_sources( SOURCE_GROUP "Hash"
"adler32.cpp"
"adler32.h"
"crc32.cpp"
"crc32.h"
"IceKey.cpp"
"IceKey.H"
"sha1.cpp"
"sha1.h"
"sha256.cpp"
"sha256.h"
)
add_sources( SOURCE_GROUP "RNG"
"halton.cpp"
"halton.h"
"randsse.cpp"
"ssenoise.cpp"
)
add_sources( SOURCE_GROUP "Vector"
"bitvec.h"
"color.h"
"color_conversion.cpp"
"compressed_vector.h"
"fltx4.h"
"ssemath.h"
"ssequaternion.h"
"transform.cpp"
"transform.h"
"vector.h"
"vector2d.h"
"vector4d.h"
"vmatrix.cpp"
"vmatrix.h"
"vplane.h"
)
add_sources( SOURCE_GROUP "Math"
"almostequal.cpp"
"bits.h"
"fbits.h"
"math_pfns.h"
"mathlib.h"
"mathlib_base.cpp"
"noisedata.h"
"parallel_for.h"
"powsse.cpp"
"sseconst.cpp"
"ssemath.h"
"swap.h"
)
end_sources()
whole_program_optimization()
target_precompile_headers( ${PROJECT_NAME} PRIVATE
"mathlib_pch.h"
)
target_compile_definitions( ${PROJECT_NAME} PRIVATE
"BUILDING_MATHLIB"
$<$<OR:$<CONFIG:Debug>,$<CONFIG:Profile>>:DEBUG_MATHLIB>
)