Initial commit - realms platform
This commit is contained in:
parent
c590ab6d18
commit
c717c3751c
234 changed files with 74103 additions and 15231 deletions
|
|
@ -15,6 +15,15 @@ find_package(PostgreSQL REQUIRED)
|
|||
pkg_check_modules(HIREDIS REQUIRED hiredis)
|
||||
pkg_check_modules(REDIS_PLUS_PLUS redis++)
|
||||
|
||||
# Find libzip for EPUB cover extraction
|
||||
pkg_check_modules(LIBZIP REQUIRED libzip)
|
||||
|
||||
# Find GPGME for PGP signature verification
|
||||
pkg_check_modules(GPGME REQUIRED gpgme)
|
||||
|
||||
# Find OpenSSL for cryptographic operations (SECURITY FIX #4)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
# Manual fallback for redis++
|
||||
if(NOT REDIS_PLUS_PLUS_FOUND)
|
||||
find_path(REDIS_PLUS_PLUS_INCLUDE_DIR sw/redis++/redis++.h
|
||||
|
|
@ -61,42 +70,58 @@ set(SOURCES
|
|||
src/controllers/UserController.cpp
|
||||
src/controllers/AdminController.cpp
|
||||
src/controllers/RealmController.cpp
|
||||
src/controllers/RestreamController.cpp
|
||||
src/controllers/VideoController.cpp
|
||||
src/controllers/AudioController.cpp
|
||||
src/controllers/EbookController.cpp
|
||||
src/controllers/ForumController.cpp
|
||||
src/controllers/WatchController.cpp
|
||||
src/services/DatabaseService.cpp
|
||||
src/services/StatsService.cpp
|
||||
src/services/RedisHelper.cpp
|
||||
src/services/AuthService.cpp
|
||||
src/services/RestreamService.cpp
|
||||
src/services/CensorService.cpp
|
||||
src/services/TreasuryService.cpp
|
||||
)
|
||||
|
||||
# Create executable
|
||||
add_executable(${PROJECT_NAME} ${SOURCES})
|
||||
|
||||
# Include directories
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
${BCRYPT_INCLUDE_DIR}
|
||||
${JWT_CPP_INCLUDE_DIR}
|
||||
SYSTEM PRIVATE
|
||||
${HIREDIS_INCLUDE_DIRS}
|
||||
${REDIS_PLUS_PLUS_INCLUDE_DIRS}
|
||||
${LIBZIP_INCLUDE_DIRS}
|
||||
${GPGME_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Link libraries
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
Drogon::Drogon
|
||||
PostgreSQL::PostgreSQL
|
||||
${REDIS_PLUS_PLUS_LIBRARIES}
|
||||
${HIREDIS_LIBRARIES}
|
||||
${BCRYPT_LIBRARY}
|
||||
${LIBZIP_LIBRARIES}
|
||||
${GPGME_LIBRARIES}
|
||||
OpenSSL::SSL
|
||||
OpenSSL::Crypto
|
||||
pthread
|
||||
)
|
||||
|
||||
# Compile options
|
||||
target_compile_options(${PROJECT_NAME}
|
||||
target_compile_options(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${HIREDIS_CFLAGS_OTHER}
|
||||
${REDIS_PLUS_PLUS_CFLAGS_OTHER}
|
||||
${GPGME_CFLAGS_OTHER}
|
||||
-Wall
|
||||
-Wextra
|
||||
-Wpedantic
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue