asrob-uc3m / asrob-uc3m/robotDevastation
SDL_MAIN_HANDLED vs CMake target property
- Dominant language
- C++
- Stars
- 9
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
We need to define a `SDL_MAIN_HANDLED` on executable targets in order to make them work on Windows: https://github.com/asrob-uc3m/robotDevastation/commit/9e36c06061b7d4da9b8a3d8ebf9038904f3649cf. I just found today [this answer in the CMake FAQ](https://gitlab.kitware.com/cmake/community/wikis/FAQ#why-am-i-getting-a-linker-error-to-_maincrtstartup-under-win32) that could render useful here: the [`WIN32_EXECUTABLE` property target](https://cmake.org/cmake/help/latest/prop_tgt/WIN32_EXECUTABLE.html) which can be set through `add_executable( WIN32 ...)` ([docs](https://cmake.org/cmake/help/latest/command/add_executable.html)).
Contributor guide
Assessment
This issue has not been assessed yet.