r5sdk/r5dev/sdklauncher/CMakeLists.txt
Kawe Mazidjatari 861b4b6b2b Launcher: surface and launcher code overhaul
- SDK Launcher is now a proper GUI app (no longer defaults to terminal, but can of course still be used in the terminal).
- Set uniform font on all controls (GetStockObject sometimes returns fonts that isn't currently supported on the UI layout causing text to clip; we don't show in other languages or character encodings so we should just default to Microsoft Sans Serif).
- Make anchors uniform for all controls (resize not yet supported).
- Don't attempt to send commands to game instances if command string is null or empty.
- Clamp surface console list size to window size.
- Remove surface console logger boilerplate (surface logging is now a dedicated function).
- Use actual SDK logging system for console prints/warnings/errors.
- Fixed bug where the use of a shared stack buffer caused truncated parts of the file name to end up in the command line text.
2024-06-01 11:43:10 +02:00

70 lines
1.6 KiB
CMake

cmake_minimum_required( VERSION 3.16 )
add_module( "exe" "sdklauncher" "" ${FOLDER_CONTEXT} TRUE TRUE )
start_sources()
add_sources( SOURCE_GROUP "Foundation"
"${ENGINE_SOURCE_DIR}/tier0/plat_time.cpp"
"${ENGINE_SOURCE_DIR}/public/tier0/platform.h"
)
add_sources( SOURCE_GROUP "Core"
"${ENGINE_SOURCE_DIR}/core/logger.cpp"
"${ENGINE_SOURCE_DIR}/core/logger.h"
"${ENGINE_SOURCE_DIR}/core/logdef.cpp"
"${ENGINE_SOURCE_DIR}/core/logdef.h"
"${ENGINE_SOURCE_DIR}/core/termutil.cpp"
"${ENGINE_SOURCE_DIR}/core/termutil.h"
)
add_sources( SOURCE_GROUP "Windows"
"${ENGINE_SOURCE_DIR}/windows/console.cpp"
"${ENGINE_SOURCE_DIR}/windows/console.h"
)
add_sources( SOURCE_GROUP "App"
"sdklauncher.cpp"
"sdklauncher.h"
"sdklauncher_const.h"
)
add_sources( SOURCE_GROUP "GUI"
"basepanel.cpp"
"basepanel.h"
)
add_sources( SOURCE_GROUP "Resource"
"sdklauncher_res.h"
"${ENGINE_SOURCE_DIR}/resource/sdklauncher.rc"
)
end_sources()
set_target_properties( ${PROJECT_NAME} PROPERTIES OUTPUT_NAME
"launcher"
)
set_target_properties( ${PROJECT_NAME} PROPERTIES
VS_DEBUGGER_COMMAND "launcher.exe"
VS_DEBUGGER_WORKING_DIRECTORY "$(ProjectDir)../../../${BUILD_OUTPUT_DIR}/"
)
target_compile_definitions( ${PROJECT_NAME} PRIVATE
"_TOOLS"
"SDKLAUNCHER"
)
target_precompile_headers( ${PROJECT_NAME} PRIVATE
"sdklauncher_pch.h"
)
target_link_options( ${PROJECT_NAME} PRIVATE "/SUBSYSTEM:WINDOWS" )
target_link_libraries( ${PROJECT_NAME} PRIVATE
"tier0"
"tier1"
"filesystem_std"
"vstdlib"
"libdetours"
"libcppkore"
"libspdlog"
"Rpcrt4.lib"
)