From 8584104bf01228fcd40ca0c4d1cee8dbdbe1700b Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Sat, 6 Aug 2011 09:29:20 -0400 Subject: [PATCH] Improve Find OpenGLES.cmake a bit by only setting the FOUND varaible if both the GLES and EGL libs and headers are found. Fold all the includes and libraries into 1 varaible each and use those. in other words, you need to have both OpenGLES and EGL to do a successful build. --- CMakeLists.txt | 4 ++-- kcmkwin/kwincompositing/CMakeLists.txt | 2 +- kcmkwin/kwinscreenedges/CMakeLists.txt | 2 +- libkwineffects/CMakeLists.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 56d6130819..9f9e808668 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -261,7 +261,7 @@ if(OPENGL_FOUND) # must be after opengl, to be initialized first by the linker target_link_libraries(kdeinit_kwin kwinnvidiahack) elseif(OPENGLES_FOUND) - target_link_libraries(kdeinit_kwin ${kwinLibs} kwinglesutils ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES}) + target_link_libraries(kdeinit_kwin ${kwinLibs} kwinglesutils ${OPENGLES_LIBRARIES}) set_target_properties(kdeinit_kwin PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") endif(OPENGL_FOUND) @@ -270,7 +270,7 @@ install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} ) if(OPENGLES_FOUND) kde4_add_kdeinit_executable( kwin_gles ${kwin_KDEINIT_SRCS}) - target_link_libraries(kdeinit_kwin_gles ${kwinLibs} kwinglesutils ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES}) + target_link_libraries(kdeinit_kwin_gles ${kwinLibs} kwinglesutils ${OPENGLES_LIBRARIES}) set_target_properties(kdeinit_kwin_gles PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") install(TARGETS kdeinit_kwin_gles ${INSTALL_TARGETS_DEFAULT_ARGS} ) install(TARGETS kwin_gles ${INSTALL_TARGETS_DEFAULT_ARGS} ) diff --git a/kcmkwin/kwincompositing/CMakeLists.txt b/kcmkwin/kwincompositing/CMakeLists.txt index be97b0bd98..2d420c0694 100644 --- a/kcmkwin/kwincompositing/CMakeLists.txt +++ b/kcmkwin/kwincompositing/CMakeLists.txt @@ -28,7 +28,7 @@ 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 kwinglesutils ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES}) + target_link_libraries(kcm_kwincompositing kwinglesutils ${OPENGLES_LIBRARIES}) set_target_properties(kcm_kwincompositing PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") endif(KWIN_HAVE_OPENGLES_COMPOSITING) if (X11_Xrender_FOUND) diff --git a/kcmkwin/kwinscreenedges/CMakeLists.txt b/kcmkwin/kwinscreenedges/CMakeLists.txt index 685eed18bb..282735087b 100644 --- a/kcmkwin/kwinscreenedges/CMakeLists.txt +++ b/kcmkwin/kwinscreenedges/CMakeLists.txt @@ -24,7 +24,7 @@ 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 kwinglesutils ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES}) + target_link_libraries(kcm_kwinscreenedges kwinglesutils ${OPENGLES_LIBRARIES}) set_target_properties(kcm_kwinscreenedges PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") endif(KWIN_HAVE_OPENGLES_COMPOSITING) if( X11_Xrender_FOUND ) diff --git a/libkwineffects/CMakeLists.txt b/libkwineffects/CMakeLists.txt index 9c3a79ce0f..23e9220f9e 100644 --- a/libkwineffects/CMakeLists.txt +++ b/libkwineffects/CMakeLists.txt @@ -35,7 +35,7 @@ if(OPENGL_FOUND OR OPENGLES_FOUND) endmacro( KWIN4_ADD_GLUTILS_BACKEND ) if(OPENGLES_FOUND) - KWIN4_ADD_GLUTILS_BACKEND(kwinglesutils ${OPENGLES_INCLUDE_DIR} ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES}) + KWIN4_ADD_GLUTILS_BACKEND(kwinglesutils ${OPENGLES_INCLUDE_DIR} ${OPENGLES_LIBRARIES}) set_target_properties(kwinglesutils PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") endif(OPENGLES_FOUND) if(OPENGL_FOUND)