Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernise Dependency CMake #101

Open
ptheywood opened this issue Aug 19, 2022 · 0 comments
Open

Modernise Dependency CMake #101

ptheywood opened this issue Aug 19, 2022 · 0 comments
Labels

Comments

@ptheywood
Copy link
Member

The visualiser CMake has not been "modernised" to make heavy use of targets and aliased targets like in the main repository, but it would be a nice improvment if this were the case.

I.e. For non-native CMake projects such as SDL2, rather than just defineing variables such as SDL2_INCLUDE_DIRS we should instead define a target SDL2 which has the include dir and liker requirements set appropraitely.

Adding an alias target SDL2::SDL2 etc then makes targets appropriately namespaced.

Then, rather than specifying target_include_directories(SDL2_INCLUDE_DIRS) or similar, and teh matching target_link_libraries(SDL2_LINK_LIBRARIES) command just target_link_libraries(SDL2::SDL2) would suffice.

For the main repo, this was done as part of FLAMEGPU/FLAMEGPU2#661, with cmake/dependencies/Tinyxml2.cmake being a specific example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant