Skip to content

CMake support#37

Closed
FtZPetruska wants to merge 5 commits intolibsdl-org:mainfrom
FtZPetruska:cmake
Closed

CMake support#37
FtZPetruska wants to merge 5 commits intolibsdl-org:mainfrom
FtZPetruska:cmake

Conversation

@FtZPetruska
Copy link
Copy Markdown
Contributor

Description

  • Adding a basic CMake support
  • Based on SDL_ttf's implementation
  • Exports the libraries in the SDL2_net namespace
  • Option to build showinterfaces (off by default)
  • Tested on Windows 10, WSL2 and macOS (x64 only)
  • Works with SDL2 2.0.10 and above (relies on SDL2 namespace being available)
  • Additionally, the existing .hgignore was moved into a .gitignore and platform-specific rules were added.

Existing Issue

#33

Platform-specific ignore rules were added based on SDL:main's rules.
Added wsock32, ws2_32 and iphlpapi to library build.
Added SDL2main to showinterfaces build.
@FtZPetruska
Copy link
Copy Markdown
Contributor Author

Before merging, I wanted to mention that I was not sure if the INTERFACE_AGE and BINARY_AGE have the correct value.
Currently they are set as such:

  set(SDL_NET_INTERFACE_AGE 1)
  set(SDL_NET_BINARY_AGE 1)

Workflows were added for Windows (x64, x86, AMR64), macOS and Linux.
Uses `vcpkg` to install the SDL2 dependency on all platforms.
Fixed CMakeLists to always use SDL2::SDL2 target on Windows.
@FtZPetruska FtZPetruska closed this May 9, 2022
@slouken
Copy link
Copy Markdown
Collaborator

slouken commented May 9, 2022

Why was this closed?

@FtZPetruska
Copy link
Copy Markdown
Contributor Author

I was cleaning some forks I had on my account and I guess it closed it.

Although looking back at it, it would have needed more changes and would conflict with the newly added workflows.

Apologies for the inconvenience.

@slouken
Copy link
Copy Markdown
Collaborator

slouken commented May 10, 2022

Okay, feel free to reopen and update if desired.

@FtZPetruska FtZPetruska mentioned this pull request May 29, 2022
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