Fixed cmakelist file so all files are included.

This commit is contained in:
2026-06-16 23:05:49 +02:00
parent b130d5c7f7
commit a708ac9628
2 changed files with 6 additions and 3 deletions

View File

@@ -5,6 +5,9 @@ project(douwco_hivemind CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
# Set the Emscripten toolchain
set(CMAKE_TOOLCHAIN_FILE ${EMSCRIPTEN_ROOT}/cmake/Modules/Platform/Emscripten.cmake CACHE STRING "")
# set(COMPILE_FLAGS --cache ${CMAKE_BINARY_DIR}/cache)
set(LINK_FLAGS -sASSERTIONS=0 -sMALLOC=emmalloc)
add_compile_options(${COMPILE_FLAGS})
@@ -19,8 +22,8 @@ set(TARGET_NAME douwco_hivemind)
include_directories(${CMAKE_SOURCE_DIR}/douwco_hivemind/include)
file(GLOB SRC_FILES ${CMAKE_SOURCE_DIR}/douwco_hivemind/src/*.cpp)
file(GLOB SRC_FILES ${CMAKE_SOURCE_DIR}/douwco_hivemind/src/*/*.cpp)
file(GLOB SRC_FILES ${CMAKE_SOURCE_DIR}/douwco_hivemind/src/*.cpp
${CMAKE_SOURCE_DIR}/douwco_hivemind/src/*/*.cpp)
add_executable(${TARGET_NAME} ${SRC_FILES})
target_link_libraries(${TARGET_NAME} screepsxx)
target_link_options(${TARGET_NAME} PUBLIC -sMODULARIZE=1 --no-entry --bind -sEXPORT_ES6=0)

View File

@@ -9,7 +9,7 @@
#include "Engine.hpp"
#include "Structures/Spawn.hpp"
EMSCRIPTEN_KEEPALIVE
//EMSCRIPTEN_KEEPALIVE
extern "C" void loop()
{
Screeps::Context::update();