Move xrandr to irrlicht cmake file and also fixed indentations
This commit is contained in:
parent
66cebbdbe7
commit
71334bac5b
@ -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()
|
||||
|
@ -12,36 +12,44 @@ if(MSVC OR APPLE)
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../libpng/")
|
||||
endif()
|
||||
|
||||
if (NOT SERVER_ONLY)
|
||||
if(NOT SERVER_ONLY)
|
||||
if(NOT USE_GLES2)
|
||||
find_package(OpenGL REQUIRED)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
find_package(X11 REQUIRED)
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
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)
|
||||
find_package(Wayland REQUIRED)
|
||||
include_directories(${WAYLAND_INCLUDE_DIR})
|
||||
|
||||
if(NOT WAYLAND_FOUND)
|
||||
message(FATAL_ERROR "Wayland not found.")
|
||||
endif()
|
||||
|
||||
add_definitions(-D_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
|
||||
if(ENABLE_WAYLAND_DEVICE)
|
||||
find_package(Wayland REQUIRED)
|
||||
include_directories(${WAYLAND_INCLUDE_DIR})
|
||||
|
||||
if(NOT WAYLAND_FOUND)
|
||||
message(FATAL_ERROR "Wayland not found.")
|
||||
endif()
|
||||
|
||||
add_definitions(-D_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
|
||||
endif()
|
||||
|
||||
if(USE_GLES2 OR ENABLE_WAYLAND_DEVICE)
|
||||
find_package(EGL REQUIRED)
|
||||
include_directories(${EGL_INCLUDE_DIR})
|
||||
|
||||
if(NOT EGL_FOUND)
|
||||
message(FATAL_ERROR "EGL not found.")
|
||||
endif()
|
||||
if(USE_GLES2 OR ENABLE_WAYLAND_DEVICE)
|
||||
find_package(EGL REQUIRED)
|
||||
include_directories(${EGL_INCLUDE_DIR})
|
||||
|
||||
if(NOT EGL_FOUND)
|
||||
message(FATAL_ERROR "EGL not found.")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DNO_IRR_COMPILE_WITH_OPENGL_)
|
||||
add_definitions(-DNO_IRR_COMPILE_WITH_X11_)
|
||||
@ -572,14 +580,21 @@ if(APPLE)
|
||||
endif()
|
||||
|
||||
add_library(stkirrlicht STATIC ${IRRLICHT_SOURCES})
|
||||
|
||||
target_link_libraries(stkirrlicht ${PNG_LIBRARY} ${JPEG_LIBRARY} ${ZLIB_LIBRARY})
|
||||
|
||||
if(USE_GLES2 OR ENABLE_WAYLAND_DEVICE)
|
||||
target_link_libraries(stkirrlicht ${EGL_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(ENABLE_WAYLAND_DEVICE)
|
||||
target_link_libraries(stkirrlicht ${WAYLAND_LIBRARIES})
|
||||
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()
|
||||
|
||||
if(ENABLE_WAYLAND_DEVICE)
|
||||
target_link_libraries(stkirrlicht ${WAYLAND_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
|
Loading…
Reference in New Issue
Block a user