Skip to content
Snippets Groups Projects
CMakeLists.txt 765 B
Newer Older
include_directories(SYSTEM
    ${PROJECT_SOURCE_DIR}/lib/s2client-api/include
    ${PROJECT_SOURCE_DIR}/lib/s2client-api/contrib/protobuf/src
    ${PROJECT_BINARY_DIR}/lib/s2client-api/generated
    ${PROJECT_SOURCE_DIR}/lib/json/include
)

# All the source files for the bot.
file(GLOB BOT_SOURCES "../src/*.cpp" "../src/*.h" "../src/*.hpp")

file(GLOB LIBRARY_SOURCES "*.cpp" "*.h")

link_directories(${PROJECT_BINARY_DIR}/s2client-api/bin)

# Enable compilation of the SC2 version of the bot code
# TODO: Remove all remaining BW code
add_definitions(-DSC2API)

# Create the executable.
pybind11_add_module(library library.cpp library.h ${BOT_SOURCES} ${LIBRARY_SOURCES})
target_link_libraries(library PRIVATE
    sc2api sc2lib sc2utils sc2protocol libprotobuf
)