mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-24 01:22:23 +08:00
refactor!: repo cleanup (#2650)
- Move cmake files to dedicated cmake folder - Move scattered python files to `scripts/` folder - Update CMakeLists.txt to reflect changes * feat(scripts): add README to folder
This commit is contained in:
12
cmake/async-logger.cmake
Normal file
12
cmake/async-logger.cmake
Normal file
@ -0,0 +1,12 @@
|
||||
include(FetchContent)
|
||||
|
||||
message("AsyncLogger")
|
||||
FetchContent_Declare(
|
||||
AsyncLogger
|
||||
GIT_REPOSITORY https://github.com/Yimura/AsyncLogger.git
|
||||
GIT_TAG v0.0.6
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
FetchContent_MakeAvailable(AsyncLogger)
|
||||
|
||||
set_property(TARGET AsyncLogger PROPERTY CXX_STANDARD 23)
|
14
cmake/cpr.cmake
Normal file
14
cmake/cpr.cmake
Normal file
@ -0,0 +1,14 @@
|
||||
include(FetchContent)
|
||||
|
||||
set(BUILD_TESTING_BEFORE ${BUILD_TESTING})
|
||||
set(CURL_DISABLE_TESTS OFF)
|
||||
FetchContent_Declare(
|
||||
cpr
|
||||
GIT_REPOSITORY https://github.com/libcpr/cpr.git
|
||||
GIT_TAG 1.10.5
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
message("cpr")
|
||||
FetchContent_MakeAvailable(cpr)
|
||||
|
||||
set(BUILD_TESTING ${BUILD_TESTING_BEFORE} CACHE INTERNAL "" FORCE)
|
38
cmake/git.cmake
Normal file
38
cmake/git.cmake
Normal file
@ -0,0 +1,38 @@
|
||||
find_package(Git)
|
||||
if(Git_FOUND)
|
||||
message("Git found: ${GIT_EXECUTABLE}")
|
||||
|
||||
# the commit's SHA1, and whether the building workspace was dirty or not
|
||||
execute_process(COMMAND
|
||||
"${GIT_EXECUTABLE}" describe --match=NeVeRmAtCh --always --abbrev=40 --dirty
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_SHA1
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# the date of the commit
|
||||
execute_process(COMMAND
|
||||
"${GIT_EXECUTABLE}" log -1 --format=%ad --date=local
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_DATE
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# the subject of the commit
|
||||
execute_process(COMMAND
|
||||
"${GIT_EXECUTABLE}" log -1 --format=%s
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_COMMIT_SUBJECT
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# Commit messages may have quotes in them, which can affect the const char* variable.
|
||||
string(REPLACE "\"" "\\\"" GIT_COMMIT_SUBJECT "${GIT_COMMIT_SUBJECT}")
|
||||
|
||||
# branch name
|
||||
execute_process(COMMAND
|
||||
"${GIT_EXECUTABLE}" branch --show-current
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_BRANCH
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# generate version.cpp
|
||||
configure_file("${SRC_DIR}/version.cpp.in" "${SRC_DIR}/version.cpp" @ONLY)
|
||||
endif()
|
14
cmake/gtav-classes.cmake
Normal file
14
cmake/gtav-classes.cmake
Normal file
@ -0,0 +1,14 @@
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
gtav_classes
|
||||
GIT_REPOSITORY https://github.com/Yimura/GTAV-Classes.git
|
||||
GIT_TAG e8d8bdd2b3152253f6e1fde48720e4caeab19f83
|
||||
GIT_PROGRESS TRUE
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
)
|
||||
message("GTAV-Classes")
|
||||
if(NOT gtav_classes_POPULATED)
|
||||
FetchContent_Populate(gtav_classes)
|
||||
endif()
|
28
cmake/imgui.cmake
Normal file
28
cmake/imgui.cmake
Normal file
@ -0,0 +1,28 @@
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
imgui
|
||||
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
||||
GIT_TAG v1.90
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
message("ImGui")
|
||||
FetchContent_GetProperties(imgui)
|
||||
if(NOT imgui_POPULATED)
|
||||
FetchContent_Populate(imgui)
|
||||
|
||||
file(GLOB SRC_IMGUI
|
||||
"${imgui_SOURCE_DIR}/*.cpp"
|
||||
"${imgui_SOURCE_DIR}/backends/imgui_impl_win32.cpp"
|
||||
"${imgui_SOURCE_DIR}/backends/imgui_impl_dx11.cpp"
|
||||
"${imgui_SOURCE_DIR}/misc/cpp/imgui_stdlib.cpp"
|
||||
)
|
||||
|
||||
add_library(imgui STATIC ${SRC_IMGUI} )
|
||||
source_group(TREE ${imgui_SOURCE_DIR} PREFIX "imgui" FILES ${SRC_IMGUI})
|
||||
target_include_directories(imgui PRIVATE
|
||||
"${imgui_SOURCE_DIR}"
|
||||
"${imgui_SOURCE_DIR}/backends"
|
||||
"${imgui_SOURCE_DIR}/misc/cpp"
|
||||
)
|
||||
endif()
|
||||
set_property(TARGET imgui PROPERTY CXX_STANDARD 23)
|
12
cmake/json.cmake
Normal file
12
cmake/json.cmake
Normal file
@ -0,0 +1,12 @@
|
||||
include(FetchContent)
|
||||
|
||||
set(JSON_MultipleHeaders OFF)
|
||||
|
||||
FetchContent_Declare(
|
||||
json
|
||||
GIT_REPOSITORY https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent.git
|
||||
GIT_TAG 67e6070f9d9a44b4dec79ebe6b591f39d2285593
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
message("json")
|
||||
FetchContent_MakeAvailable(json)
|
12
cmake/lua.cmake
Normal file
12
cmake/lua.cmake
Normal file
@ -0,0 +1,12 @@
|
||||
include(FetchContent)
|
||||
|
||||
message("Lua")
|
||||
FetchContent_Declare(
|
||||
Lua
|
||||
GIT_REPOSITORY https://github.com/walterschell/Lua.git
|
||||
GIT_TAG a2e0125df529894f5e25d7d477b2df4e37690e0f
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
FetchContent_MakeAvailable(Lua)
|
||||
|
||||
set_property(TARGET lua_static PROPERTY CXX_STANDARD 23)
|
11
cmake/minhook.cmake
Normal file
11
cmake/minhook.cmake
Normal file
@ -0,0 +1,11 @@
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
minhook
|
||||
GIT_REPOSITORY https://github.com/YimMenu/minhook.git
|
||||
GIT_TAG 902ab63e0a771547961e132ccc0700d62e2a1423
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
message("MinHook")
|
||||
FetchContent_MakeAvailable(minhook)
|
||||
set_property(TARGET minhook PROPERTY CXX_STANDARD 23)
|
11
cmake/pugixml.cmake
Normal file
11
cmake/pugixml.cmake
Normal file
@ -0,0 +1,11 @@
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
pugixml
|
||||
GIT_REPOSITORY https://github.com/zeux/pugixml.git
|
||||
GIT_TAG a0e064336317c9347a91224112af9933598714e9
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
message("pugixml")
|
||||
FetchContent_MakeAvailable(pugixml)
|
||||
set_property(TARGET pugixml PROPERTY CXX_STANDARD 23)
|
Reference in New Issue
Block a user