Skip to content

Commit 118812d

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 b22695e commit 118812d

2 files changed

Lines changed: 24 additions & 13 deletions

File tree

src/api/CMakeLists.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ generate_export_header(projectM_api
1414
set(PROJECTM_PUBLIC_HEADERS
1515
"${PROJECTM_EXPORT_HEADER}"
1616
"${CMAKE_CURRENT_BINARY_DIR}/include/projectM-4/version.h"
17-
include/projectM-4/audio.h
18-
include/projectM-4/callbacks.h
19-
include/projectM-4/core.h
20-
include/projectM-4/debug.h
21-
include/projectM-4/logging.h
22-
include/projectM-4/memory.h
23-
include/projectM-4/parameters.h
24-
include/projectM-4/projectM.h
25-
include/projectM-4/render_opengl.h
26-
include/projectM-4/touch.h
27-
include/projectM-4/types.h
28-
include/projectM-4/user_sprites.h
17+
"${CMAKE_CURRENT_SOURCE_DIR}/include/projectM-4/audio.h"
18+
"${CMAKE_CURRENT_SOURCE_DIR}/include/projectM-4/callbacks.h"
19+
"${CMAKE_CURRENT_SOURCE_DIR}/include/projectM-4/core.h"
20+
"${CMAKE_CURRENT_SOURCE_DIR}/include/projectM-4/debug.h"
21+
"${CMAKE_CURRENT_SOURCE_DIR}/include/projectM-4/logging.h"
22+
"${CMAKE_CURRENT_SOURCE_DIR}/include/projectM-4/memory.h"
23+
"${CMAKE_CURRENT_SOURCE_DIR}/include/projectM-4/parameters.h"
24+
"${CMAKE_CURRENT_SOURCE_DIR}/include/projectM-4/projectM.h"
25+
"${CMAKE_CURRENT_SOURCE_DIR}/include/projectM-4/render_opengl.h"
26+
"${CMAKE_CURRENT_SOURCE_DIR}/include/projectM-4/touch.h"
27+
"${CMAKE_CURRENT_SOURCE_DIR}/include/projectM-4/types.h"
28+
"${CMAKE_CURRENT_SOURCE_DIR}/include/projectM-4/user_sprites.h"
2929
)
3030

3131
if(ENABLE_CXX_INTERFACE)

src/libprojectM/CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,24 @@ if(BUILD_SHARED_LIBS)
110110
)
111111

112112
if(ENABLE_MACOS_FRAMEWORK)
113+
# Start with C API headers
114+
set(_framework_public_headers ${PROJECTM_PUBLIC_HEADERS})
115+
116+
# Add C++ headers when the C++ interface is enabled
117+
if(ENABLE_CXX_INTERFACE)
118+
list(APPEND _framework_public_headers
119+
"${CMAKE_CURRENT_SOURCE_DIR}/Audio/PCM.hpp"
120+
"${CMAKE_CURRENT_SOURCE_DIR}/ProjectM.hpp"
121+
)
122+
endif()
123+
113124
set_target_properties(projectM PROPERTIES
114125
FRAMEWORK TRUE
115126
FRAMEWORK_VERSION A
116127
MACOSX_FRAMEWORK_IDENTIFIER com.github.projectm-visualizer.projectM
117128
MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${PROJECT_VERSION}"
118129
MACOSX_FRAMEWORK_BUNDLE_VERSION "${PROJECT_VERSION}"
119-
PUBLIC_HEADER "${PROJECTM_PUBLIC_HEADERS}"
130+
PUBLIC_HEADER "${_framework_public_headers}"
120131
)
121132
endif()
122133
else()

0 commit comments

Comments
 (0)