Skip to content

Commit

Permalink
Tweak runtime target structure
Browse files Browse the repository at this point in the history
  • Loading branch information
albin-johansson committed Jul 9, 2024
1 parent 08aeaa9 commit 60ef604
Show file tree
Hide file tree
Showing 16 changed files with 54 additions and 47 deletions.
48 changes: 1 addition & 47 deletions source/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
53 changes: 53 additions & 0 deletions source/runtime/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
File renamed without changes.

0 comments on commit 60ef604

Please sign in to comment.