diff --git a/kcmkwin/kwincompositing/CMakeLists.txt b/kcmkwin/kwincompositing/CMakeLists.txt index 57d77506d5..be97b0bd98 100644 --- a/kcmkwin/kwincompositing/CMakeLists.txt +++ b/kcmkwin/kwincompositing/CMakeLists.txt @@ -19,7 +19,8 @@ install(TARGETS kcm_kwincompositing DESTINATION ${PLUGIN_INSTALL_DIR} ) # CompositingPrefs uses OpenGL if(OPENGL_FOUND AND NOT KWIN_HAVE_OPENGLES_COMPOSITING) - target_link_libraries(kcm_kwincompositing ${OPENGL_gl_LIBRARY}) + target_link_libraries(kcm_kwincompositing kwinglutils ${OPENGL_gl_LIBRARY}) + set_target_properties(kcm_kwincompositing PROPERTIES COMPILE_FLAGS -DKWIN_HAVE_OPENGL) # -ldl used by OpenGL code find_library(DL_LIBRARY dl) if (DL_LIBRARY) @@ -27,7 +28,8 @@ if(OPENGL_FOUND AND NOT KWIN_HAVE_OPENGLES_COMPOSITING) endif(DL_LIBRARY) endif(OPENGL_FOUND AND NOT KWIN_HAVE_OPENGLES_COMPOSITING) if(KWIN_HAVE_OPENGLES_COMPOSITING) - target_link_libraries(kcm_kwincompositing ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES}) + target_link_libraries(kcm_kwincompositing kwinglesutils ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES}) + set_target_properties(kcm_kwincompositing PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") endif(KWIN_HAVE_OPENGLES_COMPOSITING) if (X11_Xrender_FOUND) target_link_libraries(kcm_kwincompositing ${X11_Xrender_LIB}) diff --git a/kcmkwin/kwinscreenedges/CMakeLists.txt b/kcmkwin/kwinscreenedges/CMakeLists.txt index 94e841c2c7..685eed18bb 100644 --- a/kcmkwin/kwinscreenedges/CMakeLists.txt +++ b/kcmkwin/kwinscreenedges/CMakeLists.txt @@ -15,7 +15,8 @@ install( TARGETS kcm_kwinscreenedges DESTINATION ${PLUGIN_INSTALL_DIR} ) # CompositingPrefs uses OpenGL if( OPENGL_FOUND AND NOT KWIN_HAVE_OPENGLES_COMPOSITING ) - target_link_libraries( kcm_kwinscreenedges ${OPENGL_gl_LIBRARY} ) + target_link_libraries( kcm_kwinscreenedges kwinglutils ${OPENGL_gl_LIBRARY} ) + set_target_properties(kcm_kwinscreenedges PROPERTIES COMPILE_FLAGS -DKWIN_HAVE_OPENGL) # -ldl used by OpenGL code find_library( DL_LIBRARY dl ) if( DL_LIBRARY ) @@ -23,7 +24,8 @@ if( OPENGL_FOUND AND NOT KWIN_HAVE_OPENGLES_COMPOSITING ) endif( DL_LIBRARY ) endif( OPENGL_FOUND AND NOT KWIN_HAVE_OPENGLES_COMPOSITING ) if(KWIN_HAVE_OPENGLES_COMPOSITING) - target_link_libraries(kcm_kwinscreenedges ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES}) + target_link_libraries(kcm_kwinscreenedges kwinglesutils ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES}) + set_target_properties(kcm_kwinscreenedges PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") endif(KWIN_HAVE_OPENGLES_COMPOSITING) if( X11_Xrender_FOUND ) target_link_libraries( kcm_kwinscreenedges ${X11_Xrender_LIB} )