halley icon indicating copy to clipboard operation
halley copied to clipboard

Update the wiki's `CMakeLists.txt` template

Open douglaslassance opened this issue 4 years ago • 1 comments

I don't think you can submit GitHub wiki changes so I guess that's the best alternative. The CMakeLists.txt template provided in the wiki ends with:

halleyProject(project_name "${SOURCES}" "${HEADERS}" "" ${CMAKE_CURRENT_SOURCE_DIR}/bin)

This actually results in building with the following error:

[build] [1/1   0% :: 0.000] Re-running CMake...
[build] CMake Error at CMakeLists.txt:25 (halleyProject):
[build]   halleyProject Function invoked with incorrect arguments for function named:
[build]   halleyProject
[build] 
[build] 
[build] -- Configuring incomplete, errors occurred!
[build] See also "/Users/douglaslassance/Desktop/WIP/halleygame/build/CMakeFiles/CMakeOutput.log".
[build] See also "/Users/douglaslassance/Desktop/WIP/halleygame/build/CMakeFiles/CMakeError.log".
[build] ninja: error: rebuilding 'build.ninja': subcommand failed
[build] FAILED: build.ninja 

The template should feature the missing argument as such:

halleyProject(project_name "${SOURCES}" "${HEADERS}" "" "" ${CMAKE_CURRENT_SOURCE_DIR}/bin)

douglaslassance avatar Nov 13 '21 20:11 douglaslassance

After realizing there is a template folder, I'm thinking it's probably better to remove the hardcoded CMakeLists.txt template from the wiki and mention the folder. That said the template is also missing the argument proj_sources argument.

douglaslassance avatar Nov 14 '21 19:11 douglaslassance