2026-02-02 12:24:50 -08:00
|
|
|
cmake_minimum_required(VERSION 3.15)
|
|
|
|
|
project(wowee VERSION 1.0.0 LANGUAGES CXX)
|
2026-02-11 15:24:05 -08:00
|
|
|
include(GNUInstallDirs)
|
2026-02-02 12:24:50 -08:00
|
|
|
|
2026-02-07 11:43:37 -08:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2026-02-02 12:24:50 -08:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
|
|
|
|
|
|
# Output directories
|
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
|
|
|
|
|
|
# Options
|
|
|
|
|
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
|
|
|
|
option(WOWEE_BUILD_TESTS "Build tests" OFF)
|
|
|
|
|
|
|
|
|
|
# Find required packages
|
|
|
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
|
find_package(GLEW REQUIRED)
|
|
|
|
|
find_package(OpenSSL REQUIRED)
|
|
|
|
|
find_package(Threads REQUIRED)
|
2026-02-05 21:03:27 -08:00
|
|
|
find_package(ZLIB REQUIRED)
|
2026-02-05 15:34:29 -08:00
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
|
pkg_check_modules(FFMPEG REQUIRED libavformat libavcodec libswscale libavutil)
|
2026-02-02 12:24:50 -08:00
|
|
|
|
|
|
|
|
# GLM (header-only math library)
|
|
|
|
|
find_package(glm QUIET)
|
|
|
|
|
if(NOT glm_FOUND)
|
|
|
|
|
message(STATUS "GLM not found, will use system includes or download")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# StormLib for MPQ archives
|
|
|
|
|
find_library(STORMLIB_LIBRARY NAMES StormLib stormlib storm)
|
|
|
|
|
find_path(STORMLIB_INCLUDE_DIR StormLib.h PATH_SUFFIXES StormLib)
|
|
|
|
|
|
|
|
|
|
if(NOT STORMLIB_LIBRARY OR NOT STORMLIB_INCLUDE_DIR)
|
|
|
|
|
message(WARNING "StormLib not found. You may need to build it manually.")
|
|
|
|
|
message(WARNING "Get it from: https://github.com/ladislav-zezula/StormLib")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Include ImGui as a static library (we'll add the sources)
|
|
|
|
|
set(IMGUI_DIR ${CMAKE_CURRENT_SOURCE_DIR}/extern/imgui)
|
|
|
|
|
if(EXISTS ${IMGUI_DIR})
|
|
|
|
|
add_library(imgui STATIC
|
|
|
|
|
${IMGUI_DIR}/imgui.cpp
|
|
|
|
|
${IMGUI_DIR}/imgui_draw.cpp
|
|
|
|
|
${IMGUI_DIR}/imgui_tables.cpp
|
|
|
|
|
${IMGUI_DIR}/imgui_widgets.cpp
|
|
|
|
|
${IMGUI_DIR}/imgui_demo.cpp
|
|
|
|
|
${IMGUI_DIR}/backends/imgui_impl_sdl2.cpp
|
|
|
|
|
${IMGUI_DIR}/backends/imgui_impl_opengl3.cpp
|
|
|
|
|
)
|
|
|
|
|
target_include_directories(imgui PUBLIC
|
|
|
|
|
${IMGUI_DIR}
|
|
|
|
|
${IMGUI_DIR}/backends
|
|
|
|
|
)
|
|
|
|
|
target_link_libraries(imgui PUBLIC SDL2::SDL2 OpenGL::GL ${CMAKE_DL_LIBS})
|
|
|
|
|
target_compile_definitions(imgui PUBLIC IMGUI_IMPL_OPENGL_LOADER_GLEW)
|
|
|
|
|
else()
|
|
|
|
|
message(WARNING "ImGui not found in extern/imgui. Clone it with:")
|
|
|
|
|
message(WARNING " git clone https://github.com/ocornut/imgui.git extern/imgui")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Source files
|
|
|
|
|
set(WOWEE_SOURCES
|
|
|
|
|
# Core
|
|
|
|
|
src/core/application.cpp
|
|
|
|
|
src/core/window.cpp
|
|
|
|
|
src/core/input.cpp
|
|
|
|
|
src/core/logger.cpp
|
2026-02-08 23:15:26 -08:00
|
|
|
src/core/memory_monitor.cpp
|
2026-02-02 12:24:50 -08:00
|
|
|
|
|
|
|
|
# Network
|
|
|
|
|
src/network/socket.cpp
|
|
|
|
|
src/network/packet.cpp
|
|
|
|
|
src/network/tcp_socket.cpp
|
|
|
|
|
src/network/world_socket.cpp
|
|
|
|
|
|
|
|
|
|
# Auth
|
|
|
|
|
src/auth/auth_handler.cpp
|
|
|
|
|
src/auth/auth_opcodes.cpp
|
|
|
|
|
src/auth/auth_packets.cpp
|
|
|
|
|
src/auth/srp.cpp
|
|
|
|
|
src/auth/big_num.cpp
|
|
|
|
|
src/auth/crypto.cpp
|
|
|
|
|
src/auth/rc4.cpp
|
|
|
|
|
|
|
|
|
|
# Game
|
|
|
|
|
src/game/game_handler.cpp
|
2026-02-10 21:29:10 -08:00
|
|
|
src/game/transport_manager.cpp
|
2026-02-02 12:24:50 -08:00
|
|
|
src/game/world.cpp
|
|
|
|
|
src/game/player.cpp
|
|
|
|
|
src/game/entity.cpp
|
|
|
|
|
src/game/opcodes.cpp
|
|
|
|
|
src/game/world_packets.cpp
|
|
|
|
|
src/game/character.cpp
|
|
|
|
|
src/game/zone_manager.cpp
|
|
|
|
|
src/game/inventory.cpp
|
|
|
|
|
|
|
|
|
|
# Audio
|
2026-02-09 00:40:50 -08:00
|
|
|
src/audio/audio_engine.cpp
|
2026-02-02 12:24:50 -08:00
|
|
|
src/audio/music_manager.cpp
|
2026-02-03 14:55:32 -08:00
|
|
|
src/audio/footstep_manager.cpp
|
2026-02-03 19:49:56 -08:00
|
|
|
src/audio/activity_sound_manager.cpp
|
2026-02-09 01:04:53 -08:00
|
|
|
src/audio/mount_sound_manager.cpp
|
2026-02-09 01:29:44 -08:00
|
|
|
src/audio/npc_voice_manager.cpp
|
2026-02-09 14:50:14 -08:00
|
|
|
src/audio/ambient_sound_manager.cpp
|
2026-02-09 16:30:47 -08:00
|
|
|
src/audio/ui_sound_manager.cpp
|
2026-02-09 16:38:50 -08:00
|
|
|
src/audio/combat_sound_manager.cpp
|
Add comprehensive spell sound manager with 35+ magic sounds
Implemented complete spell casting audio system with all magic schools:
Magic schools supported:
- Fire: Precast (Low/Medium/High), Cast, Fireball impacts
- Frost: Precast (Low/Medium/High), Cast, Blizzard impacts
- Holy: Precast (Low/Medium/High), Cast, Holy impacts (4 levels)
- Nature: Precast (Low/Medium/High), Cast
- Shadow: Precast (Low/Medium/High), Cast
- Arcane: Precast, Arcane Missile impacts
- Physical: Non-magical abilities
Spell phases:
- Precast: Channeling/preparation sounds (before cast)
- Cast: Spell release sounds (when spell fires)
- Impact: Spell hit sounds (when spell hits target)
Power levels:
- Low: Weak spells, low level abilities
- Medium: Standard power spells
- High: Powerful high-level spells
Sound coverage (35+ sounds):
- 16 precast sounds (Fire/Frost/Holy/Nature/Shadow × Low/Med/High + Arcane)
- 5 cast sounds (one per school)
- 16 impact sounds (Fireball ×3, Blizzard ×6, Holy ×4, Arcane Missile ×3)
Technical details:
- Loads 35+ sound files from Sound\Spells directory
- Simple API: playPrecast(school, power), playCast(school), playImpact(school, power)
- Convenience methods: playFireball(), playFrostbolt(), playHeal(), etc.
- Random variation selection for impacts
- Volume at 0.75 with global scale control
- Ready for integration with spell casting system
Usage examples:
```cpp
// Full spell sequence
spellSoundManager->playPrecast(MagicSchool::FIRE, SpellPower::HIGH);
// ... cast time ...
spellSoundManager->playCast(MagicSchool::FIRE);
// ... projectile travel ...
spellSoundManager->playImpact(MagicSchool::FIRE, SpellPower::HIGH);
// Convenience methods
spellSoundManager->playFireball();
spellSoundManager->playHeal();
```
This adds essential magic feedback for spell casting gameplay!
2026-02-09 16:45:30 -08:00
|
|
|
src/audio/spell_sound_manager.cpp
|
2026-02-09 16:50:37 -08:00
|
|
|
src/audio/movement_sound_manager.cpp
|
2026-02-02 12:24:50 -08:00
|
|
|
|
|
|
|
|
# Pipeline (asset loaders)
|
|
|
|
|
src/pipeline/mpq_manager.cpp
|
|
|
|
|
src/pipeline/blp_loader.cpp
|
|
|
|
|
src/pipeline/dbc_loader.cpp
|
|
|
|
|
src/pipeline/asset_manager.cpp
|
|
|
|
|
src/pipeline/m2_loader.cpp
|
|
|
|
|
src/pipeline/wmo_loader.cpp
|
|
|
|
|
src/pipeline/adt_loader.cpp
|
|
|
|
|
src/pipeline/terrain_mesh.cpp
|
|
|
|
|
|
|
|
|
|
# Rendering
|
|
|
|
|
src/rendering/renderer.cpp
|
|
|
|
|
src/rendering/shader.cpp
|
|
|
|
|
src/rendering/texture.cpp
|
|
|
|
|
src/rendering/mesh.cpp
|
|
|
|
|
src/rendering/camera.cpp
|
|
|
|
|
src/rendering/camera_controller.cpp
|
|
|
|
|
src/rendering/material.cpp
|
|
|
|
|
src/rendering/scene.cpp
|
|
|
|
|
src/rendering/terrain_renderer.cpp
|
|
|
|
|
src/rendering/terrain_manager.cpp
|
|
|
|
|
src/rendering/frustum.cpp
|
|
|
|
|
src/rendering/performance_hud.cpp
|
|
|
|
|
src/rendering/water_renderer.cpp
|
|
|
|
|
src/rendering/skybox.cpp
|
|
|
|
|
src/rendering/celestial.cpp
|
|
|
|
|
src/rendering/starfield.cpp
|
|
|
|
|
src/rendering/clouds.cpp
|
|
|
|
|
src/rendering/lens_flare.cpp
|
|
|
|
|
src/rendering/weather.cpp
|
|
|
|
|
src/rendering/lightning.cpp
|
2026-02-10 13:44:22 -08:00
|
|
|
src/rendering/lighting_manager.cpp
|
Implement WoW-accurate DBC-driven sky system with lore-faithful celestial bodies
Add SkySystem coordinator that follows WoW's actual architecture where skyboxes
are authoritative and procedural elements serve as fallbacks. Integrate lighting
system across all renderers (terrain, WMO, M2, character) with unified parameters.
Sky System:
- SkySystem coordinator manages skybox, celestial bodies, stars, clouds, lens flare
- Skybox is authoritative (baked stars from M2 models, procedural fallback only)
- skyboxHasStars flag gates procedural star rendering (prevents double-star bug)
Celestial Bodies (Lore-Accurate):
- Two moons: White Lady (30-day cycle, pale white) + Blue Child (27-day cycle, pale blue)
- Deterministic moon phases from server gameTime (not deltaTime toys)
- Sun positioning driven by LightingManager directionalDir (DBC-sourced)
- Camera-locked sky dome (translation ignored, rotation applied)
Lighting Integration:
- Apply LightingManager params to WMO, M2, character renderers
- Unified lighting: directional light, diffuse color, ambient color, fog
- Star occlusion by cloud density (70% weight) and fog density (30% weight)
Documentation:
- Add comprehensive SKY_SYSTEM.md technical guide
- Update MEMORY.md with sky system architecture and anti-patterns
- Update README.md with WoW-accurate descriptions
Critical design decisions:
- NO latitude-based star rotation (Azeroth not modeled as spherical planet)
- NO always-on procedural stars (skybox authority prevents zone identity loss)
- NO universal dual-moon setup (map-specific celestial configurations)
2026-02-10 14:36:17 -08:00
|
|
|
src/rendering/sky_system.cpp
|
2026-02-02 12:24:50 -08:00
|
|
|
src/rendering/character_renderer.cpp
|
2026-02-05 14:55:42 -08:00
|
|
|
src/rendering/character_preview.cpp
|
2026-02-02 12:24:50 -08:00
|
|
|
src/rendering/wmo_renderer.cpp
|
|
|
|
|
src/rendering/m2_renderer.cpp
|
2026-02-09 23:41:38 -08:00
|
|
|
src/rendering/quest_marker_renderer.cpp
|
2026-02-02 12:24:50 -08:00
|
|
|
src/rendering/minimap.cpp
|
2026-02-04 22:27:45 -08:00
|
|
|
src/rendering/world_map.cpp
|
2026-02-02 12:24:50 -08:00
|
|
|
src/rendering/swim_effects.cpp
|
2026-02-09 01:24:17 -08:00
|
|
|
src/rendering/mount_dust.cpp
|
2026-02-03 13:33:31 -08:00
|
|
|
src/rendering/loading_screen.cpp
|
2026-02-05 15:34:29 -08:00
|
|
|
src/rendering/video_player.cpp
|
2026-02-02 12:24:50 -08:00
|
|
|
|
|
|
|
|
# UI
|
|
|
|
|
src/ui/ui_manager.cpp
|
|
|
|
|
src/ui/auth_screen.cpp
|
|
|
|
|
src/ui/realm_screen.cpp
|
2026-02-05 14:13:48 -08:00
|
|
|
src/ui/character_create_screen.cpp
|
2026-02-02 12:24:50 -08:00
|
|
|
src/ui/character_screen.cpp
|
|
|
|
|
src/ui/game_screen.cpp
|
|
|
|
|
src/ui/inventory_screen.cpp
|
2026-02-06 13:47:03 -08:00
|
|
|
src/ui/quest_log_screen.cpp
|
2026-02-04 11:31:08 -08:00
|
|
|
src/ui/spellbook_screen.cpp
|
2026-02-06 16:04:25 -08:00
|
|
|
src/ui/talent_screen.cpp
|
2026-02-02 12:24:50 -08:00
|
|
|
|
|
|
|
|
# Main
|
|
|
|
|
src/main.cpp
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(WOWEE_HEADERS
|
|
|
|
|
include/core/application.hpp
|
|
|
|
|
include/core/window.hpp
|
|
|
|
|
include/core/input.hpp
|
|
|
|
|
include/core/logger.hpp
|
|
|
|
|
|
|
|
|
|
include/network/socket.hpp
|
|
|
|
|
include/network/packet.hpp
|
|
|
|
|
include/network/tcp_socket.hpp
|
2026-02-03 22:24:17 -08:00
|
|
|
include/network/world_socket.hpp
|
|
|
|
|
include/network/net_platform.hpp
|
|
|
|
|
|
|
|
|
|
include/platform/process.hpp
|
2026-02-02 12:24:50 -08:00
|
|
|
|
|
|
|
|
include/auth/auth_handler.hpp
|
|
|
|
|
include/auth/auth_opcodes.hpp
|
|
|
|
|
include/auth/auth_packets.hpp
|
|
|
|
|
include/auth/srp.hpp
|
|
|
|
|
include/auth/big_num.hpp
|
|
|
|
|
include/auth/crypto.hpp
|
|
|
|
|
|
|
|
|
|
include/game/game_handler.hpp
|
|
|
|
|
include/game/world.hpp
|
|
|
|
|
include/game/player.hpp
|
|
|
|
|
include/game/entity.hpp
|
|
|
|
|
include/game/opcodes.hpp
|
|
|
|
|
include/game/zone_manager.hpp
|
|
|
|
|
include/game/inventory.hpp
|
Add gameplay systems: combat, spells, groups, loot, vendors, and UI
Implement ~70 new protocol opcodes across 5 phases while maintaining
full 3.3.5a private server compatibility:
- Phase 1: Server-aware targeting (CMSG_SET_SELECTION), player/creature
name queries, CMSG_SET_ACTIVE_MOVER after login
- Phase 2: Auto-attack, melee/spell damage parsing, health/mana/power
tracking from UPDATE_OBJECT fields, floating combat text
- Phase 3: Spell casting, action bar (12 slots, keys 1-=), cast bar,
cooldown tracking, aura/buff system with cancellation
- Phase 4: Group invite/accept/decline/leave, party frames UI,
/invite chat command
- Phase 5: Loot window, NPC gossip dialog, vendor buy/sell interface
Also: disable debug HUD/panels by default, gate 3D rendering to
IN_GAME state only, fix window resize not updating UI positions.
2026-02-04 10:30:52 -08:00
|
|
|
include/game/spell_defines.hpp
|
|
|
|
|
include/game/group_defines.hpp
|
|
|
|
|
include/game/world_packets.hpp
|
|
|
|
|
include/game/character.hpp
|
2026-02-02 12:24:50 -08:00
|
|
|
|
2026-02-09 00:40:50 -08:00
|
|
|
include/audio/audio_engine.hpp
|
2026-02-02 12:24:50 -08:00
|
|
|
include/audio/music_manager.hpp
|
2026-02-03 14:55:32 -08:00
|
|
|
include/audio/footstep_manager.hpp
|
2026-02-03 19:49:56 -08:00
|
|
|
include/audio/activity_sound_manager.hpp
|
2026-02-09 01:04:53 -08:00
|
|
|
include/audio/mount_sound_manager.hpp
|
Implement comprehensive audio control panel with tabbed settings interface
Adds complete audio volume controls for all 11 audio systems with master volume. Reorganizes settings window into Video, Audio, and Gameplay tabs for better UX.
Audio Features:
- Master volume control affecting all audio systems
- Individual volume sliders for: Music, Ambient, UI, Combat, Spell, Movement, Footsteps, NPC Voices, Mounts, Activity sounds
- Real-time volume adjustment with master volume multiplier
- Restore defaults button per tab
Technical Changes:
- Added getVolumeScale() getters to all audio managers
- Integrated all 10 audio managers into renderer (UI, Combat, Spell, Movement added)
- Expanded game_screen.hpp with 11 pending volume variables
- Reorganized settings window using ImGui tab bars (Video/Audio/Gameplay)
- Audio settings uses scrollable child window for 11 volume controls
- Settings window expanded to 520x720px to accommodate comprehensive controls
2026-02-09 17:07:22 -08:00
|
|
|
include/audio/npc_voice_manager.hpp
|
|
|
|
|
include/audio/ambient_sound_manager.hpp
|
|
|
|
|
include/audio/ui_sound_manager.hpp
|
|
|
|
|
include/audio/combat_sound_manager.hpp
|
|
|
|
|
include/audio/spell_sound_manager.hpp
|
|
|
|
|
include/audio/movement_sound_manager.hpp
|
2026-02-02 12:24:50 -08:00
|
|
|
|
|
|
|
|
include/pipeline/mpq_manager.hpp
|
|
|
|
|
include/pipeline/blp_loader.hpp
|
|
|
|
|
include/pipeline/m2_loader.hpp
|
|
|
|
|
include/pipeline/wmo_loader.hpp
|
|
|
|
|
include/pipeline/adt_loader.hpp
|
|
|
|
|
include/pipeline/dbc_loader.hpp
|
|
|
|
|
include/pipeline/terrain_mesh.hpp
|
|
|
|
|
|
|
|
|
|
include/rendering/renderer.hpp
|
|
|
|
|
include/rendering/shader.hpp
|
|
|
|
|
include/rendering/texture.hpp
|
|
|
|
|
include/rendering/mesh.hpp
|
|
|
|
|
include/rendering/camera.hpp
|
|
|
|
|
include/rendering/camera_controller.hpp
|
|
|
|
|
include/rendering/material.hpp
|
|
|
|
|
include/rendering/scene.hpp
|
|
|
|
|
include/rendering/terrain_renderer.hpp
|
|
|
|
|
include/rendering/terrain_manager.hpp
|
|
|
|
|
include/rendering/frustum.hpp
|
|
|
|
|
include/rendering/performance_hud.hpp
|
|
|
|
|
include/rendering/water_renderer.hpp
|
|
|
|
|
include/rendering/skybox.hpp
|
|
|
|
|
include/rendering/celestial.hpp
|
|
|
|
|
include/rendering/starfield.hpp
|
|
|
|
|
include/rendering/clouds.hpp
|
|
|
|
|
include/rendering/lens_flare.hpp
|
|
|
|
|
include/rendering/weather.hpp
|
|
|
|
|
include/rendering/lightning.hpp
|
|
|
|
|
include/rendering/swim_effects.hpp
|
2026-02-04 22:27:45 -08:00
|
|
|
include/rendering/world_map.hpp
|
2026-02-02 12:24:50 -08:00
|
|
|
include/rendering/character_renderer.hpp
|
2026-02-05 14:55:42 -08:00
|
|
|
include/rendering/character_preview.hpp
|
2026-02-02 12:24:50 -08:00
|
|
|
include/rendering/wmo_renderer.hpp
|
2026-02-03 13:33:31 -08:00
|
|
|
include/rendering/loading_screen.hpp
|
2026-02-05 15:34:29 -08:00
|
|
|
include/rendering/video_player.hpp
|
2026-02-02 12:24:50 -08:00
|
|
|
|
|
|
|
|
include/ui/ui_manager.hpp
|
|
|
|
|
include/ui/auth_screen.hpp
|
|
|
|
|
include/ui/realm_screen.hpp
|
2026-02-05 14:13:48 -08:00
|
|
|
include/ui/character_create_screen.hpp
|
2026-02-02 12:24:50 -08:00
|
|
|
include/ui/character_screen.hpp
|
|
|
|
|
include/ui/game_screen.hpp
|
|
|
|
|
include/ui/inventory_screen.hpp
|
2026-02-04 11:31:08 -08:00
|
|
|
include/ui/spellbook_screen.hpp
|
2026-02-06 16:04:25 -08:00
|
|
|
include/ui/talent_screen.hpp
|
2026-02-02 12:24:50 -08:00
|
|
|
)
|
|
|
|
|
|
2026-02-11 15:24:05 -08:00
|
|
|
set(WOWEE_PLATFORM_SOURCES)
|
|
|
|
|
if(WIN32)
|
|
|
|
|
list(APPEND WOWEE_PLATFORM_SOURCES resources/wowee.rc)
|
|
|
|
|
endif()
|
|
|
|
|
|
2026-02-02 12:24:50 -08:00
|
|
|
# Create executable
|
2026-02-11 15:24:05 -08:00
|
|
|
add_executable(wowee ${WOWEE_SOURCES} ${WOWEE_HEADERS} ${WOWEE_PLATFORM_SOURCES})
|
2026-02-02 12:24:50 -08:00
|
|
|
|
|
|
|
|
# Include directories
|
|
|
|
|
target_include_directories(wowee PRIVATE
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
2026-02-03 13:33:31 -08:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/extern
|
2026-02-05 15:34:29 -08:00
|
|
|
${FFMPEG_INCLUDE_DIRS}
|
2026-02-02 12:24:50 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Link libraries
|
|
|
|
|
target_link_libraries(wowee PRIVATE
|
|
|
|
|
SDL2::SDL2
|
|
|
|
|
OpenGL::GL
|
|
|
|
|
GLEW::GLEW
|
|
|
|
|
OpenSSL::SSL
|
|
|
|
|
OpenSSL::Crypto
|
|
|
|
|
Threads::Threads
|
2026-02-05 21:03:27 -08:00
|
|
|
ZLIB::ZLIB
|
2026-02-09 00:40:50 -08:00
|
|
|
${CMAKE_DL_LIBS}
|
2026-02-02 12:24:50 -08:00
|
|
|
)
|
|
|
|
|
|
2026-02-05 15:34:29 -08:00
|
|
|
target_link_libraries(wowee PRIVATE ${FFMPEG_LIBRARIES})
|
|
|
|
|
if (FFMPEG_LIBRARY_DIRS)
|
|
|
|
|
target_link_directories(wowee PRIVATE ${FFMPEG_LIBRARY_DIRS})
|
|
|
|
|
endif()
|
|
|
|
|
|
2026-02-03 22:24:17 -08:00
|
|
|
# Platform-specific libraries
|
2026-02-07 17:59:40 -08:00
|
|
|
if(UNIX AND NOT APPLE)
|
|
|
|
|
target_link_libraries(wowee PRIVATE X11)
|
|
|
|
|
endif()
|
2026-02-03 22:24:17 -08:00
|
|
|
if(WIN32)
|
|
|
|
|
target_link_libraries(wowee PRIVATE ws2_32)
|
|
|
|
|
# SDL2main provides WinMain entry point on Windows
|
|
|
|
|
if(TARGET SDL2::SDL2main)
|
|
|
|
|
target_link_libraries(wowee PRIVATE SDL2::SDL2main)
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
2026-02-02 12:24:50 -08:00
|
|
|
# Link StormLib if found
|
|
|
|
|
if(STORMLIB_LIBRARY AND STORMLIB_INCLUDE_DIR)
|
|
|
|
|
target_link_libraries(wowee PRIVATE ${STORMLIB_LIBRARY})
|
|
|
|
|
target_include_directories(wowee PRIVATE ${STORMLIB_INCLUDE_DIR})
|
|
|
|
|
target_compile_definitions(wowee PRIVATE HAVE_STORMLIB)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Link ImGui if available
|
|
|
|
|
if(TARGET imgui)
|
|
|
|
|
target_link_libraries(wowee PRIVATE imgui)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Link GLM if found
|
|
|
|
|
if(TARGET glm::glm)
|
|
|
|
|
target_link_libraries(wowee PRIVATE glm::glm)
|
|
|
|
|
elseif(glm_FOUND)
|
|
|
|
|
target_include_directories(wowee PRIVATE ${GLM_INCLUDE_DIRS})
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Compiler warnings
|
|
|
|
|
if(MSVC)
|
|
|
|
|
target_compile_options(wowee PRIVATE /W4)
|
|
|
|
|
else()
|
|
|
|
|
target_compile_options(wowee PRIVATE -Wall -Wextra -Wpedantic)
|
|
|
|
|
endif()
|
|
|
|
|
|
2026-02-03 13:33:31 -08:00
|
|
|
# Copy assets to build directory
|
|
|
|
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/assets
|
2026-02-02 12:24:50 -08:00
|
|
|
DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
|
|
|
|
|
|
|
|
|
# Install targets
|
|
|
|
|
install(TARGETS wowee
|
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-11 15:24:05 -08:00
|
|
|
# Linux desktop integration (launcher + icon)
|
|
|
|
|
if(UNIX AND NOT APPLE)
|
|
|
|
|
set(WOWEE_LINUX_ICON_PATH "${CMAKE_INSTALL_FULL_DATAROOTDIR}/icons/hicolor/256x256/apps/wowee.png")
|
|
|
|
|
configure_file(
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/resources/wowee.desktop.in
|
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/wowee.desktop
|
|
|
|
|
@ONLY
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/wowee.desktop
|
|
|
|
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
|
|
|
|
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/Wowee.png
|
|
|
|
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps
|
|
|
|
|
RENAME wowee.png)
|
|
|
|
|
endif()
|
|
|
|
|
|
2026-02-02 12:24:50 -08:00
|
|
|
# Print configuration summary
|
|
|
|
|
message(STATUS "")
|
|
|
|
|
message(STATUS "Wowee Configuration:")
|
|
|
|
|
message(STATUS " C++ Standard: ${CMAKE_CXX_STANDARD}")
|
|
|
|
|
message(STATUS " Build Type: ${CMAKE_BUILD_TYPE}")
|
|
|
|
|
message(STATUS " SDL2: ${SDL2_VERSION}")
|
|
|
|
|
message(STATUS " OpenSSL: ${OPENSSL_VERSION}")
|
|
|
|
|
message(STATUS " StormLib: ${STORMLIB_LIBRARY}")
|
|
|
|
|
message(STATUS " ImGui: ${IMGUI_DIR}")
|
|
|
|
|
message(STATUS "")
|