mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 12:41:54 +00:00
Merge pull request #662 from dimi309/master
Modifications suggested by conan team #662
This commit is contained in:
commit
de205a16b5
3
util/conan-package/.gitignore
vendored
3
util/conan-package/.gitignore
vendored
@ -15,4 +15,5 @@ test_package/build
|
||||
conanfile.pyc
|
||||
conaninfo.txt
|
||||
conanbuildinfo.txt
|
||||
conanbuildinfo.cmake
|
||||
conanbuildinfo.cmake
|
||||
!FindGLM.cmake
|
||||
|
10
util/conan-package/FindGLM.cmake
Normal file
10
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)
|
@ -1,8 +1,5 @@
|
||||
Conan package for the [GLM](https://github.com/g-truc/glm) library
|
||||
|
||||
The package is hosted on [bintray](https://bintray.com/dimi309/conan-packages/glm%3Ag-truc). Until it gets accepted to the conan-center repository, in order to use it, you need to add this repository as a remote to your conan installation:
|
||||
|
||||
conan remote add bintraydimi309 https://api.bintray.com/conan/dimi309/conan-packages
|
||||
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.
|
||||
|
||||
|
@ -8,11 +8,11 @@ class GlmConan(ConanFile):
|
||||
url="https://github.com/g-truc/glm"
|
||||
description="OpenGL Mathematics (GLM)"
|
||||
license = "https://github.com/g-truc/glm/blob/manual/copying.txt"
|
||||
exports = ["FindGLM.cmake", "lib_licenses/*", os.sep.join([".", "..", "..", "*"])]
|
||||
exports_sources = ["FindGLM.cmake", os.sep.join(["..", "..", "glm*"])]
|
||||
exports = "lib_licenses/*"
|
||||
|
||||
def build(self):
|
||||
self.output.warn("No compilation necessary for GLM")
|
||||
self.output.warn(os.sep.join([".", "..", "..", "*"]))
|
||||
self.output.info("No compilation necessary for GLM")
|
||||
|
||||
def package(self):
|
||||
self.copy("FindGLM.cmake", ".", ".")
|
||||
|
@ -3,11 +3,10 @@ cmake_minimum_required(VERSION 3.0.0)
|
||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
conan_basic_setup()
|
||||
|
||||
set(CMAKE_C_FLAGS "${CONAN_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CONAN_CXX_FLAGS}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CONAN_SHARED_LINKER_FLAGS}")
|
||||
if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
|
||||
endif(MSVC)
|
||||
|
||||
add_executable(testGlm main.cpp)
|
||||
TARGET_COMPILE_DEFINITIONS(testGlm PUBLIC "${CONAN_DEFINES}")
|
||||
TARGET_LINK_LIBRARIES(testGlm PUBLIC "${CONAN_LIBS}")
|
||||
SET_TARGET_PROPERTIES(testGlm PROPERTIES LINK_FLAGS "${CONAN_EXE_LINKER_FLAGS}")
|
||||
|
||||
|
||||
|
@ -1,12 +1,8 @@
|
||||
from conans import ConanFile, CMake
|
||||
import os
|
||||
|
||||
channel = os.getenv("CONAN_CHANNEL", "testing")
|
||||
username = os.getenv("CONAN_USERNAME", "g-truc")
|
||||
|
||||
class TestGlm(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
requires = "glm/master@%s/%s" % (username, channel)
|
||||
generators = "cmake"
|
||||
|
||||
def build(self):
|
||||
|
Loading…
Reference in New Issue
Block a user