diff options
-rw-r--r-- | CMake/Modules/FindSDL_gfx.cmake | 39 | ||||
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/CMakeLists.txt | 23 |
3 files changed, 3 insertions, 62 deletions
diff --git a/CMake/Modules/FindSDL_gfx.cmake b/CMake/Modules/FindSDL_gfx.cmake deleted file mode 100644 index 74c1c6c7..00000000 --- a/CMake/Modules/FindSDL_gfx.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# - Try to find SDL_gfx -# Once done this will define -# -# SDLGFX_FOUND - system has SDL_gfx -# SDLGFX_INCLUDE_DIR - the SDL_gfx include directory - -# Be quiet if SDL_gfx was already found -IF (SDL_gfx_INCLUDE_DIR AND SDL_gfx_LIBRARY) - SET(SDL_gfx_QUIET TRUE) -ENDIF (SDL_gfx_INCLUDE_DIR AND SDL_gfx_LIBRARY) - - -FIND_PATH(SDL_gfx_INCLUDE_DIR - NAMES SDL_rotozoom.h - PATH_SUFFIXES SDL - ) - -FIND_LIBRARY(SDL_gfx_LIBRARY - NAMES SDL_gfx - PATHS /usr/lib /usr/local/lib - ) - -MARK_AS_ADVANCED(SDL_gfx_INCLUDE_DIR SDL_gfx_LIBRARY) - - -IF (SDL_gfx_INCLUDE_DIR AND SDL_gfx_LIBRARY) - SET(SDLGFX_FOUND TRUE) - SET(SDLGFX_INCLUDE_DIR ${SDL_gfx_INCLUDE_DIR}) - SET(SDLGFX_LIBRARIES ${SDL_gfx_LIBRARY}) - - IF (NOT SDL_gfx_FIND_QUIETLY AND NOT SDL_gfx_QUIET) - MESSAGE(STATUS "Found SDL_gfx: ${SDL_gfx_LIBRARY}") - ENDIF (NOT SDL_gfx_FIND_QUIETLY AND NOT SDL_gfx_QUIET) -ENDIF (SDL_gfx_INCLUDE_DIR AND SDL_gfx_LIBRARY) - -# Bail out if SDL_gfx is not found but required -IF (NOT SDLGFX_FOUND AND SDL_gfx_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could NOT find SDL_gfx library ${SDLGFX_INCLUDE_DIR}") -ENDIF (NOT SDLGFX_FOUND AND SDL_gfx_FIND_REQUIRED) diff --git a/CMakeLists.txt b/CMakeLists.txt index afbb6f5a..430fdbc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.1) -CMAKE_POLICY(VERSION 3.1) +CMAKE_MINIMUM_REQUIRED(VERSION 3.1...3.27) PROJECT(MANA) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 68cba816..750c83bc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,13 +1,8 @@ include(FindPkgConfig) -pkg_check_modules(SDL2 REQUIRED sdl2>=2.0.1) -pkg_check_modules(SDL2IMAGE REQUIRED SDL2_image) -pkg_check_modules(SDL2MIXER REQUIRED SDL2_mixer) -pkg_check_modules(SDL2NET REQUIRED SDL2_net) -pkg_check_modules(SDL2TTF REQUIRED SDL2_ttf) -pkg_check_modules(SDL2GFX REQUIRED SDL2_gfx) +pkg_check_modules(SDL2 REQUIRED sdl2>=2.0.1 SDL2_image SDL2_mixer SDL2_net SDL2_ttf SDL2_gfx) +pkg_check_modules(PHYSFS REQUIRED physfs>=3.0.0) FIND_PACKAGE(CURL REQUIRED) FIND_PACKAGE(LibXml2 REQUIRED) -FIND_PACKAGE(PhysFS REQUIRED) FIND_PACKAGE(PNG REQUIRED) FIND_PACKAGE(Gettext REQUIRED) @@ -22,10 +17,6 @@ IF (CMAKE_COMPILER_IS_GNUCXX) ENDIF() ENDIF() -IF (POLICY CMP0015) - CMAKE_POLICY(SET CMP0015 OLD) -ENDIF() - IF (ENABLE_MANASERV) INCLUDE_DIRECTORIES("../libs/enet/include") LINK_DIRECTORIES("../libs/enet") @@ -77,11 +68,6 @@ ENDIF (WITH_OPENGL) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${SDL2_INCLUDE_DIRS} - ${SDL2IMAGE_INCLUDE_DIRS} - ${SDL2MIXER_INCLUDE_DIRS} - ${SDL2NET_INCLUDE_DIRS} - ${SDL2TTF_INCLUDE_DIRS} - ${SDL2GFX_INCLUDE_DIRS} ${PNG_INCLUDE_DIR} ${PHYSFS_INCLUDE_DIR} ${CURL_INCLUDE_DIR} @@ -654,11 +640,6 @@ ENDIF(ENABLE_MANASERV) TARGET_LINK_LIBRARIES(mana ${INTERNAL_LIBRARIES} ${SDL2_LIBRARIES} - ${SDL2GFX_LIBRARIES} - ${SDL2IMAGE_LIBRARIES} - ${SDL2MIXER_LIBRARIES} - ${SDL2NET_LIBRARIES} - ${SDL2TTF_LIBRARIES} ${PNG_LIBRARIES} ${PHYSFS_LIBRARY} ${CURL_LIBRARIES} |