From my understanding your change will use GLVND on my system. Wouldn't this make bug hunting a bit more complicated, because some bugs may appear on systems using the legacy GL driver but not on systems using GLVND libraries?
Anyway, i have removed the linker flags bit by bit (from right to left), removed the /build directory after each remove and compiled again. The result is:
if("${OpenGL_GL_PREFERENCE}" STREQUAL "GLVND")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lGL")
message(STATUS "Adding linker flags for GLVND.")
endif()
Removing this last flag (commenting tho whole block) produces the linker errors:
[ 98%] Building CXX object src/economy/test/CMakeFiles/test_economy.dir/test_road.cc.o
/usr/bin/ld: graphic/libgraphic_gl_utils.a(initialize.cc.o): undefined reference to symbol 'glDrawBuffer'
/usr/bin/ld: /usr/lib/libGL.so.1: error adding symbols: DSO missing from command line
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [src/CMakeFiles/widelands.dir/build.make:441: src/widelands] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:1217: src/CMakeFiles/widelands.dir/all] Fehler 2
make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....
[ 98%] Building CXX object src/economy/test/CMakeFiles/test_economy.dir/test_routing.cc.o
[ 99%] Linking CXX executable test_io_filesystem
/usr/bin/ld: ../../../graphic/libgraphic_gl_utils.a(initialize.cc.o): undefined reference to symbol 'glDrawBuffer'
/usr/bin/ld: /usr/lib/libGL.so.1: error adding symbols: DSO missing from command line
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [src/io/filesystem/test/CMakeFiles/test_io_filesystem.dir/build.make:455: src/io/filesystem/test/test_io_filesystem] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:14128: src/io/filesystem/test/CMakeFiles/test_io_filesystem.dir/all] Fehler 2
[ 99%] Linking CXX executable test_economy
/usr/bin/ld: ../../graphic/libgraphic_gl_utils.a(initialize.cc.o): undefined reference to symbol 'glDrawBuffer'
/usr/bin/ld: /usr/lib/libGL.so.1: error adding symbols: DSO missing from command line
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [src/economy/test/CMakeFiles/test_economy.dir/build.make:472: src/economy/test/test_economy] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:5808: src/economy/test/CMakeFiles/test_economy.dir/all] Fehler 2
make: *** [Makefile:141: all] Fehler 2
mv: der Aufruf von stat für 'src/widelands' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
mv: der Aufruf von stat für '../build/src/website/wl_map_object_info' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
mv: der Aufruf von stat für '../build/src/website/wl_map_info' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
From my understanding your change will use GLVND on my system. Wouldn't this make bug hunting a bit more complicated, because some bugs may appear on systems using the legacy GL driver but not on systems using GLVND libraries?
Anyway, i have removed the linker flags bit by bit (from right to left), removed the /build directory after each remove and compiled again. The result is:
if("${OpenGL_ GL_PREFERENCE} " STREQUAL "GLVND") EXE_LINKER_ FLAGS "${CMAKE_ EXE_LINKER_ FLAGS} -lGL")
set (CMAKE_
message(STATUS "Adding linker flags for GLVND.")
endif()
Removing this last flag (commenting tho whole block) produces the linker errors:
[ 98%] Building CXX object src/economy/ test/CMakeFiles /test_economy. dir/test_ road.cc. o libgraphic_ gl_utils. a(initialize. cc.o): undefined reference to symbol 'glDrawBuffer' libGL.so. 1: error adding symbols: DSO missing from command line /widelands. dir/build. make:441: src/widelands] Fehler 1 Makefile2: 1217: src/CMakeFiles/ widelands. dir/all] Fehler 2 test/CMakeFiles /test_economy. dir/test_ routing. cc.o ./graphic/ libgraphic_ gl_utils. a(initialize. cc.o): undefined reference to symbol 'glDrawBuffer' libGL.so. 1: error adding symbols: DSO missing from command line filesystem/ test/CMakeFiles /test_io_ filesystem. dir/build. make:455: src/io/ filesystem/ test/test_ io_filesystem] Fehler 1 Makefile2: 14128: src/io/ filesystem/ test/CMakeFiles /test_io_ filesystem. dir/all] Fehler 2 libgraphic_ gl_utils. a(initialize. cc.o): undefined reference to symbol 'glDrawBuffer' libGL.so. 1: error adding symbols: DSO missing from command line test/CMakeFiles /test_economy. dir/build. make:472: src/economy/ test/test_ economy] Fehler 1 Makefile2: 5808: src/economy/ test/CMakeFiles /test_economy. dir/all] Fehler 2 src/website/ wl_map_ object_ info' ist nicht möglich: Datei oder Verzeichnis nicht gefunden src/website/ wl_map_ info' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
/usr/bin/ld: graphic/
/usr/bin/ld: /usr/lib/
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [src/CMakeFiles
make[1]: *** [CMakeFiles/
make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....
[ 98%] Building CXX object src/economy/
[ 99%] Linking CXX executable test_io_filesystem
/usr/bin/ld: ../../.
/usr/bin/ld: /usr/lib/
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [src/io/
make[1]: *** [CMakeFiles/
[ 99%] Linking CXX executable test_economy
/usr/bin/ld: ../../graphic/
/usr/bin/ld: /usr/lib/
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [src/economy/
make[1]: *** [CMakeFiles/
make: *** [Makefile:141: all] Fehler 2
mv: der Aufruf von stat für 'src/widelands' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
mv: der Aufruf von stat für '../build/
mv: der Aufruf von stat für '../build/