Skip to content

Commit

Permalink
Add 'Android/CMake/' from commit 'a8aca8ed1be03b3405c09bfe7ab2869f31e…
Browse files Browse the repository at this point in the history
…a143a'

git-subtree-dir: Android/CMake
git-subtree-mainline: d16712c
git-subtree-split: a8aca8e
  • Loading branch information
asmodehn committed Apr 22, 2014
0 parents commit 1d572ee
Show file tree
Hide file tree
Showing 51 changed files with 17,620 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
@@ -0,0 +1,6 @@
branches:
only:
- test



1,570 changes: 1,570 additions & 0 deletions Doxyfile.wk

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions LICENSE
@@ -0,0 +1,23 @@
Copyright (c) 2013, AlexV
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 changes: 25 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,25 @@
Copyright (c) 2009, Asmodehn's Corp.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Asmodehn's Corp. nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61 changes: 61 additions & 0 deletions Modules/FindBullet.cmake
@@ -0,0 +1,61 @@
# - Try to find Bullet
# Once done this will define
#
# Bullet_FOUND - system has Bullet
# Bullet_INCLUDE_DIRS - the Bullet include directories
# Bullet_LIBRARIES - link these to use Bullet

include(LibFindMacros)

#Dependencies
#NONE

# Use pkg-config to get hints about paths
# NO pkg-config for now at least

# Include dir
#paths is there to work around bug in cmake 2.6 on debian
# no_default_path avoid stupid path being setup by cmake
find_path(Bullet_INCLUDE_DIR
NAMES btBulletDynamicsCommon.h
PATH_SUFFIXES bullet Bullet
)

# libraries
#TODO : separate into COMPONENTS properly if possible
find_library(Bullet_COLLISION_LIBRARY
NAMES BulletCollision
)
find_library(Bullet_DYNAMICS_LIBRARY
NAMES BulletDynamics
)
find_library(Bullet_MULTITHREADED_LIBRARY
NAMES BulletMultiThreaded
)
find_library(Bullet_SOFTBODY_LIBRARY
NAMES BulletSoftBody
)
find_library(Bullet_SOFTBODYSOLVERS_LIBRARY
NAMES BulletSoftBodySolvers_CPU BulletSoftBodySolvers_OpenCL_Mini
)
find_library(Bullet_MATH_LIBRARY
NAMES LinearMath
)
find_library(Bullet_MINICL_LIBRARY
NAMES MiniCL
)

# Set the include dir variables and the variables and let libfind_process do the rest.
# NOTE : Singular variables for this library, plural for libraries this lib depends on
set(Bullet_PROCESS_INCLUDES Bullet_INCLUDE_DIR)
set(Bullet_PROCESS_LIBS Bullet_SOFTBODY_LIBRARY
Bullet_SOFTBODYSOLVERS_LIBRARY
Bullet_DYNAMICS_LIBRARY
Bullet_COLLISION_LIBRARY
Bullet_MINICL_LIBRARY
Bullet_MATH_LIBRARY
Bullet_MULTITHREADED_LIBRARY
)

libfind_process(Bullet)

110 changes: 110 additions & 0 deletions Modules/FindGuichan.cmake
@@ -0,0 +1,110 @@
# - 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 (Guichan_INCLUDE_DIR AND Guichan_LIBRARY)

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 (NOT Guichan_FIND_QUIETLY AND NOT Guichan_QUIET)

ENDIF (Guichan_INCLUDE_DIR AND Guichan_LIBRARY)

# 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 (NOT GUICHAN_FOUND AND Guichan_FIND_REQUIRED)

# Check for guichan components
FOREACH (COMPONENT ${Guichan_FIND_COMPONENTS})
SET(COMPONENT_FOUND FALSE)

IF (COMPONENT STREQUAL "SDL")
SET(COMPONENT_FOUND TRUE)

IF (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(Guichan_HEADER "sdl.hpp")
SET(Guichan_LIBRARY_${COMPONENT} TRUE)
ELSE (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(Guichan_HEADER "guichan/sdl.hpp")
SET(Guichan_LIBRARY "guichan_sdl")
ENDIF (CMAKE_SYSTEM_NAME STREQUAL "Darwin")

ENDIF (COMPONENT STREQUAL "SDL")

IF (COMPONENT STREQUAL "OpenGL")
SET(COMPONENT_FOUND TRUE)

IF (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(Guichan_HEADER "opengl.hpp")
SET(Guichan_LIBRARY_${COMPONENT} TRUE)
ELSE (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(Guichan_HEADER "guichan/opengl.hpp")
SET(Guichan_LIBRARY "guichan_opengl")
ENDIF (CMAKE_SYSTEM_NAME STREQUAL "Darwin")

ENDIF (COMPONENT STREQUAL "OpenGL")

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 (Guichan_LIBRARY_${COMPONENT})
SET(Guichan_QUIET FALSE)
ENDIF (Guichan_LIBRARY_${COMPONENT})

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 (NOT EXISTS ${Guichan_INCLUDE_DIR}/${Guichan_HEADER} OR
NOT Guichan_LIBRARY_${COMPONENT})

IF (NOT Guichan_FIND_QUIETLY AND NOT Guichan_QUIET)
MESSAGE(STATUS "Found Guichan ${COMPONENT}: ${Guichan_LIBRARY_${COMPONENT}}")
ENDIF (NOT Guichan_FIND_QUIETLY AND NOT Guichan_QUIET)

SET(GUICHAN_LIBRARIES ${GUICHAN_LIBRARIES} ${Guichan_LIBRARY_${COMPONENT}})
ENDFOREACH(COMPONENT)
34 changes: 34 additions & 0 deletions Modules/FindLuaJIT.cmake
@@ -0,0 +1,34 @@
# - Try to find LuaJIT 2.0
# Once done this will define
#
# LuaJIT_FOUND - system has LuaJIT
# LuaJIT_INCLUDE_DIRS - the LuaJIT include directory
# LuaJIT_LIBRARIES - the libraries needed to use LuaJIT
#

include(LibFindMacros)

#Dependencies
#NONE

#Use pkg-config to get hints about paths
#No pkg-config for LuaJIT

#Include dir
find_path(LuaJIT_INCLUDE_DIR
NAMES luajit.h
PATH_SUFFIXES luajit-2.0
)

#Library
find_library(LuaJIT_LIBRARY
NAMES luajit-5.1 lua51
)

#Set the include dir variables and teh libraries and let the libfind_process do the work.
#NOTE : Singuler variables for this library, plural for libraries this lib depends on.
set(LuaJIT_PROCESS_INCLUDES LuaJIT_INCLUDE_DIR)
set(LuaJIT_PROCESS_LIBS LuaJIT_LIBRARY)

libfind_process(LuaJIT)

33 changes: 33 additions & 0 deletions Modules/FindMySQL++.cmake
@@ -0,0 +1,33 @@
# - Try to find MySQL++ includes and client library
# Once done, this will define
# MySQL++_INCLUDE_DIRS, where to find mysql.h
# MySQL++_LIBRARIES, the libraries needed to use MySQL.
# MySQL++_FOUND, If false, do not try to use MySQL.
#
include(LibFindMacros)

#Dependencies
libfind_package(MySQL++ MySql REQUIRED)

#Use pkg-config to get hints bout paths
#no pkg-config for now

#Include dir
FIND_PATH(MySQL++_INCLUDE_DIR
NAMES "mysql++.h"
PATH_SUFFIXES "mysql++"
)

FIND_LIBRARY(MySQL++_LIBRARY
NAMES "mysqlpp"
)

# set the include dir variables and the libraries and let libfind_process do the rest
# NOTE : Singular variables for this library, plural for libraries this lib depends on.
set(MySQLpp_PROCESS_INCLUDES MySQL++_INCLUDE_DIR MySql_INCLUDE_DIRS )
set(MySQLpp_PROCESS_LIBS MySQL++_LIBRARY MySql_LIBRARIES)

#we change the name to MySQLpp here to be able to include it in header files, define directives, etc.
libfind_process(MySQLpp)


83 changes: 83 additions & 0 deletions Modules/FindMySql.cmake
@@ -0,0 +1,83 @@
# - Try to find MySQL includes and client library
# Once done, this will define
# MySql_INCLUDE_DIRS, where to find mysql.h
# MySql_LIBRARIES, the libraries needed to use MySQL.
# MySql_FOUND, If false, do not try to use MySQL.
#
include(LibFindMacros)

#Dependencies
#NONE

#Use pkg-config to get hints bout paths
#no pkg-config for now

#Use mysql-config to get hints about paths
find_program(MySql_CONFIG
NAMES mysql_config
)

if(MySql_CONFIG)
message(STATUS "Using mysql-config: ${MySql_CONFIG}")
# set INCLUDE_DIR
exec_program(${MySql_CONFIG}
ARGS --include
OUTPUT_VARIABLE MY_TMP)

string(REGEX REPLACE "-I([^ ]*)( .*)?" "\\1" MY_TMP "${MY_TMP}")

set(MySql_CONFIG_INCLUDE_DIR ${MY_TMP} CACHE FILEPATH INTERNAL)

# set LIBRARY_DIR
exec_program(${MySql_CONFIG}
ARGS --libs_r
OUTPUT_VARIABLE MY_TMP)

set(MySql_CONFIG_LIBRARIES "")

string(REGEX MATCHALL "-l[^ ]*" MySql_LIB_LIST "${MY_TMP}")
foreach(LIB ${MySql_LIB_LIST})
string(REGEX REPLACE "[ ]*-l([^ ]*)" "\\1" LIB "${LIB}")
list(APPEND MySql_CONFIG_LIBRARIES "${LIB}")
endforeach(LIB ${MySql_LIBS})

set(MySql_CONFIG_LIBRARY_PATH "")

string(REGEX MATCHALL "-L[^ ]*" MySql_LIBDIR_LIST "${MY_TMP}")
foreach(LIB ${MySql_LIBDIR_LIST})
string(REGEX REPLACE "[ ]*-L([^ ]*)" "\\1" LIB "${LIB}")
list(APPEND MySql_CONFIG_LIBRARY_PATH "${LIB}")
endforeach(LIB ${MySql_LIBS})

else(MySql_CONFIG)
set(MySql_CONFIG_LIBRARIES "")
list(APPEND MySql_CONFIG_LIBRARIES "mysqlclient")
endif(MySql_CONFIG)

#Include dir
FIND_PATH(MySql_INCLUDE_DIR
NAMES mysql.h
PATHS ${MySql_CONFIG_INCLUDE_DIR}
PATH_SUFFIXES mysql
)

#Libraries
FIND_LIBRARY(MySql_LIBRARY
NAMES ${MySql_CONFIG_LIBRARIES}
PATHS ${MySql_CONFIG_LIBRARY_PATH}
PATH_SUFFIXES mysql
)

# set the include dir variables and the libraries and let libfind_process do the rest
# NOTE : Singular variables for this library, plural for libraries this lib depends on.
set(MySql_PROCESS_INCLUDES MySql_INCLUDE_DIR )
set(MySql_PROCESS_LIBS MySql_LIBRARY )

libfind_process(MySql)







0 comments on commit 1d572ee

Please sign in to comment.