Skip to content

Conversation

@sweet-niamhy
Copy link

@sweet-niamhy sweet-niamhy commented Sep 29, 2025

Description

  • Added the glm.cppm file to the public CXX_MODULES fileset for the glm target in order to make the glm module available to projects.
  • The cppm file was originally authored here but no guidance was given for using it in a project.

This has been mentioned in an issue #1372 and in the comment #1208 (comment) so this would enable resolving of those issues.

@sweet-niamhy sweet-niamhy marked this pull request as ready for review September 29, 2025 00:54
@Diyou
Copy link

Diyou commented Oct 17, 2025

Wouldn't an intermediate target work for both glm and glm-header-only ?
Like:

add_library(glm-miu STATIC)
target_sources(glm-miu
	PUBLIC
	FILE_SET CXX_MODULES
	BASE_DIRS .
	FILES glm.cppm
)
target_link_libraries(glm-header-only INTERFACE glm-miu)

@sweet-niamhy
Copy link
Author

Wouldn't an intermediate target work for both glm and glm-header-only ? Like:

add_library(glm-miu STATIC)
target_sources(glm-miu
	PUBLIC
	FILE_SET CXX_MODULES
	BASE_DIRS .
	FILES glm.cppm
)
target_link_libraries(glm-header-only INTERFACE glm-miu)

I tested this out and it works with GLM_BUILD_LIBRARY on and off. Thanks!

@sweet-niamhy sweet-niamhy marked this pull request as draft November 13, 2025 03:38
@sweet-niamhy
Copy link
Author

I might need to work on this a while as I'm seeing some issues with different options enabled. I don't have a lot of spare time lately but will try to putter around!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants