mirror of
https://github.com/HandmadeMath/HandmadeMath.git
synced 2025-10-09 18:26:32 +00:00
Commit all of GLM into this branch because why not
I do not like it but I have done it portability ftw
This commit is contained in:
19
test/glm/util/conan-package/.gitignore
vendored
Normal file
19
test/glm/util/conan-package/.gitignore
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
#Backup files
|
||||
*\~
|
||||
*swp
|
||||
|
||||
#OSX
|
||||
Thumbs.db
|
||||
.DS_Store
|
||||
|
||||
#Emacs buffers
|
||||
\#*\#
|
||||
\.#*
|
||||
|
||||
#Conan
|
||||
test_package/build
|
||||
conanfile.pyc
|
||||
conaninfo.txt
|
||||
conanbuildinfo.txt
|
||||
conanbuildinfo.cmake
|
||||
!FindGLM.cmake
|
10
test/glm/util/conan-package/FindGLM.cmake
Normal file
10
test/glm/util/conan-package/FindGLM.cmake
Normal file
@@ -0,0 +1,10 @@
|
||||
FIND_PATH(
|
||||
GLM_INCLUDE_DIR
|
||||
NAMES
|
||||
glm
|
||||
PATHS
|
||||
include)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLM REQUIRED_VARS GLM_INCLUDE_DIR)
|
5
test/glm/util/conan-package/README.md
Normal file
5
test/glm/util/conan-package/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Conan package for the [GLM](https://github.com/g-truc/glm) library
|
||||
|
||||
The package is hosted on [bintray](https://bintray.com/conan/conan-center?filterByPkgName=glm%3Ag-truc).
|
||||
|
||||
It works on Windows (Visual Studio or MinGW), MacOS/OSX and Linux.
|
20
test/glm/util/conan-package/conanfile.py
Normal file
20
test/glm/util/conan-package/conanfile.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import os
|
||||
from conans import ConanFile
|
||||
|
||||
class GlmConan(ConanFile):
|
||||
name = "glm"
|
||||
version = "master"
|
||||
generators = "txt"
|
||||
url="https://github.com/g-truc/glm"
|
||||
description="OpenGL Mathematics (GLM)"
|
||||
license = "https://github.com/g-truc/glm/blob/manual/copying.txt"
|
||||
exports_sources = ["FindGLM.cmake", os.sep.join(["..", "..", "glm*"])]
|
||||
exports = "lib_licenses/*"
|
||||
|
||||
def build(self):
|
||||
self.output.info("No compilation necessary for GLM")
|
||||
|
||||
def package(self):
|
||||
self.copy("FindGLM.cmake", ".", ".")
|
||||
self.copy("*", src="glm", dst=os.sep.join([".", "include", "glm"]))
|
||||
self.copy("lib_licenses/license*", dst="licenses", ignore_case=True, keep_path=False)
|
11
test/glm/util/conan-package/lib_licenses/LICENSE1.txt
Normal file
11
test/glm/util/conan-package/lib_licenses/LICENSE1.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
The Happy Bunny License (Modified MIT License)
|
||||
|
||||
Copyright (c) 2005 - 2017 G-Truc Creation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
Restrictions: By making use of the Software for military purposes, you choose to make a Bunny unhappy.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
9
test/glm/util/conan-package/lib_licenses/LICENSE2.txt
Normal file
9
test/glm/util/conan-package/lib_licenses/LICENSE2.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2005 - 2017 G-Truc Creation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
12
test/glm/util/conan-package/test_package/CMakeLists.txt
Normal file
12
test/glm/util/conan-package/test_package/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
project(GlmTest)
|
||||
cmake_minimum_required(VERSION 3.0.0)
|
||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
conan_basic_setup()
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
|
||||
endif(MSVC)
|
||||
|
||||
add_executable(testGlm main.cpp)
|
||||
|
||||
|
15
test/glm/util/conan-package/test_package/conanfile.py
Normal file
15
test/glm/util/conan-package/test_package/conanfile.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from conans import ConanFile, CMake
|
||||
import os
|
||||
|
||||
class TestGlm(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
generators = "cmake"
|
||||
|
||||
def build(self):
|
||||
cmake = CMake(self)
|
||||
self.run('cmake "%s" %s' % (self.conanfile_directory, cmake.command_line))
|
||||
self.run("cmake --build . %s" % cmake.build_config)
|
||||
|
||||
def test(self):
|
||||
self.run(os.sep.join([".","bin", "testGlm"]))
|
||||
|
6
test/glm/util/conan-package/test_package/main.cpp
Normal file
6
test/glm/util/conan-package/test_package/main.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
#include "glm/glm.hpp"
|
||||
|
||||
int main (){
|
||||
glm::mat4x4 aMatrix;
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user