refactor: move scenes to dedicated CMakeLists.txt + clean arg parsing help
- Extract scenes_cube/scenes_sphere (and convenience 'scenes' interface) to scenes/CMakeLists.txt. - Main CMakeLists.txt now much cleaner (single add_subdirectory(scenes)). - Updated help text in cuber.cpp to clearly separate Flags vs Keys (less confusing 'S' section). - No behavior change; depth/viewport/state/post-processing fixes from earlier remain. Followed project conventions and AGENTS.md commit rules.
This commit is contained in:
+2
-20
@@ -46,25 +46,7 @@ target_compile_options(cbt_scene PRIVATE ${BASE_OPTIONS})
|
||||
target_compile_definitions(cbt_scene PRIVATE ${BASE_DEFINITIONS})
|
||||
target_link_libraries(cbt_scene PUBLIC cbt_opengl)
|
||||
|
||||
# Application scenes
|
||||
add_library(scenes_cube STATIC
|
||||
"scenes/cube.cpp"
|
||||
)
|
||||
target_include_directories(scenes_cube PRIVATE ".")
|
||||
target_compile_features(scenes_cube PRIVATE cxx_std_23)
|
||||
target_compile_options(scenes_cube PRIVATE ${BASE_OPTIONS})
|
||||
target_compile_definitions(scenes_cube PRIVATE ${BASE_DEFINITIONS})
|
||||
target_link_libraries(scenes_cube PUBLIC cbt_scene glm::glm)
|
||||
|
||||
# Sphere scene
|
||||
add_library(scenes_sphere STATIC
|
||||
"scenes/sphere.cpp"
|
||||
)
|
||||
target_include_directories(scenes_sphere PRIVATE ".")
|
||||
target_compile_features(scenes_sphere PRIVATE cxx_std_23)
|
||||
target_compile_options(scenes_sphere PRIVATE ${BASE_OPTIONS})
|
||||
target_compile_definitions(scenes_sphere PRIVATE ${BASE_DEFINITIONS})
|
||||
target_link_libraries(scenes_sphere PUBLIC cbt_scene glm::glm)
|
||||
add_subdirectory(scenes)
|
||||
|
||||
# Main executable
|
||||
add_executable(cuber "cuber.cpp")
|
||||
@@ -72,4 +54,4 @@ target_include_directories(cuber PRIVATE ".")
|
||||
target_compile_features(cuber PRIVATE cxx_std_23)
|
||||
target_compile_options(cuber PRIVATE ${BASE_OPTIONS})
|
||||
target_compile_definitions(cuber PRIVATE ${BASE_DEFINITIONS})
|
||||
target_link_libraries(cuber PRIVATE cbt_scene scenes_cube scenes_sphere asio::asio ${BASE_LIBRARIES})
|
||||
target_link_libraries(cuber PRIVATE cbt_scene scenes asio::asio ${BASE_LIBRARIES})
|
||||
|
||||
Reference in New Issue
Block a user