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

Compile project statically in MinGW environment #7

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

winterheart
Copy link

In order to achieve more portability int2ssl needs to compiled with -static option in MinGW environment, so all required toolchain libraries gets compiled into binary. Partially fixes #6.

Now project supports cross-compiling for Windows binaries in Linux host. To do so, pass -DCMAKE_TOOLCHAIN_FILE=/path/to/Toolchain-MinGW64.cmake on cmake configuration phase.

Also reorganized CMakeLists.txt file for more modern CMake project best practies usage:

  • -Os (optimized for size) is part of Cmake's MinSizeRel build type, so this option should'nt defined manually. Instead use -DCMAKE_BUILD_TYPE=MinSizeRel.
  • -s (strip binary option) is not true crossplatform option, so moved it into option STRIP_EXE enabled by default.
  • Minimal CMake version requirement updated to 3.13 to avoid deprecation warnings on modern cmake.

Additionally implemented GitHub Actions flows.

GCC analyzer wrongly assumes that `if(cp == NULL || c == ':')` not
guarding against `cp++`.
In order to achieve more portability int2ssl needs to compiled with
`-static` option in MinGW environment, so all required toolchain
libraries gets compiled into binary. Partially fixes falltergeist#6.

Now project supports cross-compiling for Windows binaries in Linux host.
To do so, pass `-DCMAKE_TOOLCHAIN_FILE=/path/to/Toolchain-MinGW64.cmake`
on cmake configuration phase.

Also reorganized CMakeLists.txt file for more modern CMake project best
practies usage:
* -Os (optimized for size) is part of Cmake's MinSizeRel build type, so
  this option should'nt defined manually. Instead use
  `-DCMAKE_BUILD_TYPE=MinSizeRel`.
* -s (strip binary option) is not true crossplatform option, so moved it
  into option STRIP_EXE enabled by default.
* Minimal CMake version requirement updated to 3.13 to avoid deprecation
  warnings on modern cmake.
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.

exe fails in windows 10
1 participant