Skip to content

CMake: Linux->Linux(non-static), Windows(MinGW)->Windows#135

Open
trustytrojan wants to merge 17 commits intoneomodnet:masterfrom
trustytrojan:cmake
Open

CMake: Linux->Linux(non-static), Windows(MinGW)->Windows#135
trustytrojan wants to merge 17 commits intoneomodnet:masterfrom
trustytrojan:cmake

Conversation

@trustytrojan
Copy link

@trustytrojan trustytrojan commented Sep 13, 2025

  • Adding another build system option, not replacing autotools
    • It is able to build on Linux for Linux, and on Windows with MinGW for Windows
    • The added CMake files are under a build-contrib folder as to not be confused with the cmake-win system for MSVC
  • Helps for Windows to Windows builds when you don't want a VS installation on your system
  • Due to CMake quirks I'm not gonna bother making an as-static-as-possible Linux build. How static it ends up depends on how many dependencies you have installed system-wide (same as --enable-system-deps with autotools)
  • Configure command: cmake -Sbuild-contrib -Bbuild
  • Build command: cmake --build build --parallel

@trustytrojan trustytrojan changed the title CMake for Linux (and eventually Windows non-MSVC) CMake: Linux->Linux(non-static), Windows(MinGW)->Windows Sep 15, 2025
@trustytrojan trustytrojan marked this pull request as ready for review September 15, 2025 14:41
@kiwec
Copy link
Collaborator

kiwec commented Sep 30, 2025

This changes files in cmake-win/ and src/, is that needed for it to work?

@trustytrojan
Copy link
Author

The *_LINUX_URL variables in dependencies.cmake, yes, for Linux builds. The if(WIN32) in binclude.cmake, most likely, because I'm not sure what would happen if you tell the assembler to make a "win64" object on Linux. Regardless, this isn't affecting the MSVC build as WIN32 is always true on Windows.

whrvt added a commit that referenced this pull request Oct 17, 2025
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