Skip to content

CMake init#543

Closed
SamuelMarks wants to merge 1 commit into
floooh:masterfrom
SamuelMarks:cmake
Closed

CMake init#543
SamuelMarks wants to merge 1 commit into
floooh:masterfrom
SamuelMarks:cmake

Conversation

@SamuelMarks

Copy link
Copy Markdown

Related #496 (comment)

Not sure how you want to handle this? - Maybe configurable packages where you can use -D to select a different backend for your target?

(assuming you even want CMake integration)

@floooh

floooh commented Aug 3, 2021

Copy link
Copy Markdown
Owner

Thanks for the PR, but I'd like to keep any build system files out of the sokol repository. The comment was aimed specifically at the beef bindings, because beef doesn't seem to come with a way to build C libraries without external tooling support.

@SamuelMarks

Copy link
Copy Markdown
Author

Okay but how about for integration with package managers like vcpkg?

There are plenty of complexities to consider, and I'm trying to derive a simplification for use by package managers.

So on starting a new project:

  1. Specify target OS (e.g., iOS, Android, WASM, macOS, Linux, and Windows)
  2. Add additional dependencies (e.g., libcurl)
  3. Configure
  4. Build
  5. Test
  6. Package

Now the question is how can this workflow be simplified?

Ideas for sokol:

  • Integration with vcpkg (or similar, like conan or clibs)
  • Integration directly with CMake (or similar), e.g., using file(DOWNLOAD with the specific headers from this repo
  • Integration with OS-specific package managers (apt, yum, dnf, MSI-based ones, brew, &etc.)

Being able to choose which backend is important, e.g., imgui or nuklear.

What are your thoughts?

@floooh

floooh commented Aug 6, 2021

Copy link
Copy Markdown
Owner

Support for specific build systems and package managers should be handled outside the main repository in separate repositories similar to the langauge bindings (e.g. https://github.com/floooh/sokol-zig). Those separate repositories can either contain snapshots of the sokol headers (like here: https://github.com/floooh/sokol-zig/tree/master/src/sokol/c), or if it makes more sense, can include the sokol repository as a git submodule (whatever makes more sense for the specific build system or package manager).

I've done similar "out-of-source" build system repositories here for various projects and fips+cmake:

...etc... that way I didn't have to pitch fips to the library maintainers for inclusion in the main repository for instance.

@SamuelMarks

Copy link
Copy Markdown
Author

fips looks pretty cool (I hadn't heard of this project of yours).

Will give it a shot. Perhaps it solves the missing 'quick-start' for sokol…

@SamuelMarks SamuelMarks closed this Aug 6, 2021
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