Fixed cmakelist file so all files are included.
This commit is contained in:
@@ -5,6 +5,9 @@ project(douwco_hivemind CXX)
|
|||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
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(COMPILE_FLAGS --cache ${CMAKE_BINARY_DIR}/cache)
|
||||||
set(LINK_FLAGS -sASSERTIONS=0 -sMALLOC=emmalloc)
|
set(LINK_FLAGS -sASSERTIONS=0 -sMALLOC=emmalloc)
|
||||||
add_compile_options(${COMPILE_FLAGS})
|
add_compile_options(${COMPILE_FLAGS})
|
||||||
@@ -19,8 +22,8 @@ set(TARGET_NAME douwco_hivemind)
|
|||||||
include_directories(${CMAKE_SOURCE_DIR}/douwco_hivemind/include)
|
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})
|
add_executable(${TARGET_NAME} ${SRC_FILES})
|
||||||
target_link_libraries(${TARGET_NAME} screepsxx)
|
target_link_libraries(${TARGET_NAME} screepsxx)
|
||||||
target_link_options(${TARGET_NAME} PUBLIC -sMODULARIZE=1 --no-entry --bind -sEXPORT_ES6=0)
|
target_link_options(${TARGET_NAME} PUBLIC -sMODULARIZE=1 --no-entry --bind -sEXPORT_ES6=0)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "Engine.hpp"
|
#include "Engine.hpp"
|
||||||
#include "Structures/Spawn.hpp"
|
#include "Structures/Spawn.hpp"
|
||||||
|
|
||||||
EMSCRIPTEN_KEEPALIVE
|
//EMSCRIPTEN_KEEPALIVE
|
||||||
extern "C" void loop()
|
extern "C" void loop()
|
||||||
{
|
{
|
||||||
Screeps::Context::update();
|
Screeps::Context::update();
|
||||||
|
|||||||
Reference in New Issue
Block a user