Hook setup in cmake
This commit is contained in:
parent
76915ede69
commit
a723dbd2f9
|
@ -19,6 +19,7 @@ headers
|
||||||
|
|
||||||
ACP_Ray2/
|
ACP_Ray2/
|
||||||
build/
|
build/
|
||||||
|
build_msvc/
|
||||||
# game_re/
|
# game_re/
|
||||||
windows_libs/
|
windows_libs/
|
||||||
tooling/build/
|
tooling/build/
|
||||||
|
|
|
@ -65,8 +65,8 @@ function(setup_target TARGET DBG_MODE)
|
||||||
|
|
||||||
# Potentially might want 1/1 translation for code
|
# Potentially might want 1/1 translation for code
|
||||||
# For now it has the following values:
|
# For now it has the following values:
|
||||||
# 0 = 100% original (as possible)
|
# 0 = 100% original (as possible)
|
||||||
# 1 = Runtime QOL (no cd checks, windowed mode, etc.)
|
# 1 = Runtime QOL (no cd checks, windowed mode, etc.)
|
||||||
target_compile_definitions(${TARGET} PRIVATE
|
target_compile_definitions(${TARGET} PRIVATE
|
||||||
RE_AUTHENTIC=1
|
RE_AUTHENTIC=1
|
||||||
)
|
)
|
||||||
|
@ -86,6 +86,20 @@ function(setup_target TARGET DBG_MODE)
|
||||||
DbgHelp
|
DbgHelp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
find_program(gh_tool
|
||||||
|
NAMES gh_tool gh_tool.exe
|
||||||
|
HINTS ${CMAKE_CURRENT_LIST_DIR}/../tooling/bin
|
||||||
|
REQUIRED
|
||||||
|
)
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${gh_tool} -d${CMAKE_CURRENT_SOURCE_DIR}/gh.db
|
||||||
|
hooks -o ${CMAKE_CURRENT_BINARY_DIR}/hooks.def
|
||||||
|
)
|
||||||
|
|
||||||
|
target_sources(${TARGET} PRIVATE
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/hooks.def
|
||||||
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
target_sources(${TARGET} PRIVATE
|
target_sources(${TARGET} PRIVATE
|
||||||
r3/binders/static_mem.cxx
|
r3/binders/static_mem.cxx
|
||||||
|
|
|
@ -19,9 +19,9 @@ mkdir -p bin
|
||||||
# Copy binary to bin folder
|
# Copy binary to bin folder
|
||||||
# Use .exe extension on Windows, no extension on Unix-like systems
|
# Use .exe extension on Windows, no extension on Unix-like systems
|
||||||
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
|
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
|
||||||
cp build/tmp/r3_gh_tool.exe bin/
|
cp build/tmp/gh_tool.exe bin/
|
||||||
else
|
else
|
||||||
cp build/tmp/r3_gh_tool bin/
|
cp build/tmp/gh_tool bin/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
Loading…
Reference in New Issue