diff --git a/source/runtime/CMakeLists.txt b/source/runtime/CMakeLists.txt index 5231bc6f34..cb61129240 100644 --- a/source/runtime/CMakeLists.txt +++ b/source/runtime/CMakeLists.txt @@ -1,49 +1,3 @@ project(tactile-runtime CXX) -add_library(tactile-runtime SHARED) -add_library(tactile::runtime ALIAS tactile-runtime) - -target_sources(tactile-runtime - PRIVATE - "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/api.hpp" - "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/launcher.hpp" - "${PROJECT_SOURCE_DIR}/src/tactile/runtime/launcher.cpp" - "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/plugin.hpp" - "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/plugin_instance.hpp" - "${PROJECT_SOURCE_DIR}/src/tactile/runtime/plugin_instance.cpp" - "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/protobuf_context.hpp" - "${PROJECT_SOURCE_DIR}/src/tactile/runtime/protobuf_context.cpp" - "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/runtime.hpp" - "${PROJECT_SOURCE_DIR}/src/tactile/runtime/runtime.cpp" - "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/sdl_context.hpp" - "${PROJECT_SOURCE_DIR}/src/tactile/runtime/sdl_context.cpp" - "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/window.hpp" - "${PROJECT_SOURCE_DIR}/src/tactile/runtime/window.cpp" - ) - -tactile_prepare_target(tactile-runtime) - -target_include_directories(tactile-runtime - PUBLIC - "${PROJECT_SOURCE_DIR}/inc" - ) - -target_compile_definitions(tactile-runtime - PRIVATE - "TACTILE_BUILDING_RUNTIME" - "TACTILE_ENABLE_ZLIB_COMPRESSION" - "TACTILE_ENABLE_ZSTD_COMPRESSION" - "TACTILE_ENABLE_YAML_FORMAT" - "TACTILE_ENABLE_OPENGL_RENDERER" - ) - -target_link_libraries(tactile-runtime - PUBLIC - tactile::base - - PRIVATE - tactile::core - protobuf::libprotobuf - SDL2::SDL2 - imgui::imgui - ) +add_subdirectory(lib) diff --git a/source/runtime/lib/CMakeLists.txt b/source/runtime/lib/CMakeLists.txt new file mode 100644 index 0000000000..28c2dda675 --- /dev/null +++ b/source/runtime/lib/CMakeLists.txt @@ -0,0 +1,53 @@ +project(tactile-runtime-lib CXX) + +add_library(tactile-runtime SHARED) +add_library(tactile::runtime ALIAS tactile-runtime) + +target_sources(tactile-runtime + PRIVATE + "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/api.hpp" + "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/launcher.hpp" + "${PROJECT_SOURCE_DIR}/src/tactile/runtime/launcher.cpp" + "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/plugin.hpp" + "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/plugin_instance.hpp" + "${PROJECT_SOURCE_DIR}/src/tactile/runtime/plugin_instance.cpp" + "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/protobuf_context.hpp" + "${PROJECT_SOURCE_DIR}/src/tactile/runtime/protobuf_context.cpp" + "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/runtime.hpp" + "${PROJECT_SOURCE_DIR}/src/tactile/runtime/runtime.cpp" + "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/sdl_context.hpp" + "${PROJECT_SOURCE_DIR}/src/tactile/runtime/sdl_context.cpp" + "${PROJECT_SOURCE_DIR}/inc/tactile/runtime/window.hpp" + "${PROJECT_SOURCE_DIR}/src/tactile/runtime/window.cpp" + ) + +tactile_prepare_target(tactile-runtime) + +target_include_directories(tactile-runtime + PUBLIC + "${PROJECT_SOURCE_DIR}/inc" + ) + +target_compile_definitions(tactile-runtime + PRIVATE + "TACTILE_BUILDING_RUNTIME" + "TACTILE_ENABLE_ZLIB_COMPRESSION" + "TACTILE_ENABLE_ZSTD_COMPRESSION" + "TACTILE_ENABLE_YAML_FORMAT" + # "TACTILE_ENABLE_TILED_TMJ_FORMAT" + # "TACTILE_ENABLE_TILED_TMX_FORMAT" + # "TACTILE_ENABLE_GODOT_TSCN_FORMAT" + "TACTILE_ENABLE_OPENGL_RENDERER" + # "TACTILE_ENABLE_VULKAN_RENDERER" + ) + +target_link_libraries(tactile-runtime + PUBLIC + tactile::base + + PRIVATE + tactile::core + protobuf::libprotobuf + SDL2::SDL2 + imgui::imgui + ) diff --git a/source/runtime/inc/tactile/runtime/api.hpp b/source/runtime/lib/inc/tactile/runtime/api.hpp similarity index 100% rename from source/runtime/inc/tactile/runtime/api.hpp rename to source/runtime/lib/inc/tactile/runtime/api.hpp diff --git a/source/runtime/inc/tactile/runtime/launcher.hpp b/source/runtime/lib/inc/tactile/runtime/launcher.hpp similarity index 100% rename from source/runtime/inc/tactile/runtime/launcher.hpp rename to source/runtime/lib/inc/tactile/runtime/launcher.hpp diff --git a/source/runtime/inc/tactile/runtime/plugin.hpp b/source/runtime/lib/inc/tactile/runtime/plugin.hpp similarity index 100% rename from source/runtime/inc/tactile/runtime/plugin.hpp rename to source/runtime/lib/inc/tactile/runtime/plugin.hpp diff --git a/source/runtime/inc/tactile/runtime/plugin_instance.hpp b/source/runtime/lib/inc/tactile/runtime/plugin_instance.hpp similarity index 100% rename from source/runtime/inc/tactile/runtime/plugin_instance.hpp rename to source/runtime/lib/inc/tactile/runtime/plugin_instance.hpp diff --git a/source/runtime/inc/tactile/runtime/protobuf_context.hpp b/source/runtime/lib/inc/tactile/runtime/protobuf_context.hpp similarity index 100% rename from source/runtime/inc/tactile/runtime/protobuf_context.hpp rename to source/runtime/lib/inc/tactile/runtime/protobuf_context.hpp diff --git a/source/runtime/inc/tactile/runtime/runtime.hpp b/source/runtime/lib/inc/tactile/runtime/runtime.hpp similarity index 100% rename from source/runtime/inc/tactile/runtime/runtime.hpp rename to source/runtime/lib/inc/tactile/runtime/runtime.hpp diff --git a/source/runtime/inc/tactile/runtime/sdl_context.hpp b/source/runtime/lib/inc/tactile/runtime/sdl_context.hpp similarity index 100% rename from source/runtime/inc/tactile/runtime/sdl_context.hpp rename to source/runtime/lib/inc/tactile/runtime/sdl_context.hpp diff --git a/source/runtime/inc/tactile/runtime/window.hpp b/source/runtime/lib/inc/tactile/runtime/window.hpp similarity index 100% rename from source/runtime/inc/tactile/runtime/window.hpp rename to source/runtime/lib/inc/tactile/runtime/window.hpp diff --git a/source/runtime/src/tactile/runtime/launcher.cpp b/source/runtime/lib/src/tactile/runtime/launcher.cpp similarity index 100% rename from source/runtime/src/tactile/runtime/launcher.cpp rename to source/runtime/lib/src/tactile/runtime/launcher.cpp diff --git a/source/runtime/src/tactile/runtime/plugin_instance.cpp b/source/runtime/lib/src/tactile/runtime/plugin_instance.cpp similarity index 100% rename from source/runtime/src/tactile/runtime/plugin_instance.cpp rename to source/runtime/lib/src/tactile/runtime/plugin_instance.cpp diff --git a/source/runtime/src/tactile/runtime/protobuf_context.cpp b/source/runtime/lib/src/tactile/runtime/protobuf_context.cpp similarity index 100% rename from source/runtime/src/tactile/runtime/protobuf_context.cpp rename to source/runtime/lib/src/tactile/runtime/protobuf_context.cpp diff --git a/source/runtime/src/tactile/runtime/runtime.cpp b/source/runtime/lib/src/tactile/runtime/runtime.cpp similarity index 100% rename from source/runtime/src/tactile/runtime/runtime.cpp rename to source/runtime/lib/src/tactile/runtime/runtime.cpp diff --git a/source/runtime/src/tactile/runtime/sdl_context.cpp b/source/runtime/lib/src/tactile/runtime/sdl_context.cpp similarity index 100% rename from source/runtime/src/tactile/runtime/sdl_context.cpp rename to source/runtime/lib/src/tactile/runtime/sdl_context.cpp diff --git a/source/runtime/src/tactile/runtime/window.cpp b/source/runtime/lib/src/tactile/runtime/window.cpp similarity index 100% rename from source/runtime/src/tactile/runtime/window.cpp rename to source/runtime/lib/src/tactile/runtime/window.cpp