Better CMake detection for building ES or desktop

master
Martin Gräßlin 14 years ago committed by Martin Gräßlin
parent 6bad079628
commit d31c00ed0e

@ -32,15 +32,15 @@ endif( KWIN_HAVE_OPENGL_COMPOSITING OR KWIN_HAVE_XRENDER_COMPOSITING )
macro_log_feature(KWIN_HAVE_COMPOSITING "Compositing support" "X11 Compositing support" "http://www.x.org/" FALSE "" "XComposite and XDamage extensions and OpenGL or XRender with XFixes are required for KWin compositing support")
macro_bool_to_01( OPENGL_FOUND KWIN_HAVE_OPENGL )
macro_bool_to_01( OPENGLES_FOUND KWIN_HAVE_OPENGLES )
macro_bool_to_01( KWIN_HAVE_OPENGLES_COMPOSITING KWIN_HAVE_OPENGLES )
if(OPENGL_FOUND)
include_directories(${OPENGL_INCLUDE_DIR})
endif(OPENGL_FOUND)
if(OPENGLES_FOUND)
if(OPENGLES_FOUND AND KWIN_HAVE_OPENGLES_COMPOSITING)
include_directories(${OPENGLES_INCLUDE_DIR})
endif(OPENGLES_FOUND)
endif(OPENGLES_FOUND AND KWIN_HAVE_OPENGLES_COMPOSITING)
# for things that are also used by kwin libraries
configure_file(lib/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/lib/kwinconfig.h )
@ -160,7 +160,7 @@ kde4_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} ${QT_QTXML_LIBRARY} ${QT_QTSCRIPT_LIBRARY} kephal kworkspace kdecorations kwineffects ${X11_LIBRARIES})
if(OPENGL_FOUND AND NOT OPENGLES_FOUND)
if(OPENGL_FOUND AND NOT KWIN_HAVE_OPENGLES_COMPOSITING)
add_subdirectory(opengltest)
target_link_libraries(kdeinit_kwin ${OPENGL_gl_LIBRARY})
# -ldl used by OpenGL code
@ -170,11 +170,11 @@ if(OPENGL_FOUND AND NOT OPENGLES_FOUND)
endif(DL_LIBRARY)
# must be after opengl, to be initialized first by the linker
target_link_libraries(kdeinit_kwin kwinnvidiahack)
endif(OPENGL_FOUND AND NOT OPENGLES_FOUND)
endif(OPENGL_FOUND AND NOT KWIN_HAVE_OPENGLES_COMPOSITING)
if(OPENGLES_FOUND)
if(KWIN_HAVE_OPENGLES_COMPOSITING)
target_link_libraries(kdeinit_kwin ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES})
endif(OPENGLES_FOUND)
endif(KWIN_HAVE_OPENGLES_COMPOSITING)
if (X11_Xrandr_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xrandr_LIB})

@ -78,17 +78,17 @@ include( taskbarthumbnail/CMakeLists.txt )
include( thumbnailaside/CMakeLists.txt )
include( windowgeometry/CMakeLists.txt )
if( NOT KWIN_HAVE_OPENGLES )
if( NOT KWIN_HAVE_OPENGLES_COMPOSITING )
include( resize/CMakeLists.txt )
include( logout/CMakeLists.txt )
include( shadow/CMakeLists.txt )
include( showfps/CMakeLists.txt )
include( showpaint/CMakeLists.txt )
include( zoom/CMakeLists.txt )
endif( NOT KWIN_HAVE_OPENGLES )
endif( NOT KWIN_HAVE_OPENGLES_COMPOSITING )
# OpenGL-specific effects
if( KWIN_HAVE_OPENGL_COMPOSITING AND NOT KWIN_HAVE_OPENGLES )
if( KWIN_HAVE_OPENGL_COMPOSITING AND NOT KWIN_HAVE_OPENGLES_COMPOSITING )
include( blur/CMakeLists.txt )
include( coverswitch/CMakeLists.txt )
include( cube/CMakeLists.txt )
@ -107,7 +107,7 @@ if( KWIN_HAVE_OPENGL_COMPOSITING AND NOT KWIN_HAVE_OPENGLES )
include( startupfeedback/CMakeLists.txt )
include( trackmouse/CMakeLists.txt )
include( wobblywindows/CMakeLists.txt )
endif( KWIN_HAVE_OPENGL_COMPOSITING AND NOT KWIN_HAVE_OPENGLES )
endif( KWIN_HAVE_OPENGL_COMPOSITING AND NOT KWIN_HAVE_OPENGLES_COMPOSITING )
###############################################################################

@ -46,7 +46,7 @@ set_target_properties(kwineffects PROPERTIES VERSION 1.0.0 SOVERSION 1 )
install(TARGETS kwineffects EXPORT kdeworkspaceLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
if(OPENGL_FOUND AND NOT OPENGLES_FOUND)
if(OPENGL_FOUND AND NOT KWIN_HAVE_OPENGLES_COMPOSITING)
target_link_libraries(kwineffects ${OPENGL_gl_LIBRARY})
target_link_libraries(kwineffects LINK_INTERFACE_LIBRARIES ${OPENGL_gl_LIBRARY})
# -ldl used by OpenGL code
@ -55,7 +55,7 @@ if(OPENGL_FOUND AND NOT OPENGLES_FOUND)
target_link_libraries(kwineffects ${DL_LIBRARY})
endif(DL_LIBRARY)
include_directories(${OPENGL_INCLUDE_DIR})
endif(OPENGL_FOUND AND NOT OPENGLES_FOUND)
endif(OPENGL_FOUND AND NOT KWIN_HAVE_OPENGLES_COMPOSITING)
if(OPENGLES_FOUND)
target_link_libraries(kwineffects ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES})
target_link_libraries(kwineffects LINK_INTERFACE_LIBRARIES ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES})

Loading…
Cancel
Save