From c4bc5a8f0eeacbebb50a2ef79c7b03b64586475a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20=C3=85strand=20=28astrand=29?= Date: Tue, 10 Feb 2015 12:21:05 +0100 Subject: [PATCH] Build fixes for modern versions of binutils. Need to explicitly list DSOs. --- CMakeLists.txt | 3 +++ cmake/StaticBuild.cmake | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3091d7b2..5ecd89e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,6 +226,9 @@ if(UNIX AND NOT APPLE) if(X11_Xcursor_FOUND) set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xcursor_LIB}) endif() + if(X11_Xrender_FOUND) + set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xrender_LIB}) + endif() endif() if(FLTK_FOUND) diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index 49706bd3..1ac4f6e3 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -75,12 +75,12 @@ if(BUILD_STATIC) elseif(APPLE) set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -framework Cocoa") else() - set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -lm") + set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -lm -ldl") endif() if(X11_FOUND AND NOT APPLE) if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") - set(FLTK_LIBRARIES "${FLTK_LIBRARIES} ${X11_Xcursor_LIB} ${X11_Xfixes_LIB} -Wl,-Bstatic -lXft -Wl,-Bdynamic -lfontconfig -lXext -R/usr/sfw/lib") + set(FLTK_LIBRARIES "${FLTK_LIBRARIES} ${X11_Xcursor_LIB} ${X11_Xfixes_LIB} -Wl,-Bstatic -lXft -Wl,-Bdynamic -lfontconfig -lXrender -lXext -R/usr/sfw/lib -L=/usr/sfw/lib -lfreetype -lsocket -lnsl") else() set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -Wl,-Bstatic -lXcursor -lXfixes -lXft -lfontconfig -lexpat -lfreetype -lbz2 -lXrender -lXext -lXinerama -Wl,-Bdynamic") endif() -- 2.39.5