r5sdk/r5dev/tier1/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

59 lines
1.9 KiB
CMake

cmake_minimum_required( VERSION 3.16 )
add_module( "lib" "tier1" "tier0" ${FOLDER_CONTEXT} )
start_sources()
add_sources( SOURCE_GROUP "Network"
"NetAdr.cpp"
"NetKey.cpp"
)
add_sources( SOURCE_GROUP "Utility"
"bitbuf.cpp"
"generichash.cpp"
"lzss.cpp"
"splitstring.cpp"
"stringpool.cpp"
"strtools.cpp"
"utlbuffer.cpp"
"utlstring.cpp"
"characterset.cpp"
)
add_sources( SOURCE_GROUP "Private"
"cmd.cpp"
"cvar.cpp"
)
add_sources( SOURCE_GROUP "Public"
"${ENGINE_SOURCE_DIR}/public/tier1/bitbuf.h"
"${ENGINE_SOURCE_DIR}/public/tier1/byteswap.h"
"${ENGINE_SOURCE_DIR}/public/tier1/characterset.h"
"${ENGINE_SOURCE_DIR}/public/tier1/cmd.h"
"${ENGINE_SOURCE_DIR}/public/tier1/cvar.h"
"${ENGINE_SOURCE_DIR}/public/tier1/generichash.h"
"${ENGINE_SOURCE_DIR}/public/tier1/lzss.h"
"${ENGINE_SOURCE_DIR}/public/tier1/mempool.h"
"${ENGINE_SOURCE_DIR}/public/tier1/memstack.h"
"${ENGINE_SOURCE_DIR}/public/tier1/NetAdr.h"
"${ENGINE_SOURCE_DIR}/public/tier1/NetKey.h"
"${ENGINE_SOURCE_DIR}/public/tier1/stringpool.h"
"${ENGINE_SOURCE_DIR}/public/tier1/strtools.h"
"${ENGINE_SOURCE_DIR}/public/tier1/utlblockmemory.h"
"${ENGINE_SOURCE_DIR}/public/tier1/utlbuffer.h"
"${ENGINE_SOURCE_DIR}/public/tier1/utldict.h"
"${ENGINE_SOURCE_DIR}/public/tier1/utlfixedmemory.h"
"${ENGINE_SOURCE_DIR}/public/tier1/utllinkedlist.h"
"${ENGINE_SOURCE_DIR}/public/tier1/utlmap.h"
"${ENGINE_SOURCE_DIR}/public/tier1/utlmemory.h"
"${ENGINE_SOURCE_DIR}/public/tier1/utlrbtree.h"
"${ENGINE_SOURCE_DIR}/public/tier1/utlstring.h"
"${ENGINE_SOURCE_DIR}/public/tier1/utlsymbol.h"
"${ENGINE_SOURCE_DIR}/public/tier1/utlvector.h"
)
end_sources()
target_compile_definitions( ${PROJECT_NAME} PRIVATE "MEM_DEBUG_CLASSNAME" )
target_include_directories( ${PROJECT_NAME} PRIVATE "${ENGINE_SOURCE_DIR}/tier0/" )