Skip to content

Commit b7d1ef8

Browse files
committed
Address Copilot review feedback
- Use absolute paths for headers exported to parent scope - Include C++ headers in framework when ENABLE_CXX_INTERFACE is on
1 parent ef00cfc commit b7d1ef8

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/libprojectM/CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,24 @@ if(BUILD_SHARED_LIBS)
132132
)
133133

134134
if(ENABLE_MACOS_FRAMEWORK)
135+
# Start with C API headers
136+
set(_framework_public_headers ${PROJECTM_PUBLIC_HEADERS})
137+
138+
# Add C++ headers when the C++ interface is enabled
139+
if(ENABLE_CXX_INTERFACE)
140+
list(APPEND _framework_public_headers
141+
"${CMAKE_CURRENT_SOURCE_DIR}/Audio/PCM.hpp"
142+
"${CMAKE_CURRENT_SOURCE_DIR}/ProjectM.hpp"
143+
)
144+
endif()
145+
135146
set_target_properties(projectM PROPERTIES
136147
FRAMEWORK TRUE
137148
FRAMEWORK_VERSION A
138149
MACOSX_FRAMEWORK_IDENTIFIER com.github.projectm-visualizer.projectM
139150
MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${PROJECT_VERSION}"
140151
MACOSX_FRAMEWORK_BUNDLE_VERSION "${PROJECT_VERSION}"
141-
PUBLIC_HEADER "${PROJECTM_PUBLIC_HEADERS}"
152+
PUBLIC_HEADER "${_framework_public_headers}"
142153
)
143154
endif()
144155
else()

0 commit comments

Comments
 (0)