I\'m using CMake for a project that comes in two versions, one of which requires -lglapi and the other does not.
So far the lines we used look like that:
Try to do this instead:
if(SINGLE_MODE) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lglapi") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lglapi") endif(SINGLE_MODE)
Then, you are sure you append -lglapi to the existing ${CMAKE_CXX_FLAGS} string. Else, looks like something like a CMake list is being created.
-lglapi
${CMAKE_CXX_FLAGS}