mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-24 01:22:23 +08:00
refactor!: Replace premake5 with CMake. (#551)
Co-authored-by: tupoy-ya <tupoy-ya@users.noreply.github.com>
This commit is contained in:
16
scripts/g3log.cmake
Normal file
16
scripts/g3log.cmake
Normal file
@ -0,0 +1,16 @@
|
||||
include(FetchContent)
|
||||
|
||||
set(ADD_FATAL_EXAMPLE OFF CACHE INTERNAL "")
|
||||
set(INSTALL_G3LOG OFF CACHE INTERNAL "")
|
||||
set(G3_SHARED_LIB OFF CACHE INTERNAL "")
|
||||
set(G3_SHARED_RUNTIME OFF CACHE INTERNAL "")
|
||||
|
||||
FetchContent_Declare(
|
||||
g3log
|
||||
GIT_REPOSITORY https://github.com/YimMenu/g3log.git
|
||||
GIT_TAG 6ccf93c2e966e9ae13df75496a88e7b45214f7f8
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
message("g3log")
|
||||
FetchContent_MakeAvailable(g3log)
|
||||
set_property(TARGET g3log PROPERTY CXX_STANDARD 23)
|
23
scripts/gtav-classes.cmake
Normal file
23
scripts/gtav-classes.cmake
Normal file
@ -0,0 +1,23 @@
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
gtav_classes
|
||||
GIT_REPOSITORY https://github.com/Yimura/GTAV-Classes.git
|
||||
GIT_TAG 09d18c6f6f7f9f8ad67a00f83cdd8379c8a734e3
|
||||
GIT_PROGRESS TRUE
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
)
|
||||
message("GTAV-Classes")
|
||||
if(NOT gtav_classes_POPULATED)
|
||||
FetchContent_Populate(gtav_classes)
|
||||
|
||||
file(GLOB_RECURSE SRC_GTAV_CLASSES "${gtav_classes_SOURCE_DIR}/*.hpp")
|
||||
|
||||
# Show GTAV-Classes project
|
||||
add_library(gtav_classes "${SRC_GTAV_CLASSES}")
|
||||
|
||||
source_group(TREE "${gtav_classes_SOURCE_DIR}" PREFIX "GTAV-Classes" FILES "${SRC_GTAV_CLASSES}")
|
||||
endif()
|
||||
set_property(TARGET gtav_classes PROPERTY CXX_STANDARD 23)
|
||||
set_target_properties(gtav_classes PROPERTIES LINKER_LANGUAGE CXX)
|
29
scripts/imgui.cmake
Normal file
29
scripts/imgui.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
imgui
|
||||
GIT_REPOSITORY https://github.com/YimMenu/imgui.git
|
||||
GIT_TAG a241dc7990b631fde6575771173c2442d43d2812
|
||||
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}/*.h"
|
||||
"${imgui_SOURCE_DIR}/backends/imgui_impl_win32.*"
|
||||
"${imgui_SOURCE_DIR}/backends/imgui_impl_dx11.*"
|
||||
"${imgui_SOURCE_DIR}/misc/cpp/imgui_stdlib.*"
|
||||
)
|
||||
|
||||
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)
|
17
scripts/json.cmake
Normal file
17
scripts/json.cmake
Normal file
@ -0,0 +1,17 @@
|
||||
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)
|
||||
|
||||
# Show json project
|
||||
add_library(json ${json_SOURCE_DIR}/single_include/nlohmann/json.hpp)
|
||||
set_property(TARGET json PROPERTY CXX_STANDARD 23)
|
||||
set_target_properties(json PROPERTIES LINKER_LANGUAGE CXX)
|
11
scripts/minhook.cmake
Normal file
11
scripts/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
scripts/pugixml.cmake
Normal file
11
scripts/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)
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
git checkout master
|
||||
|
||||
git pull && git submodule update
|
Reference in New Issue
Block a user