From f18bd0b02d747b2305548b37ad0d5d5cac3a440e Mon Sep 17 00:00:00 2001 From: Harri Porten Date: Thu, 10 May 2007 11:35:45 +0000 Subject: [PATCH] Patch by Frerich to fix linking for poor BSD users. This cries out to a CMake expert for a configure check. svn path=/trunk/KDE/kdebase/workspace/; revision=663171 --- CMakeLists.txt | 4 +++- lib/CMakeLists.txt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 055622cead..d9c146f4b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,7 +68,9 @@ target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} kdecorations kwineffects if(OPENGL_FOUND) target_link_libraries(kdeinit_kwin ${OPENGL_gl_LIBRARY}) # -ldl used by OpenGL code - target_link_libraries(kdeinit_kwin -ldl) + if(NOT CMAKE_SYSTEM_NAME MATCHES BSD) + target_link_libraries(kdeinit_kwin -ldl) + endif(NOT CMAKE_SYSTEM_NAME MATCHES BSD) endif(OPENGL_FOUND) if (X11_Xrandr_FOUND) target_link_libraries(kdeinit_kwin ${X11_Xrandr_LIB}) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index ec44e3035a..0a240bc6b7 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -40,7 +40,9 @@ install(TARGETS kwineffects DESTINATION ${LIB_INSTALL_DIR}) if(OPENGL_FOUND) target_link_libraries(kwineffects ${OPENGL_gl_LIBRARY}) # -ldl used by OpenGL code - target_link_libraries(kwineffects -ldl) + if(NOT CMAKE_SYSTEM_NAME MATCHES BSD) + target_link_libraries(kwineffects -ldl) + endif(NOT CMAKE_SYSTEM_NAME MATCHES BSD) endif(OPENGL_FOUND) install( FILES kwinglobals.h kwineffects.h kwinglutils.h kwinglutils_funcs.h DESTINATION ${INCLUDE_INSTALL_DIR})