55# manages its dependencies, and sets up installation rules.
66# ===================================================================
77
8+ message (STATUS "Configuring Prism Library (v${PROJECT_VERSION} )." )
9+
810# --- Dependencies ---
911
1012include (FetchContent)
@@ -16,6 +18,8 @@ FetchContent_Declare(
1618)
1719FetchContent_MakeAvailable(yaml-cpp)
1820
21+ message (STATUS "Configuring yaml-cpp dependency: building SHARED library, tests/tools DISABLED." )
22+
1923set (YAML_CPP_BUILD_CONTRIB OFF CACHE BOOL "Disable building yaml-cpp contrib tools" FORCE)
2024set (YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "Disable building yaml-cpp parse tools" FORCE)
2125set (YAML_CPP_BUILD_TESTS OFF CACHE BOOL "Disable building yaml-cpp tests" FORCE)
@@ -31,11 +35,23 @@ option(PRISM_BUILD_CORE "Build the Core module (math, etc.)" ON)
3135option (PRISM_BUILD_OBJECTS "Build the Objects module (Sphere, Plane, Mesh, etc.)" ON )
3236option (PRISM_BUILD_SCENE "Build the Scene module (Scene, Camera)" ON )
3337
38+ # --- Dependecy Management ---
39+
3440# The CORE module is essential for all other parts of the library.
3541if (NOT PRISM_BUILD_CORE)
3642 message (FATAL_ERROR "PRISM_BUILD_CORE is a required module and cannot be disabled." )
3743endif ()
3844
45+ # The OBJECTS module depends on the CORE module.
46+ if (PRISM_BUILD_OBJECTS AND NOT PRISM_BUILD_CORE)
47+ message (FATAL_ERROR "PRISM_BUILD_OBJECTS requires PRISM_BUILD_CORE to be enabled. Please enable PRISM_BUILD_CORE." )
48+ endif ()
49+
50+ # The SCENE module depends on the OBJECTS module.
51+ if (PRISM_BUILD_SCENE AND NOT PRISM_BUILD_OBJECTS)
52+ message (FATAL_ERROR "PRISM_BUILD_SCENE requires PRISM_BUILD_OBJECTS to be enabled. Please enable PRISM_BUILD_OBJECTS." )
53+ endif ()
54+
3955
4056# --- Build Source File Collection ---
4157
@@ -44,19 +60,26 @@ set(PRISM_SOURCES "")
4460
4561# Always add the core source files.
4662if (PRISM_BUILD_CORE)
63+ message (STATUS "Prism Library: Core module ENABLED." )
4764 file (GLOB CORE_SOURCES CONFIGURE_DEPENDS "src/core/*.cpp" )
4865 list (APPEND PRISM_SOURCES ${CORE_SOURCES} )
4966endif ()
5067
5168# Conditionally add sources for the other modules.
5269if (PRISM_BUILD_OBJECTS)
70+ message (STATUS "Prism Library: Objects module ENABLED." )
5371 file (GLOB GEOMETRY_SOURCES CONFIGURE_DEPENDS "src/objects/*.cpp" )
5472 list (APPEND PRISM_SOURCES ${GEOMETRY_SOURCES} )
73+ else ()
74+ message (STATUS "Prism Library: Objects module DISABLED." )
5575endif ()
5676
5777if (PRISM_BUILD_SCENE)
78+ message (STATUS "Prism Library: Scene module ENABLED." )
5879 file (GLOB SCENE_SOURCES CONFIGURE_DEPENDS "src/scene/*.cpp" )
5980 list (APPEND PRISM_SOURCES ${SCENE_SOURCES} )
81+ else ()
82+ message (STATUS "Prism Library: Scene module DISABLED." )
6083endif ()
6184
6285# Add any remaining top-level source files (e.g., init.cpp)
0 commit comments