opengl - CMake sucessful, resulting makefile error -


this follow-up question 1 asked previously, if pleases may found here. summarize, have been trying understand build process linking necessary libraries opengl. aware there boilerplates , other methods make process easier; interested in being able autonomously.

my issue although cmake sucessfully processes cmakelists.txt file, resulting makefile throws error. if helpful, file structure contextualized here:

+ infuriating_project     + bin // post compile results     + src // humble code     + deps // external code         +glew             + include             + src         +glfw             + include             + src         +glm         +soil             + lib             + src 

here contents of cmakelists.txt file:

cmake_minimum_required (version 3.0)  # version information --------------------------------------------------------- project (opengl-practice) set (version_major 1) set (version_minor 0) set (version_feature 0) set (version_patch 0) set (version "${version_major}.${version_minor}") set (version "${version}.${version_feature}.${version_patch}") message ("version: ${version}")  # configure binary directories ------------------------------------------------ set (project_binary_dir "${project_binary_dir}/bin") message ("source path: ${project_source_dir}") message ("binary path: ${project_binary_dir}")  # configure depenency directories --------------------------------------------- set (deps "${project_source_dir}/deps") message ("dependencies path: ${deps}") set (glew_inc "${deps}/glew/include/gl/") set (glew_src "${deps}/glew/src/") set (glfw_inc "${deps}/glfw/include/glfw/") set (glfw_src "${deps}/glfw/src/") set (glm "${deps}/glm/glm/") set (soil_lib "${deps}/lib/") set (soil_src "${deps}/src/")  # include directories --------------------------------------------------------- include_directories("     ${project_source_dir}     ${glew_inc}     ${glew_src}     ${glfw_inc}     ${glfw_src}     ${glm}     ${soil_lib}     ${soil_src}     ")  # add executable -------------------------------------------------------------- add_executable(main ${project_source_dir}/src/main.cpp) 

upon completion, following error when running make:

cmakefiles/main.dir/flags.make:10: *** missing separator.  stop. make[1]: *** [cmakefiles/main.dir/all] error 2 make: *** [all] error 2 

my investigations of error have led me believe there syntax error, tabs vs spaces error indicated here. sure issue on behalf, , not bug in cmake. confident there should way alter cmakelists file such issue not occur.

the makefile bit lengthy lengthy post. if helpful me upload it, can edit question information. thank in advance , or advice.

this wrong:

include_directories("     ${project_source_dir}     ${glew_inc}     ${glew_src}     ${glfw_inc}     ${glfw_src}     ${glm}     ${soil_lib}     ${soil_src}     ") 

do not quote 1 long string: cmake try provide string (including newlines) argument -i in compiler.

use:

include_directories(     ${project_source_dir}     ${glew_inc}     ${glew_src}     ${glfw_inc}     ${glfw_src}     ${glm}     ${soil_lib}     ${soil_src}     ) 

or, quote each path individually if want to.


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -