diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 53 |
1 files changed, 20 insertions, 33 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6c0b3081..7aa6cdcb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,9 +1,10 @@ -FIND_PACKAGE(SDL REQUIRED) -FIND_PACKAGE(SDL_image REQUIRED) -FIND_PACKAGE(SDL_mixer REQUIRED) -FIND_PACKAGE(SDL_net REQUIRED) -FIND_PACKAGE(SDL_ttf REQUIRED) -FIND_PACKAGE(SDL_gfx REQUIRED) +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) FIND_PACKAGE(CURL REQUIRED) FIND_PACKAGE(LibXml2 REQUIRED) FIND_PACKAGE(PhysFS REQUIRED) @@ -69,8 +70,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL SunOS) SET(EXTRA_LIBRARIES intl) ENDIF() -SET(GUICHAN_COMPONENTS "SDL") -FIND_PACKAGE(Guichan REQUIRED ${GUICHAN_COMPONENTS}) +FIND_PACKAGE(Guichan REQUIRED) IF (WITH_OPENGL) FIND_PACKAGE(OpenGL REQUIRED) @@ -87,12 +87,12 @@ ENDIF (USE_X11) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} - ${SDL_INCLUDE_DIR} - ${SDLIMAGE_INCLUDE_DIR} - ${SDLMIXER_INCLUDE_DIR} - ${SDLNET_INCLUDE_DIR} - ${SDLTTF_INCLUDE_DIR} - ${SDLGFX_INCLUDE_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} @@ -116,19 +116,6 @@ IF (MINGW) "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -O coff -o <OBJECT> <SOURCE>") ENDIF() -# Fix some stuff that gets not hidden by mainline modules -MARK_AS_ADVANCED(PHYSFS_INCLUDE_DIR) -MARK_AS_ADVANCED(PHYSFS_LIBRARY) -MARK_AS_ADVANCED(SDLIMAGE_INCLUDE_DIR) -MARK_AS_ADVANCED(SDLIMAGE_LIBRARY) -MARK_AS_ADVANCED(SDLMAIN_LIBRARY) -MARK_AS_ADVANCED(SDLMIXER_INCLUDE_DIR) -MARK_AS_ADVANCED(SDLMIXER_LIBRARY) -MARK_AS_ADVANCED(SDLNET_INCLUDE_DIR) -MARK_AS_ADVANCED(SDLNET_LIBRARY) -MARK_AS_ADVANCED(SDL_INCLUDE_DIR) -MARK_AS_ADVANCED(SDL_LIBRARY) - SET(SRCS gui/widgets/avatarlistbox.cpp gui/widgets/avatarlistbox.h @@ -677,12 +664,12 @@ ENDIF(ENABLE_MANASERV) TARGET_LINK_LIBRARIES(mana ${INTERNAL_LIBRARIES} - ${SDLGFX_LIBRARIES} - ${SDL_LIBRARY} - ${SDLIMAGE_LIBRARY} - ${SDLMIXER_LIBRARY} - ${SDLNET_LIBRARY} - ${SDLTTF_LIBRARY} + ${SDL2_LIBRARIES} + ${SDL2GFX_LIBRARIES} + ${SDL2IMAGE_LIBRARIES} + ${SDL2MIXER_LIBRARIES} + ${SDL2NET_LIBRARIES} + ${SDL2TTF_LIBRARIES} ${PNG_LIBRARIES} ${PHYSFS_LIBRARY} ${CURL_LIBRARIES} |