# varsculpt/src/CMakeLists.txt

# Recoger todos los .cpp del core
file(GLOB VARSCULPT_CORE_SRC CONFIGURE_DEPENDS "*.cpp")

# Wheels link the core statically into the extension. This avoids shipping a
# second platform-specific shared library and works uniformly on Windows,
# macOS and Linux. Standalone/R builds keep the shared core target.
if(SKBUILD)
    add_library(varsculpt_core STATIC ${VARSCULPT_CORE_SRC})
else()
    add_library(varsculpt_core SHARED ${VARSCULPT_CORE_SRC})
endif()

# Includes públicos
target_include_directories(varsculpt_core PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/../include
)

# Aplicar flags finales del core
target_compile_options(varsculpt_core PRIVATE ${VARSCULPT_CORE_COMPILE_OPTIONS})

# Asegurar nombre final correcto
set_target_properties(varsculpt_core PROPERTIES
    OUTPUT_NAME "varsculpt"
)

# Integración con wheels Python
