mirror of
https://git.recroomarchive.org/Radium/libradhook.git
synced 2026-08-07 09:10:59 +00:00
build changes
This commit is contained in:
@@ -29,7 +29,6 @@ switch ($Target) {
|
|||||||
|
|
||||||
"msvc" {
|
"msvc" {
|
||||||
$VsPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat"
|
$VsPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat"
|
||||||
|
|
||||||
if (-not (Test-Path $VsPath)) {
|
if (-not (Test-Path $VsPath)) {
|
||||||
$VsPath = "${env:ProgramFiles}\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat"
|
$VsPath = "${env:ProgramFiles}\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat"
|
||||||
}
|
}
|
||||||
@@ -38,12 +37,6 @@ switch ($Target) {
|
|||||||
throw "MSVC environment not found. Install Visual Studio C++ build tools."
|
throw "MSVC environment not found. Install Visual Studio C++ build tools."
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd /c "`"$VsPath`" && set" | ForEach-Object {
|
|
||||||
if ($_ -match "^(.*?)=(.*)$") {
|
|
||||||
Set-Item -Path "env:$($matches[1])" -Value $matches[2]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$Generator = "Visual Studio 17 2022"
|
$Generator = "Visual Studio 17 2022"
|
||||||
$Arch = "x64"
|
$Arch = "x64"
|
||||||
$ExtraArgs += "-A $Arch"
|
$ExtraArgs += "-A $Arch"
|
||||||
|
|||||||
@@ -66,6 +66,13 @@ target_link_options(radhook PRIVATE
|
|||||||
>
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
target_sources(radhook PRIVATE resources/version.rc)
|
||||||
|
else()
|
||||||
|
configure_file(cmake/watermark.cpp.i ${CMAKE_BINARY_DIR}/generated/watermark.cpp @ONLY)
|
||||||
|
target_sources(radhook PRIVATE ${CMAKE_BINARY_DIR}/generated/watermark.cpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
set_target_properties(radhook PROPERTIES
|
set_target_properties(radhook PROPERTIES
|
||||||
CXX_VISIBILITY_PRESET hidden
|
CXX_VISIBILITY_PRESET hidden
|
||||||
VISIBILITY_INLINES_HIDDEN YES
|
VISIBILITY_INLINES_HIDDEN YES
|
||||||
|
|||||||
3
cmake/watermark.cpp.i
Normal file
3
cmake/watermark.cpp.i
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
extern "C" const char* const g_watermark =
|
||||||
|
"libradhook, a lightweight and minimalistic cross-platform hooking library for windows and android. "
|
||||||
|
"built by RecRoomArchive. copyright (c) RecRoomArchive, all rights reserved.";
|
||||||
18
resources/version.rc
Normal file
18
resources/version.rc
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION 1,1,0,0
|
||||||
|
PRODUCTVERSION 1,1,0,0
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "Radium Development"
|
||||||
|
VALUE "FileDescription", "libradhook, a lightweight and minimalistic cross-platform hooking library for windows and android"
|
||||||
|
VALUE "LegalCopyright", "Copyright (c) RecRoomArchive"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
Reference in New Issue
Block a user