diff --git a/.gitmodules b/.gitmodules index 19c18d1..239bdda 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,7 @@ [submodule "modules/SFML"] path = modules/SFML url = git@github.com:SFML/SFML.git -[submodule "modules/libtcod"] - path = modules/libtcod - url = git@github.com:libtcod/libtcod.git +[submodule "modules/libtcod-headless"] + path = modules/libtcod-headless + url = git@github.com:jmccardle/libtcod-headless.git + branch = 2.2.1-headless diff --git a/CMakeLists.txt b/CMakeLists.txt index b2b905d..db78272 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,9 @@ link_directories(${CMAKE_SOURCE_DIR}/__lib) # Define the executable target before linking libraries add_executable(mcrogueface ${SOURCES}) +# Define NO_SDL for libtcod-headless headers (excludes SDL-dependent code) +target_compile_definitions(mcrogueface PRIVATE NO_SDL) + # On Windows, set subsystem to WINDOWS to hide console if(WIN32) set_target_properties(mcrogueface PROPERTIES diff --git a/modules/libtcod b/modules/libtcod deleted file mode 160000 index 34ae258..0000000 --- a/modules/libtcod +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 34ae258a863c4f6446effee28ca8ecae51b1519f diff --git a/modules/libtcod-headless b/modules/libtcod-headless new file mode 160000 index 0000000..3b4b65d --- /dev/null +++ b/modules/libtcod-headless @@ -0,0 +1 @@ +Subproject commit 3b4b65dc9aae7d21a98d3578e3e9433728b118bb