r5sdk/r5dev/mathlib/CMakeLists.txt
Kawe Mazidjatari 8dbc2024c6 CMake code improvements
Use the 'add_module' macro to add modules without creating duplicate code. This macro also takes a reuse PCH as parameter, so modules that need a precompiled header, could reuse those from different targets that compile them. This commit also restructures the group order of the generated solution files for easier code navigation.
2023-05-13 00:14:53 +02:00

64 lines
1.1 KiB
CMake

cmake_minimum_required( VERSION 3.16 )
add_module( "lib" "mathlib" "" ${FOLDER_CONTEXT} )
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"
"fbits.cpp"
"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()
# Setup precompiled header
target_precompile_headers( ${PROJECT_NAME} PRIVATE mathlib_pch.h )
target_compile_definitions( ${PROJECT_NAME} PRIVATE -DBUILDING_MATHLIB )