Fix cmake warnings due to LINK_INTERFACE_LIBRARIES, use PUBLIC/PRIVATE instead.

This commit is contained in:
David Faure 2013-11-10 20:45:23 +01:00
parent 71e40e7c60
commit 57ff76150e

View file

@ -50,13 +50,12 @@ macro( KWIN4_ADD_GLUTILS_BACKEND name glinclude )
include_directories(${OPENGLES_EGL_INCLUDE_DIR})
endif()
kde4_add_library(${name} SHARED ${kwin_GLUTILSLIB_SRCS})
target_link_libraries(${name} ${kwineffects_QT_LIBS} ${kwineffects_XCB_LIBS} kwineffects)
target_link_libraries(${name} PUBLIC ${kwineffects_QT_LIBS} ${kwineffects_XCB_LIBS} kwineffects)
if(OPENGL_EGL_FOUND)
target_link_libraries(${name} ${OPENGLES_EGL_LIBRARY})
target_link_libraries(${name} PRIVATE ${OPENGLES_EGL_LIBRARY})
endif()
set_target_properties(${name} PROPERTIES VERSION 1.0.0 SOVERSION 1 )
target_link_libraries(${name} ${ARGN})
target_link_libraries(${name} LINK_INTERFACE_LIBRARIES ${ARGN})
target_link_libraries(${name} PUBLIC ${ARGN})
install(TARGETS ${name} EXPORT kdeworkspaceLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
endmacro()
@ -74,12 +73,11 @@ if(KWIN_BUILD_OPENGL)
set_target_properties(kwinglutils PROPERTIES COMPILE_FLAGS -DKWIN_HAVE_OPENGL_1)
endif()
target_link_libraries(kwinglutils ${OPENGL_gl_LIBRARY})
target_link_libraries(kwinglutils LINK_INTERFACE_LIBRARIES ${OPENGL_gl_LIBRARY})
target_link_libraries(kwinglutils PUBLIC ${OPENGL_gl_LIBRARY})
# -ldl used by OpenGL code
find_library(DL_LIBRARY dl)
if (DL_LIBRARY)
target_link_libraries(kwinglutils ${DL_LIBRARY})
target_link_libraries(kwinglutils PRIVATE ${DL_LIBRARY})
endif()
endif()