Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
I... forgot what I did...
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP committed Jan 17, 2024
1 parent 78b24b9 commit fd7fe80
Show file tree
Hide file tree
Showing 11 changed files with 391 additions and 232 deletions.
23 changes: 14 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,14 @@ else()
endif()
endif()

if(HYDRA_LINUX OR HYDRA_FREEBSD OR HYDRA_MACOS OR HYDRA_WINDOWS)
set(HYDRA_DESKTOP 1)
set(HYDRA_DEFINITIONS ${HYDRA_DEFINITIONS} HYDRA_DESKTOP)
endif()

option(BUILD_QT "Build the Qt frontend" OFF)
option(BUILD_LUA "Build with lua for script support" OFF)
option(BUILD_DISCORD_BOT "Build with discord bot support" OFF)
option(BUILD_DISCORD_BOT "Build with discord bot support" ON)
option(USE_NATIVE_FILE_DIALOGS "Use native file dialogs" OFF)

add_subdirectory(vendored/fmt)
Expand All @@ -122,11 +127,6 @@ set_property(TARGET ssl PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded")
set_property(TARGET crypto PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded")
set(HYDRA_LIBRARIES ${HYDRA_LIBRARIES} ssl crypto)

if(HYDRA_LINUX OR HYDRA_FREEBSD OR HYDRA_MACOS OR HYDRA_WINDOWS)
set(HYDRA_DESKTOP 1)
set(HYDRA_DEFINITIONS ${HYDRA_DEFINITIONS} HYDRA_DESKTOP)
endif()

if(NOT HYDRA_WEB)
set(CURL_USE_LIBSSH2 OFF)
set(CURL_USE_LIBPSL OFF)
Expand Down Expand Up @@ -246,15 +246,19 @@ if(BUILD_QT)
set(CMAKE_AUTORCC ON)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets OpenGLWidgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets OpenGLWidgets)
add_definitions(-DHYDRA_BUILD_QT)
set(HYDRA_DEFINITIONS ${HYDRA_DEFINITIONS} HYDRA_QT)
set(HYDRA_SOURCES ${HYDRA_SOURCES} ${HYDRA_QT_FILES})
endif()

if(BUILD_DISCORD_BOT)
if(BUILD_DISCORD_BOT AND HYDRA_DESKTOP)
set(DPP_INSTALL OFF CACHE BOOL "" FORCE)
set(BUILD_VOICE_SUPPORT OFF CACHE BOOL "" FORCE)
set(OPENSSL_CRYPTO_LIBRARY crypto CACHE STRING "" FORCE)
set(OPENSSL_SSL_LIBRARY ssl CACHE STRING "" FORCE)
add_subdirectory(vendored/DPP)
add_definitions(-DHYDRA_DISCORD_BOT)
set(HYDRA_SOURCES ${HYDRA_SOURCES} ${HYDRA_BOT_FILES})
set(HYDRA_LIBRARIES ${HYDRA_LIBRARIES} dpp)
set(HYDRA_DEFINITIONS ${HYDRA_DEFINITIONS} HYDRA_DISCORD_BOT)
endif()

if(BUILD_LUA)
Expand All @@ -263,6 +267,7 @@ if(BUILD_LUA)
${HYDRA_INCLUDES}
${LUA_INCLUDE_DIR}
)
set(HYDRA_DEFINITIONS ${HYDRA_DEFINITIONS} HYDRA_LUA)
endif()

set(HYDRA_SOURCES ${HYDRA_SOURCES} ${HYDRA_IMGUI_FILES} ${HYDRA_COMMON_FILES})
Expand Down
Loading

0 comments on commit fd7fe80

Please sign in to comment.