diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-30 21:13:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-30 21:16:08 +0300 |
commit | 5ab65c9e4f1fb42248b83e2f6ffb8980453914dc (patch) | |
tree | 99bd961563b93f9fdc7b2f0a9fe0cb536f1fc5ee | |
parent | f4f5aa5d603cc49615e3c7e58d7963e01310af84 (diff) | |
download | manaverse-5ab65c9e4f1fb42248b83e2f6ffb8980453914dc.tar.gz manaverse-5ab65c9e4f1fb42248b83e2f6ffb8980453914dc.tar.bz2 manaverse-5ab65c9e4f1fb42248b83e2f6ffb8980453914dc.tar.xz manaverse-5ab65c9e4f1fb42248b83e2f6ffb8980453914dc.zip |
Add guichan files to cmake and remove deps on guichan libs.
-rw-r--r-- | CMake/Modules/FindGuichan.cmake | 100 | ||||
-rw-r--r-- | src/CMakeLists.txt | 100 |
2 files changed, 93 insertions, 107 deletions
diff --git a/CMake/Modules/FindGuichan.cmake b/CMake/Modules/FindGuichan.cmake deleted file mode 100644 index dbc863e2f..000000000 --- a/CMake/Modules/FindGuichan.cmake +++ /dev/null @@ -1,100 +0,0 @@ -# - Try to find Guichan -# Once done this will define -# -# GUICHAN_FOUND - system has Guichan -# GUICHAN_INCLUDE_DIR - the Guichan include directory -# GUICHAN_LIBRARIES - the libraries needed to use Guichan -# -# Supported components: SDL OpenGL -# -# TODO: Clean up the components stuff and try to add all known -# components when none are specified. May not bail out for not found -# components then, set some var instead... - -# Be quiet if Guichan was already found -# We need an extra variable to have the check per component - -IF (Guichan_INCLUDE_DIR AND Guichan_LIBRARY) - SET(Guichan_QUIET TRUE) -ENDIF () - -FIND_PATH(Guichan_INCLUDE_DIR - NAMES guichan.hpp - PATHS /usr/include /usr/local/include - ) - -FIND_LIBRARY(Guichan_LIBRARY - NAMES guichan - PATHS /usr/lib /usr/local/lib - ) - -MARK_AS_ADVANCED(Guichan_INCLUDE_DIR Guichan_LIBRARY) - -IF (Guichan_INCLUDE_DIR AND Guichan_LIBRARY) - SET(GUICHAN_FOUND TRUE) - SET(GUICHAN_INCLUDE_DIR ${Guichan_INCLUDE_DIR}) - SET(GUICHAN_LIBRARIES ${Guichan_LIBRARY}) - - IF (NOT Guichan_FIND_QUIETLY AND NOT Guichan_QUIET) - MESSAGE(STATUS "Found Guichan: ${Guichan_LIBRARY}") - ENDIF () -ENDIF () - -# Bail out if Guichan is not found but required -IF (NOT GUICHAN_FOUND AND Guichan_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could NOT find Guichan library ${GUICHAN_INCLUDE_DIR}") -ENDIF () - -# Check for guichan components -FOREACH (COMPONENT ${Guichan_FIND_COMPONENTS}) - SET(COMPONENT_FOUND FALSE) - - IF (COMPONENT STREQUAL "SDL") - SET(COMPONENT_FOUND TRUE) - SET(Guichan_HEADER "guichan/sdl.hpp") - SET(Guichan_LIBRARY "guichan_sdl") - ENDIF () - - IF (COMPONENT STREQUAL "OpenGL") - SET(COMPONENT_FOUND TRUE) - SET(Guichan_HEADER "guichan/opengl.hpp") - SET(Guichan_LIBRARY "guichan_opengl") - ENDIF () - - IF (NOT COMPONENT_FOUND) - MESSAGE(FATAL_ERROR "Invalid Guichan component: ${COMPONENT}") - ENDIF (NOT COMPONENT_FOUND) - - # Check if we already found this component - IF (Guichan_LIBRARY_${COMPONENT}) - SET(Guichan_QUIET TRUE) - ELSE () - SET(Guichan_QUIET FALSE) - ENDIF () - - FIND_LIBRARY(Guichan_LIBRARY_${COMPONENT} - NAMES ${Guichan_LIBRARY} - PATHS /usr/lib /usr/local/lib - ) - - MARK_AS_ADVANCED(Guichan_LIBRARY_${COMPONENT}) - - IF (NOT EXISTS ${Guichan_INCLUDE_DIR}/${Guichan_HEADER} OR - NOT Guichan_LIBRARY_${COMPONENT}) - SET(GUICHAN_FOUND FALSE) - MESSAGE(FATAL_ERROR "Could NOT find Guichan component ${COMPONENT}") - ENDIF () - - # Check guichan >= 0.8.0 by searching for the widgetlistener.hpp file. - SET(Guichan_HEADER "guichan/widgetlistener.hpp") - IF (NOT EXISTS ${Guichan_INCLUDE_DIR}/${Guichan_HEADER}) - SET(GUICHAN_FOUND FALSE) - MESSAGE(FATAL_ERROR "Guichan version is less than 0.8.0") - ENDIF() - - IF (NOT Guichan_FIND_QUIETLY AND NOT Guichan_QUIET) - MESSAGE(STATUS "Found Guichan ${COMPONENT}: ${Guichan_LIBRARY_${COMPONENT}}") - ENDIF () - - SET(GUICHAN_LIBRARIES ${GUICHAN_LIBRARIES} ${Guichan_LIBRARY_${COMPONENT}}) -ENDFOREACH() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6a15306ba..29a0c610d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -55,9 +55,6 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL SunOS) SET(EXTRA_LIBRARIES intl) ENDIF() -SET(GUICHAN_COMPONENTS "SDL") -FIND_PACKAGE(Guichan REQUIRED ${GUICHAN_COMPONENTS}) - IF (WITH_OPENGL) FIND_PACKAGE(OpenGL REQUIRED) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) @@ -82,7 +79,6 @@ INCLUDE_DIRECTORIES( ${PHYSFS_INCLUDE_DIR} ${CURL_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR} - ${GUICHAN_INCLUDE_DIR} ) # enable rc-handling with mingw @@ -576,6 +572,97 @@ SET(SRCS mumblemanager.h ) +SET(SRCS_GUICHAN + guichan/actionevent.hpp + guichan/actionlistener.hpp + guichan/basiccontainer.hpp + guichan/cliprectangle.hpp + guichan/color.hpp + guichan/defaultfont.hpp + guichan/event.hpp + guichan/exception.hpp + guichan/focushandler.hpp + guichan/focuslistener.hpp + guichan/font.hpp + guichan/graphics.hpp + guichan/gui.hpp + guichan/image.hpp + guichan/imageloader.hpp + guichan/input.hpp + guichan/inputevent.hpp + guichan/key.hpp + guichan/keyevent.hpp + guichan/keyinput.hpp + guichan/keylistener.hpp + guichan/listmodel.hpp + guichan/mouseevent.hpp + guichan/mouseinput.hpp + guichan/mouselistener.hpp + guichan/platform.hpp + guichan/rectangle.hpp + guichan/selectionevent.hpp + guichan/sdl/sdlgraphics.hpp + guichan/sdl/sdlimage.hpp + guichan/sdl/sdlpixel.hpp + guichan/widget.hpp + guichan/widgetlistener.hpp + guichan/widgets/button.hpp + guichan/widgets/checkbox.hpp + guichan/widgets/container.hpp + guichan/widgets/dropdown.hpp + guichan/widgets/icon.hpp + guichan/widgets/imagebutton.hpp + guichan/widgets/label.hpp + guichan/widgets/listbox.hpp + guichan/widgets/radiobutton.hpp + guichan/widgets/scrollarea.hpp + guichan/widgets/slider.hpp + guichan/widgets/tabbedarea.hpp + guichan/widgets/tab.hpp + guichan/widgets/textbox.hpp + guichan/widgets/textfield.hpp + guichan/widgets/window.hpp + guichan/actionevent.cpp + guichan/basiccontainer.cpp + guichan/cliprectangle.cpp + guichan/color.cpp + guichan/defaultfont.cpp + guichan/event.cpp + guichan/exception.cpp + guichan/focushandler.cpp + guichan/font.cpp + guichan/graphics.cpp + guichan/gui.cpp + guichan/image.cpp + guichan/inputevent.cpp + guichan/key.cpp + guichan/keyevent.cpp + guichan/keyinput.cpp + guichan/mouseevent.cpp + guichan/mouseinput.cpp + guichan/rectangle.cpp + guichan/selectionevent.cpp + guichan/widget.cpp + guichan/sdl/sdlgraphics.cpp + guichan/sdl/sdlimage.cpp + guichan/widgets/button.cpp + guichan/widgets/checkbox.cpp + guichan/widgets/container.cpp + guichan/widgets/dropdown.cpp + guichan/widgets/icon.cpp + guichan/widgets/imagebutton.cpp + guichan/widgets/label.cpp + guichan/widgets/listbox.cpp + guichan/widgets/radiobutton.cpp + guichan/widgets/scrollarea.cpp + guichan/widgets/slider.cpp + guichan/widgets/tabbedarea.cpp + guichan/widgets/tab.cpp + guichan/widgets/textbox.cpp + guichan/widgets/textfield.cpp + guichan/widgets/window.cpp + ) + SET(SRCS_EVOL net/ea/adminhandler.cpp net/ea/adminhandler.h @@ -718,9 +805,9 @@ ENDIF () SET (PROGRAMS manaplus) IF (ENABLE_MANASERV) - ADD_EXECUTABLE(manaplus WIN32 ${SRCS} ${SRCS_MANASERV} ${SRCS_TMWA} ${SRCS_EVOL}) + ADD_EXECUTABLE(manaplus WIN32 ${SRCS_GUICHAN} ${SRCS} ${SRCS_MANASERV} ${SRCS_TMWA} ${SRCS_EVOL}) ELSE(ENABLE_MANASERV) - ADD_EXECUTABLE(manaplus WIN32 ${SRCS} ${SRCS_TMWA} ${SRCS_EVOL}) + ADD_EXECUTABLE(manaplus WIN32 ${SRCS_GUICHAN} ${SRCS} ${SRCS_TMWA} ${SRCS_EVOL}) ENDIF(ENABLE_MANASERV) TARGET_LINK_LIBRARIES(manaplus @@ -734,7 +821,6 @@ TARGET_LINK_LIBRARIES(manaplus ${PHYSFS_LIBRARY} ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES} - ${GUICHAN_LIBRARIES} ${OPENGL_LIBRARIES} ${LIBINTL_LIBRARIES} ${EXTRA_LIBRARIES}) |