Просмотр полной версии : CMake | Шаблон проекта плагина для SA:MP сервера
vmprotect
25.10.2024, 21:14
Данный проект является базовым шаблоном для разработки плагинов под SA:MP сервер и подойдет тем, кто хочет создать свой собственный плагин.
Источники:
- samp-ptl (https://github.com/katursis/samp-ptl.git)
Проект на GitHub:
Шаблон плагина SA:MP на GitHub (https://github.com/ailishev/SampPluginTemplate)
Инструкция по сборке:
Настройка сборки:
Bash:
cmake -B build -A Win32
Сборка проекта:
Bash:
cmake --build build
вайега52
25.10.2024, 21:36
Данный проект является базовым для тех, кто хочет сделать плагин под самповский сервер.
Источники:
samp-pugin-sdk (https://github.com/udan11/samp-plugin-sdk)
sampgdk (https://github.com/Zeex/sampgdk)
Проект:
GitHub - ailishev/SampPluginTemplate: simple project plugin for samp server (https://github.com/ailishev/SampPluginTemplate)
simple project plugin for samp server. Contribute to ailishev/SampPluginTemplate development by creating an account on GitHub.
github.com
Как собирать и билдить:
Билд:
cmake -B build -A Win32
Сборка:
cmake --build build
можно же через фетч подтягивать самп птл:
Makefile:
include
(
FetchContent
)
FetchContent_Declare
(
samp-ptl
GIT_REPOSITORY https
:
//github.com/katursis/samp-ptl.git
GIT_TAG 06b5e2b9c51879532368dd9e468b5e259ce5d7ce
)
FetchContent_MakeAvailable
(
samp-ptl
)
# samp-ptl
add_library
(
samp-ptl INTERFACE
)
target_include_directories
(
samp-ptl INTERFACE
$
{
samp-ptl_SOURCE_DIR
}
)
# project
target_link_libraries
(
$
{
PROJECT_NAME
}
PRIVATE
samp-ptl
)
target_compile_definitions
(
$
{
PROJECT_NAME
}
PRIVATE
HAVE_STDINT_H
)
позже закину свой мегапрожект
vmprotect
26.10.2024, 10:52
- Обновил немного проект, зависимости будут подтягиваться через фетч
vBulletin® v3.8.14, Copyright ©2000-2026, vBulletin Solutions, Inc. Перевод: zCarot