Build order for -lGL does not work for openSUSE Tumbleweed

Bug #1836107 reported by Dirk Stöcker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Undecided
kaputtnik

Bug Description

For openSUSE tumbleweed build20 does work as -lGL can't be linked. Simple fix is to add link libraries with proper function instead of simply adding them to flags:

diff -ur widelands-build20/CMakeLists.txt widelands-build20_fix/CMakeLists.txt
--- widelands-build20/CMakeLists.txt 2019-05-02 07:23:39.000000000 +0200
+++ widelands-build20_fix/CMakeLists.txt 2019-07-10 21:43:46.945029296 +0200
@@ -181,7 +181,7 @@

 # This is set to avoid linker errors when using GLVND-libs on Linux
 if("${OpenGL_GL_PREFERENCE}" STREQUAL "GLVND")
- set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lGL")
+ link_libraries("GL")
    add_compile_definitions(WL_USE_GLVND)
    message(STATUS "Adding linker flags for GLVND.")
 endif()

Related branches

Revision history for this message
kaputtnik (franku) wrote :

Just made a branch and compiled with no problems. So i think it's sufficient :-)

kaputtnik (franku)
Changed in widelands:
milestone: none → build21-rc1
assignee: nobody → kaputtnik (franku)
Revision history for this message
kaputtnik (franku) wrote :

should be fixed now.

Thanks for reporting and the fix :-)

Changed in widelands:
status: New → Fix Committed
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.