zibbr

Random 3d and p2p stuff that was originally the beginnings of an overly ambitious p2p virtual world thingy
git clone https://code.literati.org/zibbr.git
Log | Files | Refs

FindMyGUI.cmake (1885B)


      1 # Find MyGUI includes and library
      2 #
      3 # This module defines
      4 #  MyGUI_INCLUDE_DIR
      5 #  MyGUI_LIBRARIES, the libraries to link against to use MyGUI.
      6 #  MyGUI_LIB_DIR, the location of the libraries
      7 #  MyGUI_FOUND, If false, do not try to use MyGUI
      8 #
      9 # Copyright © 2009, Andrew Fenn
     10 #
     11 # Redistribution and use is allowed according to the terms of the BSD license.
     12 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
     13 
     14 IF (MyGUI_LIBRARIES AND MyGUI_INCLUDE_DIR)
     15 	SET(MyGUI_FIND_QUIETLY TRUE) # Already in cache, be silent
     16 ENDIF (MyGUI_LIBRARIES AND MyGUI_INCLUDE_DIR)
     17 
     18 IF (WIN32) #Windows
     19    MESSAGE(STATUS "Using MyGUI in dependencies")
     20 	SET(MyGUI_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dependencies/mygui/MyGUIEngine/include)
     21 	SET(MyGUI_LIB_DIR ${CMAKE_SOURCE_DIR}/dependencies/mygui/MyGUIEngine/lib/Debug)
     22 	SET(MyGUI_LIBRARIES MyGUI)
     23 ELSE (WIN32) #Unix
     24 	CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR)
     25 	FIND_PACKAGE(PkgConfig)
     26 	PKG_SEARCH_MODULE(MyGUI MyGUI)
     27 	SET(MyGUI_INCLUDE_DIR ${MyGUI_INCLUDE_DIRS})
     28 	SET(MyGUI_LIB_DIR ${MyGUI_LIBDIR})
     29 	SET(MyGUI_LIBRARIES ${MyGUI_LIBRARIES} CACHE STRING "")
     30 ENDIF (WIN32)
     31 
     32 #Do some preparation
     33 SEPARATE_ARGUMENTS(MyGUI_INCLUDE_DIR)
     34 SEPARATE_ARGUMENTS(MyGUI_LIBRARIES)
     35 
     36 SET(MyGUI_INCLUDE_DIR ${MyGUI_INCLUDE_DIR} CACHE PATH "")
     37 SET(MyGUI_LIBRARIES ${MyGUI_LIBRARIES} CACHE STRING "")
     38 SET(MyGUI_LIB_DIR ${MyGUI_LIB_DIR} CACHE PATH "")
     39 
     40 IF (MyGUI_INCLUDE_DIR AND MyGUI_LIBRARIES)
     41 	SET(MyGUI_FOUND TRUE)
     42 ENDIF (MyGUI_INCLUDE_DIR AND MyGUI_LIBRARIES)
     43 
     44 IF (MyGUI_FOUND)
     45 	IF (NOT MyGUI_FIND_QUIETLY)
     46 		MESSAGE(STATUS "  libraries : ${MyGUI_LIBRARIES} from ${MyGUI_LIB_DIR}")
     47 		MESSAGE(STATUS "  includes  : ${MyGUI_INCLUDE_DIR}")
     48 	ENDIF (NOT MyGUI_FIND_QUIETLY)
     49 ELSE (MyGUI_FOUND)
     50 	IF (MyGUI_FIND_REQUIRED)
     51 		MESSAGE(FATAL_ERROR "Could not find MyGUI")
     52 	ENDIF (MyGUI_FIND_REQUIRED)
     53 ENDIF (MyGUI_FOUND)