Permalink
Browse files

submodule update

  • Loading branch information...
1 parent 4884d09 commit b0c5811b173617136341cc19343a4bd0bf3421be @SuperV1234 committed Apr 6, 2013
Showing with 44 additions and 121 deletions.
  1. +42 −68 cmake/FindJsonCpp.cmake
  2. +1 −52 cmake/FindSFML.cmake
  3. +1 −1 extlibs/SSVEntitySystem
View
110 cmake/FindJsonCpp.cmake
@@ -1,79 +1,53 @@
-# -*- cmake -*-
-
-# - Find JSONCpp
-# Find the JSONCpp includes and library
-# This module defines
-# JSONCPP_INCLUDE_DIR, where to find json.h, etc.
-# JSONCPP_LIBRARIES, the libraries needed to use jsoncpp.
-# JSONCPP_FOUND, If false, do not try to use jsoncpp.
-# also defined, but not for general use are
-# JSONCPP_LIBRARY, where to find the jsoncpp library.
-
-FIND_PATH(JSONCPP_INCLUDE_DIR
- NAMES jsoncpp/json.h
- PATH_SUFFIXES include/
- PATHS "${PROJECT_SOURCE_DIR}/../jsoncpp/"
- "${PROJECT_SOURCE_DIR}/extlibs/jsoncpp/"
- ${SSVENTITYSYSTEM_ROOT}
- $ENV{SSVENTITYSYSTEM_ROOT}
- /usr/local/
- /usr/
- /sw/ # Fink
- /opt/local/ # DarwinPorts
- /opt/csw/ # Blastwave
- /opt/
+EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion OUTPUT_VARIABLE _gcc_COMPILER_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so)
+IF(WIN32)
+ SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_mingw_libmt.a)
+ENDIF()
+
+set(FIND_JSONCPP_LIB_PATHS
+ "${PROJECT_SOURCE_DIR}/../jsoncpp/"
+ "${PROJECT_SOURCE_DIR}/extlibs/jsoncpp/"
+ ${JSONCPP_ROOT}
+ $ENV{JSONCPP_ROOT}
+ ~/Library/Frameworks
+ /Library/Frameworks
+ /usr/local
+ /usr/
+ /sw/
+ /opt/local
+ /opt/csw
+ /opt
)
+FIND_PATH(JSONCPP_INCLUDE_DIR
+ NAMES jsoncpp/json.h
+ PATH_SUFFIXES include/
+ PATHS ${FIND_JSONCPP_LIB_PATHS}
+)
message("\nFound JsonCpp include at: ${JSONCPP_INCLUDE_DIR}.\n")
-# Get the GCC compiler version
-EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
- ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
- OUTPUT_VARIABLE _gcc_COMPILER_VERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-
-SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so)
-
-IF (WIN32)
- SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_mingw_libmt.a)
-ENDIF ()
-
FIND_LIBRARY(JSONCPP_LIBRARY
- NAMES ${JSONCPP_NAMES}
- PATH_SUFFIXES lib/ lib64/ libs/ libs/mingw/
- PATHS "${PROJECT_SOURCE_DIR}/../jsoncpp/"
- "${PROJECT_SOURCE_DIR}/extlibs/jsoncpp/"
- ${SSVENTITYSYSTEM_ROOT}
- $ENV{SSVENTITYSYSTEM_ROOT}
- /usr/local/
- /usr/
- /sw/ # Fink
- /opt/local/ # DarwinPorts
- /opt/csw/ # Blastwave
- /opt/
+ NAMES ${JSONCPP_NAMES}
+ PATH_SUFFIXES lib/ lib64/ libs/ libs/mingw/
+ PATHS ${FIND_JSONCPP_LIB_PATHS}
)
-
message("\nFound JsonCpp library at: ${JSONCPP_LIBRARY}.\n")
-IF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
- SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
- SET(JSONCPP_FOUND "YES")
-ELSE (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
- SET(JSONCPP_FOUND "NO")
-ENDIF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
-
-IF (JSONCPP_FOUND)
- MESSAGE(STATUS "Found JSONCpp in ${JSONCPP_INCLUDE_DIR}")
-ELSE (JSONCPP_FOUND)
- IF (JSONCPP_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find JSONCpp library")
- ENDIF (JSONCPP_FIND_REQUIRED)
-ENDIF (JSONCPP_FOUND)
-
-# Deprecated declarations.
-SET (NATIVE_JSONCPP_INCLUDE_PATH ${JSONCPP_INCLUDE_DIR} )
-GET_FILENAME_COMPONENT (NATIVE_JSONCPP_LIB_PATH ${JSONCPP_LIBRARY} PATH)
+IF(JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
+ SET(JSONCPP_FOUND TRUE)
+ELSE()
+ SET(JSONCPP_FOUND FALSE)
+ENDIF()
+
+IF(JSONCPP_FOUND)
+ MESSAGE(STATUS "Found JSONCpp in ${JSONCPP_INCLUDE_DIR}")
+ELSE()
+ IF(JSONCPP_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find JSONCpp library")
+ ENDIF()
+ set(JSONCPP_ROOT "" CACHE PATH "JsonCpp top-level directory")
+ message("\n-> JsonCpp directory not found. Set SSVUTILS_ROOT to SSVUtils' top-level path (containing both \"include\" and \"lib\" directories).")
+ENDIF()
MARK_AS_ADVANCED(
JSONCPP_LIBRARY
View
53 cmake/FindSFML.cmake
@@ -1,55 +1,3 @@
-# This script locates the SFML library
-# ------------------------------------
-#
-# Usage
-# -----
-#
-# When you try to locate the SFML libraries, you must specify which modules you want to use (system, window, graphics, network, audio, main).
-# If none is given, the SFML_LIBRARIES variable will be empty and you'll end up linking to nothing.
-# example:
-# find_package(SFML COMPONENTS graphics window system) // find the graphics, window and system modules
-#
-# You can enforce a specific version, either MAJOR.MINOR or only MAJOR.
-# If nothing is specified, the version won't be checked (ie. any version will be accepted).
-# example:
-# find_package(SFML COMPONENTS ...) // no specific version required
-# find_package(SFML 2 COMPONENTS ...) // any 2.x version
-# find_package(SFML 2.4 COMPONENTS ...) // version 2.4 or greater
-#
-# By default, the dynamic libraries of SFML will be found. To find the static ones instead,
-# you must set the SFML_STATIC_LIBRARIES variable to TRUE before calling find_package(SFML ...).
-# In case of static linking, the SFML_STATIC macro will also be defined by this script.
-# example:
-# set(SFML_STATIC_LIBRARIES TRUE)
-# find_package(SFML 2 COMPONENTS network system)
-#
-# On Mac OS X if SFML_STATIC_LIBRARIES is not set to TRUE then by default CMake will search for frameworks unless
-# CMAKE_FIND_FRAMEWORK is set to "NEVER" for example. Please refer to CMake documentation for more details.
-# Moreover, keep in mind that SFML frameworks are only available as release libraries unlike dylibs which
-# are available for both release and debug modes.
-#
-# If SFML is not installed in a standard path, you can use the SFML_ROOT CMake (or environment) variable
-# to tell CMake where SFML is.
-#
-# Output
-# ------
-#
-# This script defines the following variables:
-# - For each specified module XXX (system, window, graphics, network, audio, main):
-# - SFML_XXX_LIBRARY_DEBUG: the name of the debug library of the xxx module (set to SFML_XXX_LIBRARY_RELEASE is no debug version is found)
-# - SFML_XXX_LIBRARY_RELEASE: the name of the release library of the xxx module (set to SFML_XXX_LIBRARY_DEBUG is no release version is found)
-# - SFML_XXX_LIBRARY: the name of the library to link to for the xxx module (includes both debug and optimized names if necessary)
-# - SFML_XXX_FOUND: true if either the debug or release library of the xxx module is found
-# - SFML_LIBRARIES: the list of all libraries corresponding to the required modules
-# - SFML_FOUND: true if all the required modules are found
-# - SFML_INCLUDE_DIR: the path where SFML headers are located (the directory containing the SFML/Config.hpp file)
-#
-# example:
-# find_package(SFML 2 COMPONENTS system window graphics audio REQUIRED)
-# include_directories(${SFML_INCLUDE_DIR})
-# add_executable(myapp ...)
-# target_link_libraries(myapp ${SFML_LIBRARIES})
-
# define the SFML_STATIC macro if static build was chosen
if(SFML_STATIC_LIBRARIES)
add_definitions(-DSFML_STATIC)
@@ -149,6 +97,7 @@ foreach(FIND_SFML_COMPONENT ${SFML_FIND_COMPONENTS})
# debug library
find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG
NAMES ${FIND_SFML_COMPONENT_NAME}-d
+ ${FIND_SFML_COMPONENT_NAME}-d-2
PATH_SUFFIXES lib64/ lib/
PATHS ${FIND_SFML_LIB_PATHS})
2 extlibs/SSVEntitySystem
@@ -1 +1 @@
-Subproject commit 3d3b96caa9d4fa2933431440025412f84c454be8
+Subproject commit acf11903c36fe5d8d5feec7995b45291fcb10921

0 comments on commit b0c5811

Please sign in to comment.