# Minimum CMake version required cmake_minimum_required(VERSION 3.22) # Project name, version, and description project(discord-bot VERSION 1.0 DESCRIPTION "A discord bot" LANGUAGES CXX) # Specify CXX language # Temporarily removed to rule out interference from custom CMake modules. # If you have custom CMake modules here that you need, we can re-add this later. # list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # Create an executable add_executable(${PROJECT_NAME} main.cpp ) # Include directories for your headers and D++ headers # This tells the compiler where to find #include and #include target_include_directories(${PROJECT_NAME} PRIVATE # Ensure this path is correct if your D++ headers are NOT directly in ${CMAKE_CURRENT_SOURCE_DIR}/include/dpp # If dpp/dpp.h is found in ${CMAKE_CURRENT_SOURCE_DIR}/include/dpp, then the line below is correct. ${CMAKE_CURRENT_SOURCE_DIR} ) # --- NEW: Direct Linker Injection using Generator Expression --- # This method tells CMake to ONLY pass the full path to the linker, # explicitly preventing it from being treated as a build target. target_link_libraries(${PROJECT_NAME} PRIVATE "$" ) # Set C++ version set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20 CXX_STANDARD_REQUIRED ON )