Move xrandr to irrlicht cmake file and also fixed indentations

This commit is contained in:
Deve 2017-09-18 22:14:43 +02:00
parent 66cebbdbe7
commit 71334bac5b
2 changed files with 42 additions and 31 deletions

View File

@ -255,10 +255,6 @@ if(UNIX AND NOT APPLE AND NOT SERVER_ONLY)
find_package(X11 REQUIRED)
include_directories(${X11_INCLUDE_DIR})
if(NOT X11_Xrandr_FOUND)
message(FATAL_ERROR "XRANDR not found.")
endif()
if(USE_LIBBFD)
find_package(Libbfd)
if(LIBBFD_FOUND)
@ -418,7 +414,7 @@ if(NOT SERVER_ONLY)
endif()
if(UNIX AND NOT APPLE)
target_link_libraries(supertuxkart ${X11_X11_LIB} ${X11_Xrandr_LIB})
target_link_libraries(supertuxkart ${X11_X11_LIB})
if(USE_LIBBFD)
target_link_libraries(supertuxkart ${LIBBFD_LIBRARIES})
endif()

View File

@ -21,6 +21,14 @@ if (NOT SERVER_ONLY)
if(UNIX AND NOT APPLE)
find_package(X11 REQUIRED)
include_directories(${X11_INCLUDE_DIR})
if(NOT X11_FOUND)
message(FATAL_ERROR "X11 not found.")
endif()
if(NOT X11_Xrandr_FOUND)
message(FATAL_ERROR "XRANDR not found.")
endif()
endif()
if(ENABLE_WAYLAND_DEVICE)
@ -572,8 +580,14 @@ if(APPLE)
endif()
add_library(stkirrlicht STATIC ${IRRLICHT_SOURCES})
target_link_libraries(stkirrlicht ${PNG_LIBRARY} ${JPEG_LIBRARY} ${ZLIB_LIBRARY})
if(NOT SERVER_ONLY)
if(UNIX AND NOT APPLE)
target_link_libraries(stkirrlicht ${X11_X11_LIB} ${X11_Xrandr_LIB})
endif()
if(USE_GLES2 OR ENABLE_WAYLAND_DEVICE)
target_link_libraries(stkirrlicht ${EGL_LIBRARY})
endif()
@ -581,6 +595,7 @@ endif()
if(ENABLE_WAYLAND_DEVICE)
target_link_libraries(stkirrlicht ${WAYLAND_LIBRARIES})
endif()
endif()
if(WIN32)
target_link_libraries(stkirrlicht imm32 xinput9_1_0)