mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Moved CModule statics to a separate translation unit, preventing the linker to link unused stuff into the loader module, thus allowing us to drop the linkage of unused libraries.
31 lines
539 B
CMake
31 lines
539 B
CMake
cmake_minimum_required( VERSION 3.16 )
|
|
add_module( "shared_lib" "loader" "vpc" ${FOLDER_CONTEXT} TRUE TRUE )
|
|
|
|
start_sources()
|
|
|
|
add_sources( SOURCE_GROUP "Private"
|
|
"loader.cpp"
|
|
"loader.h"
|
|
)
|
|
|
|
target_link_libraries( ${PROJECT_NAME} PRIVATE
|
|
"advapi32.lib"
|
|
"bcrypt.lib"
|
|
"crypt32.lib"
|
|
"dbghelp.lib"
|
|
"wldap32.lib"
|
|
"ws2_32.lib"
|
|
"Rpcrt4.lib"
|
|
|
|
"vpc"
|
|
"tier0"
|
|
|
|
"libdetours"
|
|
)
|
|
|
|
end_sources()
|
|
|
|
target_link_options( ${PROJECT_NAME} PRIVATE
|
|
"/STACK:8000000" # Match game executable stack reserve size
|
|
)
|