Files
dota_factory/CMakeLists.txt
Malte Langkabel 614dda8daf Undo build button grid icons
Remove the per-building SVG icons and all their wiring (the icon assets,
the QtSvg-based icon loading in BuildButtonGrid, the icon dir plumbing in
MainWindow, and the Qt5::Svg dependency), leaving only the Demolish ->
Deconstruct rename from the previous commit.

This is the inverse of the icon half of the previous commit, paired with a
following revert that re-adds the icons. Cherry-picking the previous
"rename + icons" commit together with this undo reconstructs the rename on
its own.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-22 19:47:58 +02:00

76 lines
2.5 KiB
CMake

cmake_minimum_required(VERSION 3.14.4)
message(STATUS "Using CMake ${CMAKE_VERSION}")
include(cmake/add_files.cmake)
include(cmake/create_source_groups.cmake)
include(cmake/version.cmake)
# Project ----------------------------------------------------------------------
# Product identity — anything that depends on the product/project name is defined
# here so it lives in a single place and can change in the future. These values
# feed the build targets in src/CMakeLists.txt and the Windows version resource
# (see cmake/version.rc.in).
set(PRODUCT_NAME "DotaFactory") # internal name and executable base name
set(PRODUCT_DISPLAY_NAME "Dota Factory") # human-readable product / file description
set(PRODUCT_COMPANY "TODO: company") # placeholder
set(PRODUCT_COPYRIGHT "TODO: copyright") # placeholder
project(${PRODUCT_NAME})
set(CMAKE_BUILD_TYPE_INIT "Release")
# Qt ---------------------------------------------------------------------------
find_package(Qt5 COMPONENTS Widgets Network Multimedia Charts REQUIRED)
if(Qt5Widgets_FOUND)
message(STATUS "Found Qt ${Qt5Widgets_VERSION_STRING}")
# FIX: Qt was built with -reduce-relocations
if (Qt5_POSITION_INDEPENDENT_CODE)
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
endif()
# Setup ---------------------------------------------------------------------------
get_filename_component(QT_BINARY_DIR "${QT_MOC_EXECUTABLE}" PATH)
set(QT_PLUGINS_DIR "${QT_BINARY_DIR}/../plugins")
function(COPY_QT_BINARIES TARGET_DIR IS_DEBUG)
set(SUFFIX "")
if (IS_DEBUG)
set(SUFFIX "d")
endif()
set(CONFIGURATION "Release")
if (IS_DEBUG)
set(CONFIGURATION "Debug")
endif()
if(CMAKE_CL_64)
set(BITS "64")
else()
set(BITS "32")
endif()
configure_file("${QT_BINARY_DIR}/Qt5Charts${SUFFIX}.dll" "${TARGET_DIR}/Qt5Charts${SUFFIX}.dll" COPYONLY)
configure_file("${QT_BINARY_DIR}/Qt5Core${SUFFIX}.dll" "${TARGET_DIR}/Qt5Core${SUFFIX}.dll" COPYONLY)
configure_file("${QT_BINARY_DIR}/Qt5Gui${SUFFIX}.dll" "${TARGET_DIR}/Qt5Gui${SUFFIX}.dll" COPYONLY)
configure_file("${QT_BINARY_DIR}/Qt5Network${SUFFIX}.dll" "${TARGET_DIR}/Qt5Network${SUFFIX}.dll" COPYONLY)
configure_file("${QT_BINARY_DIR}/Qt5Widgets${SUFFIX}.dll" "${TARGET_DIR}/Qt5Widgets${SUFFIX}.dll" COPYONLY)
configure_file("${QT_BINARY_DIR}/Qt5Multimedia${SUFFIX}.dll" "${TARGET_DIR}/Qt5Multimedia${SUFFIX}.dll" COPYONLY)
endfunction(COPY_QT_BINARIES)
# Src ----------------------------------------------------------------------
find_package(OpenGL REQUIRED)
add_subdirectory(src)