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

CMake install() changes, static linking build, mark directories with fs::path{} #65822

Merged
merged 19 commits into from
Jun 17, 2023

Conversation

alef
Copy link
Contributor

@alef alef commented May 23, 2023

Summary

None

Purpose of change

Changes how CMake and some code handle paths.
Edit: Not fixing problems here. It is more about expanding what configurations can be build through CMake definitions: extended explanations on task list below.

Describe the solution

  • Use CMake's TYPE install paths. It could be useful in future for creating packages or installers
  • Build static without VCPKG on Ubuntu (see notes below)
  • Use pkg-config where possible. This allows to discover static library files in Ubuntu which are not by packages' own .cmake config files
  • C++17: Change some path handling functions. Try avoid handling post '/' '\\' manually by just appending fs::path{}
  • Maybe fix Compilation failed on Windows with MSVC and vcpkg - sdl2-mixer dependency is not being installed #64619 ?

Describe alternatives you've considered

A non-dynamic executable cannot really be built as in VCPKG, because not all requirements are there. It reduces anyway the dynamic dependencies.

Testing

  • Built and run on VS 2019 and VS 2022
  • Built via vscode on WSL2/Docker Ubuntu image
    Can't get SDL/TILES to run via WSL2's pulseaudio/CygwinX/Wayland transports.

Additional context

Will start with draft PR, responding to C/I issues

@alef alef changed the title Cmake install CMake install May 23, 2023
@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Code: Build Issues regarding different builds and build environments Translation I18n labels May 23, 2023
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels May 23, 2023
@andrei8l
Copy link
Contributor

Why does the CMake definition need so much maintenance work? Or rather, what problem does this PR solve?

@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label May 24, 2023
@alef
Copy link
Contributor Author

alef commented May 24, 2023

Why does the CMake definition need so much maintenance work? Or rather, what problem does this PR solve?

I have expanded a bit the PR text, hope it answer your questions.

@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions and removed astyled astyled PR, label is assigned by github actions labels May 25, 2023
@alef alef force-pushed the cmake-install branch from e049d88 to c534ed4 Compare May 26, 2023 19:02
@github-actions github-actions bot added the <Bugfix> This is a fix for a bug (or closes open issue) label May 26, 2023
@alef alef changed the title CMake install CMake install() changes, static linking build, mark directories with fs::path{} May 27, 2023
@alef alef marked this pull request as ready for review May 27, 2023 19:42
@alef
Copy link
Contributor Author

alef commented May 27, 2023

Clang-tidy fails in code this PR did not changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Translation I18n
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compilation failed on Windows with MSVC and vcpkg - sdl2-mixer dependency is not being installed
3 participants