adds cmake python requirements
This commit is contained in:
parent
bca3a3cb0a
commit
50a38183b6
@ -2,19 +2,22 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
cmake_minimum_required(VERSION 3.15)
|
||||||
# Project name, version and description
|
# Project name, version and description
|
||||||
project(gbp-bot VERSION 1.0 DESCRIPTION "A discord bot")
|
project(gbp-bot VERSION 1.0 DESCRIPTION "A discord bot")
|
||||||
|
|
||||||
|
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
|
||||||
|
|
||||||
# Add DPP as dependency
|
# Add DPP as dependency
|
||||||
add_subdirectory(libs/DPP)
|
add_subdirectory(libs/DPP)
|
||||||
|
|
||||||
# Create an executable
|
# Create an executable
|
||||||
add_executable(${PROJECT_NAME}
|
add_executable(${PROJECT_NAME}
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
# your others files...
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Linking libraries
|
# Linking libraries
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
dpp
|
dpp
|
||||||
|
Python3::Python
|
||||||
)
|
)
|
||||||
|
|
||||||
# Specify includes
|
# Specify includes
|
||||||
@ -26,4 +29,5 @@ target_include_directories(${PROJECT_NAME} PRIVATE
|
|||||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
CXX_STANDARD 17 # or 20 if you want something more recent
|
CXX_STANDARD 17 # or 20 if you want something more recent
|
||||||
CXX_STANDARD_REQUIRED ON
|
CXX_STANDARD_REQUIRED ON
|
||||||
|
LINKER_LANGUAGE CXX
|
||||||
)
|
)
|
||||||
|
@ -571,6 +571,8 @@ CPACK_SOURCE_ZIP-ADVANCED:INTERNAL=1
|
|||||||
FIND_PACKAGE_MESSAGE_DETAILS_OpenSSL:INTERNAL=[/usr/lib/x86_64-linux-gnu/libcrypto.so][/usr/include][c ][v1.1.1k()]
|
FIND_PACKAGE_MESSAGE_DETAILS_OpenSSL:INTERNAL=[/usr/lib/x86_64-linux-gnu/libcrypto.so][/usr/include][c ][v1.1.1k()]
|
||||||
//Details about finding Opus
|
//Details about finding Opus
|
||||||
FIND_PACKAGE_MESSAGE_DETAILS_Opus:INTERNAL=[/usr/include][/usr/lib/x86_64-linux-gnu/libopus.so;/usr/lib/x86_64-linux-gnu/libm.so][1][v()]
|
FIND_PACKAGE_MESSAGE_DETAILS_Opus:INTERNAL=[/usr/include][/usr/lib/x86_64-linux-gnu/libopus.so;/usr/lib/x86_64-linux-gnu/libm.so][1][v()]
|
||||||
|
//Details about finding Python3
|
||||||
|
FIND_PACKAGE_MESSAGE_DETAILS_Python3:INTERNAL=[/usr/bin/python3.9][/usr/include/python3.9][/usr/lib/x86_64-linux-gnu/libpython3.9.so][cfound components: Interpreter Development Development.Module Development.Embed ][v3.9.2()]
|
||||||
//Details about finding Threads
|
//Details about finding Threads
|
||||||
FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()]
|
FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()]
|
||||||
//Details about finding ZLIB
|
//Details about finding ZLIB
|
||||||
@ -636,6 +638,17 @@ _OPENSSL_openssl_INCLUDEDIR:INTERNAL=
|
|||||||
_OPENSSL_openssl_LIBDIR:INTERNAL=
|
_OPENSSL_openssl_LIBDIR:INTERNAL=
|
||||||
_OPENSSL_openssl_PREFIX:INTERNAL=
|
_OPENSSL_openssl_PREFIX:INTERNAL=
|
||||||
_OPENSSL_openssl_VERSION:INTERNAL=
|
_OPENSSL_openssl_VERSION:INTERNAL=
|
||||||
|
_Python3_DEVELOPMENT_EMBED_SIGNATURE:INTERNAL=eb570793687ff1cfcb35fdf811570585
|
||||||
|
_Python3_DEVELOPMENT_MODULE_SIGNATURE:INTERNAL=cd1014fa434c9f908cf41b54cd547222
|
||||||
|
//Path to a program.
|
||||||
|
_Python3_EXECUTABLE:INTERNAL=/usr/bin/python3.9
|
||||||
|
//Path to a file.
|
||||||
|
_Python3_INCLUDE_DIR:INTERNAL=/usr/include/python3.9
|
||||||
|
//Python3 Properties
|
||||||
|
_Python3_INTERPRETER_PROPERTIES:INTERNAL=Python;3;9;2;64;;cpython-39-x86_64-linux-gnu;/usr/lib/python3.9;/usr/lib/python3.9;/usr/lib/python3/dist-packages;/usr/lib/python3/dist-packages
|
||||||
|
_Python3_INTERPRETER_SIGNATURE:INTERNAL=4c68ce0cc4d267693d7c5b1e646e8b91
|
||||||
|
//Path to a library.
|
||||||
|
_Python3_LIBRARY_RELEASE:INTERNAL=/usr/lib/x86_64-linux-gnu/libpython3.9.so
|
||||||
__pkg_config_arguments__OPENSSL:INTERNAL=QUIET;openssl
|
__pkg_config_arguments__OPENSSL:INTERNAL=QUIET;openssl
|
||||||
__pkg_config_arguments_sodium_PKG:INTERNAL=QUIET;libsodium
|
__pkg_config_arguments_sodium_PKG:INTERNAL=QUIET;libsodium
|
||||||
__pkg_config_checked__OPENSSL:INTERNAL=1
|
__pkg_config_checked__OPENSSL:INTERNAL=1
|
||||||
|
@ -42,6 +42,8 @@ set(CMAKE_MAKEFILE_DEPENDS
|
|||||||
"/usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake"
|
"/usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake"
|
||||||
"/usr/share/cmake-3.18/Modules/FindPackageMessage.cmake"
|
"/usr/share/cmake-3.18/Modules/FindPackageMessage.cmake"
|
||||||
"/usr/share/cmake-3.18/Modules/FindPkgConfig.cmake"
|
"/usr/share/cmake-3.18/Modules/FindPkgConfig.cmake"
|
||||||
|
"/usr/share/cmake-3.18/Modules/FindPython/Support.cmake"
|
||||||
|
"/usr/share/cmake-3.18/Modules/FindPython3.cmake"
|
||||||
"/usr/share/cmake-3.18/Modules/FindThreads.cmake"
|
"/usr/share/cmake-3.18/Modules/FindThreads.cmake"
|
||||||
"/usr/share/cmake-3.18/Modules/FindZLIB.cmake"
|
"/usr/share/cmake-3.18/Modules/FindZLIB.cmake"
|
||||||
"/usr/share/cmake-3.18/Modules/GNUInstallDirs.cmake"
|
"/usr/share/cmake-3.18/Modules/GNUInstallDirs.cmake"
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -11,6 +11,7 @@ set(CMAKE_CXX_COMPILER_ID "GNU")
|
|||||||
# The include file search paths:
|
# The include file search paths:
|
||||||
set(CMAKE_CXX_TARGET_INCLUDE_PATH
|
set(CMAKE_CXX_TARGET_INCLUDE_PATH
|
||||||
"../libs/DPP/include"
|
"../libs/DPP/include"
|
||||||
|
"/usr/include/python3.9"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Targets to which this target links.
|
# Targets to which this target links.
|
||||||
|
@ -99,6 +99,7 @@ gbp__bot_EXTERNAL_OBJECTS =
|
|||||||
gbp-bot: CMakeFiles/gbp-bot.dir/src/main.cpp.o
|
gbp-bot: CMakeFiles/gbp-bot.dir/src/main.cpp.o
|
||||||
gbp-bot: CMakeFiles/gbp-bot.dir/build.make
|
gbp-bot: CMakeFiles/gbp-bot.dir/build.make
|
||||||
gbp-bot: libs/DPP/libdpp.so.1.0
|
gbp-bot: libs/DPP/libdpp.so.1.0
|
||||||
|
gbp-bot: /usr/lib/x86_64-linux-gnu/libpython3.9.so
|
||||||
gbp-bot: /usr/lib/x86_64-linux-gnu/libcrypto.so
|
gbp-bot: /usr/lib/x86_64-linux-gnu/libcrypto.so
|
||||||
gbp-bot: /usr/lib/x86_64-linux-gnu/libssl.so
|
gbp-bot: /usr/lib/x86_64-linux-gnu/libssl.so
|
||||||
gbp-bot: /usr/lib/x86_64-linux-gnu/libz.so
|
gbp-bot: /usr/lib/x86_64-linux-gnu/libz.so
|
||||||
|
@ -49,5 +49,103 @@ CMakeFiles/gbp-bot.dir/src/main.cpp.o
|
|||||||
../libs/DPP/include/dpp/webhook.h
|
../libs/DPP/include/dpp/webhook.h
|
||||||
../libs/DPP/include/dpp/win32_safe_warnings.h
|
../libs/DPP/include/dpp/win32_safe_warnings.h
|
||||||
../libs/DPP/include/dpp/wsclient.h
|
../libs/DPP/include/dpp/wsclient.h
|
||||||
/home/seth/documents/programming/discord-bots/gbp/src/gbp.h
|
/home/seth/documents/programming/discord-bots/gbp/src/commands.cpp
|
||||||
|
/home/seth/documents/programming/discord-bots/gbp/src/gbp.cpp
|
||||||
/home/seth/documents/programming/discord-bots/gbp/src/main.cpp
|
/home/seth/documents/programming/discord-bots/gbp/src/main.cpp
|
||||||
|
/usr/include/python3.9/Python.h
|
||||||
|
/usr/include/python3.9/abstract.h
|
||||||
|
/usr/include/python3.9/bltinmodule.h
|
||||||
|
/usr/include/python3.9/boolobject.h
|
||||||
|
/usr/include/python3.9/bytearrayobject.h
|
||||||
|
/usr/include/python3.9/bytesobject.h
|
||||||
|
/usr/include/python3.9/cellobject.h
|
||||||
|
/usr/include/python3.9/ceval.h
|
||||||
|
/usr/include/python3.9/classobject.h
|
||||||
|
/usr/include/python3.9/code.h
|
||||||
|
/usr/include/python3.9/codecs.h
|
||||||
|
/usr/include/python3.9/compile.h
|
||||||
|
/usr/include/python3.9/complexobject.h
|
||||||
|
/usr/include/python3.9/context.h
|
||||||
|
/usr/include/python3.9/cpython/abstract.h
|
||||||
|
/usr/include/python3.9/cpython/bytearrayobject.h
|
||||||
|
/usr/include/python3.9/cpython/bytesobject.h
|
||||||
|
/usr/include/python3.9/cpython/ceval.h
|
||||||
|
/usr/include/python3.9/cpython/code.h
|
||||||
|
/usr/include/python3.9/cpython/dictobject.h
|
||||||
|
/usr/include/python3.9/cpython/fileobject.h
|
||||||
|
/usr/include/python3.9/cpython/fileutils.h
|
||||||
|
/usr/include/python3.9/cpython/import.h
|
||||||
|
/usr/include/python3.9/cpython/initconfig.h
|
||||||
|
/usr/include/python3.9/cpython/listobject.h
|
||||||
|
/usr/include/python3.9/cpython/methodobject.h
|
||||||
|
/usr/include/python3.9/cpython/object.h
|
||||||
|
/usr/include/python3.9/cpython/objimpl.h
|
||||||
|
/usr/include/python3.9/cpython/pyerrors.h
|
||||||
|
/usr/include/python3.9/cpython/pylifecycle.h
|
||||||
|
/usr/include/python3.9/cpython/pymem.h
|
||||||
|
/usr/include/python3.9/cpython/pystate.h
|
||||||
|
/usr/include/python3.9/cpython/sysmodule.h
|
||||||
|
/usr/include/python3.9/cpython/traceback.h
|
||||||
|
/usr/include/python3.9/cpython/tupleobject.h
|
||||||
|
/usr/include/python3.9/cpython/unicodeobject.h
|
||||||
|
/usr/include/python3.9/descrobject.h
|
||||||
|
/usr/include/python3.9/dictobject.h
|
||||||
|
/usr/include/python3.9/enumobject.h
|
||||||
|
/usr/include/python3.9/eval.h
|
||||||
|
/usr/include/python3.9/exports.h
|
||||||
|
/usr/include/python3.9/fileobject.h
|
||||||
|
/usr/include/python3.9/fileutils.h
|
||||||
|
/usr/include/python3.9/floatobject.h
|
||||||
|
/usr/include/python3.9/funcobject.h
|
||||||
|
/usr/include/python3.9/genericaliasobject.h
|
||||||
|
/usr/include/python3.9/genobject.h
|
||||||
|
/usr/include/python3.9/import.h
|
||||||
|
/usr/include/python3.9/intrcheck.h
|
||||||
|
/usr/include/python3.9/iterobject.h
|
||||||
|
/usr/include/python3.9/listobject.h
|
||||||
|
/usr/include/python3.9/longintrepr.h
|
||||||
|
/usr/include/python3.9/longobject.h
|
||||||
|
/usr/include/python3.9/memoryobject.h
|
||||||
|
/usr/include/python3.9/methodobject.h
|
||||||
|
/usr/include/python3.9/modsupport.h
|
||||||
|
/usr/include/python3.9/moduleobject.h
|
||||||
|
/usr/include/python3.9/namespaceobject.h
|
||||||
|
/usr/include/python3.9/object.h
|
||||||
|
/usr/include/python3.9/objimpl.h
|
||||||
|
/usr/include/python3.9/odictobject.h
|
||||||
|
/usr/include/python3.9/osmodule.h
|
||||||
|
/usr/include/python3.9/patchlevel.h
|
||||||
|
/usr/include/python3.9/picklebufobject.h
|
||||||
|
/usr/include/python3.9/pyarena.h
|
||||||
|
/usr/include/python3.9/pycapsule.h
|
||||||
|
/usr/include/python3.9/pyconfig.h
|
||||||
|
/usr/include/python3.9/pyctype.h
|
||||||
|
/usr/include/python3.9/pydebug.h
|
||||||
|
/usr/include/python3.9/pyerrors.h
|
||||||
|
/usr/include/python3.9/pyfpe.h
|
||||||
|
/usr/include/python3.9/pyframe.h
|
||||||
|
/usr/include/python3.9/pyhash.h
|
||||||
|
/usr/include/python3.9/pylifecycle.h
|
||||||
|
/usr/include/python3.9/pymacconfig.h
|
||||||
|
/usr/include/python3.9/pymacro.h
|
||||||
|
/usr/include/python3.9/pymath.h
|
||||||
|
/usr/include/python3.9/pymem.h
|
||||||
|
/usr/include/python3.9/pyport.h
|
||||||
|
/usr/include/python3.9/pystate.h
|
||||||
|
/usr/include/python3.9/pystrcmp.h
|
||||||
|
/usr/include/python3.9/pystrtod.h
|
||||||
|
/usr/include/python3.9/pythonrun.h
|
||||||
|
/usr/include/python3.9/pythread.h
|
||||||
|
/usr/include/python3.9/pytime.h
|
||||||
|
/usr/include/python3.9/rangeobject.h
|
||||||
|
/usr/include/python3.9/setobject.h
|
||||||
|
/usr/include/python3.9/sliceobject.h
|
||||||
|
/usr/include/python3.9/structseq.h
|
||||||
|
/usr/include/python3.9/sysmodule.h
|
||||||
|
/usr/include/python3.9/traceback.h
|
||||||
|
/usr/include/python3.9/tracemalloc.h
|
||||||
|
/usr/include/python3.9/tupleobject.h
|
||||||
|
/usr/include/python3.9/typeslots.h
|
||||||
|
/usr/include/python3.9/unicodeobject.h
|
||||||
|
/usr/include/python3.9/warnings.h
|
||||||
|
/usr/include/python3.9/weakrefobject.h
|
||||||
|
@ -48,6 +48,104 @@ CMakeFiles/gbp-bot.dir/src/main.cpp.o: ../libs/DPP/include/dpp/voicestate.h
|
|||||||
CMakeFiles/gbp-bot.dir/src/main.cpp.o: ../libs/DPP/include/dpp/webhook.h
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: ../libs/DPP/include/dpp/webhook.h
|
||||||
CMakeFiles/gbp-bot.dir/src/main.cpp.o: ../libs/DPP/include/dpp/win32_safe_warnings.h
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: ../libs/DPP/include/dpp/win32_safe_warnings.h
|
||||||
CMakeFiles/gbp-bot.dir/src/main.cpp.o: ../libs/DPP/include/dpp/wsclient.h
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: ../libs/DPP/include/dpp/wsclient.h
|
||||||
CMakeFiles/gbp-bot.dir/src/main.cpp.o: ../src/gbp.h
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: ../src/commands.cpp
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: ../src/gbp.cpp
|
||||||
CMakeFiles/gbp-bot.dir/src/main.cpp.o: ../src/main.cpp
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: ../src/main.cpp
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/Python.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/abstract.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/bltinmodule.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/boolobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/bytearrayobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/bytesobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cellobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/ceval.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/classobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/code.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/codecs.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/compile.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/complexobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/context.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/abstract.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/bytearrayobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/bytesobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/ceval.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/code.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/dictobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/fileobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/fileutils.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/import.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/initconfig.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/listobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/methodobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/object.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/objimpl.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/pyerrors.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/pylifecycle.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/pymem.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/pystate.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/sysmodule.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/traceback.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/tupleobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/cpython/unicodeobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/descrobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/dictobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/enumobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/eval.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/exports.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/fileobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/fileutils.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/floatobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/funcobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/genericaliasobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/genobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/import.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/intrcheck.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/iterobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/listobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/longintrepr.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/longobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/memoryobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/methodobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/modsupport.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/moduleobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/namespaceobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/object.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/objimpl.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/odictobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/osmodule.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/patchlevel.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/picklebufobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pyarena.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pycapsule.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pyconfig.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pyctype.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pydebug.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pyerrors.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pyfpe.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pyframe.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pyhash.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pylifecycle.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pymacconfig.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pymacro.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pymath.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pymem.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pyport.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pystate.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pystrcmp.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pystrtod.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pythonrun.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pythread.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/pytime.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/rangeobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/setobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/sliceobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/structseq.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/sysmodule.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/traceback.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/tracemalloc.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/tupleobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/typeslots.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/unicodeobject.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/warnings.h
|
||||||
|
CMakeFiles/gbp-bot.dir/src/main.cpp.o: /usr/include/python3.9/weakrefobject.h
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# compile CXX with /usr/bin/c++
|
# compile CXX with /usr/bin/c++
|
||||||
CXX_DEFINES =
|
CXX_DEFINES =
|
||||||
|
|
||||||
CXX_INCLUDES = -I/home/seth/documents/programming/discord-bots/gbp/libs/DPP/include
|
CXX_INCLUDES = -I/home/seth/documents/programming/discord-bots/gbp/libs/DPP/include -isystem /usr/include/python3.9
|
||||||
|
|
||||||
CXX_FLAGS = -std=gnu++17
|
CXX_FLAGS = -std=gnu++17
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
/usr/bin/c++ CMakeFiles/gbp-bot.dir/src/main.cpp.o -o gbp-bot -Wl,-rpath,/home/seth/documents/programming/discord-bots/gbp/build/libs/DPP libs/DPP/libdpp.so.1.0 /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libsodium.so /usr/lib/x86_64-linux-gnu/libopus.so -lm
|
/usr/bin/c++ CMakeFiles/gbp-bot.dir/src/main.cpp.o -o gbp-bot -Wl,-rpath,/home/seth/documents/programming/discord-bots/gbp/build/libs/DPP libs/DPP/libdpp.so.1.0 /usr/lib/x86_64-linux-gnu/libpython3.9.so /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libsodium.so /usr/lib/x86_64-linux-gnu/libopus.so -lm
|
||||||
|
Binary file not shown.
BIN
src/.gbp.h.swp
Normal file
BIN
src/.gbp.h.swp
Normal file
Binary file not shown.
@ -1,2 +1,18 @@
|
|||||||
#include "gbp.h"
|
#include "gbp.cpp"
|
||||||
|
|
||||||
|
std::string printFullGBPList(bool update = false)
|
||||||
|
{
|
||||||
|
std::map<int, std::string> gbp;
|
||||||
|
if (update)
|
||||||
|
gbp = fetchAndReadGBP();
|
||||||
|
else
|
||||||
|
gbp = readGBPIntoList();
|
||||||
|
|
||||||
|
std::string msg;
|
||||||
|
int i = 1;
|
||||||
|
for (std::map<int, std::string>::iterator it = gbp.end(); it != gbp.begin(); it--) {
|
||||||
|
msg += "#[i] [it->second], GBP: [it->first]\n";
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#include <bits/stdc++.h>
|
|
||||||
|
|
||||||
void fetchLatestGBP();
|
|
||||||
std::map<int, std::string>readGBPIntoList();
|
|
||||||
std::map<int, std::string>fetchAndReadGBP();
|
|
11
src/main.cpp
11
src/main.cpp
@ -7,7 +7,7 @@
|
|||||||
#include <dpp/queues.h>
|
#include <dpp/queues.h>
|
||||||
#include <dpp/nlohmann/json.hpp>
|
#include <dpp/nlohmann/json.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "gbp.h"
|
#include "commands.cpp"
|
||||||
|
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
|
|
||||||
@ -41,9 +41,16 @@ void onMessage(dpp::cluster &bot, dpp::message msg)
|
|||||||
if (!hasCommand(msg))
|
if (!hasCommand(msg))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
readGBPIntoList();
|
||||||
|
|
||||||
int argIdx = msg.content.find(" ");
|
int argIdx = msg.content.find(" ");
|
||||||
std::string argument = msg.content.substr(argIdx, msg.content.length() - argIdx);
|
std::string argument = msg.content.substr(argIdx, msg.content.length() - argIdx);
|
||||||
dpp::message toSend = dpp::message(msg.channel_id, argument);
|
|
||||||
|
std::string msgContent = "guh";
|
||||||
|
if (argument == "gbp")
|
||||||
|
msgContent = printFullGBPList();
|
||||||
|
|
||||||
|
dpp::message toSend = dpp::message(msg.channel_id, msgContent);
|
||||||
|
|
||||||
bot.message_create(toSend);
|
bot.message_create(toSend);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user