Merge pull request #662 from dimi309/master
Modifications suggested by conan team #662
This commit is contained in:
commit
de205a16b5
1
util/conan-package/.gitignore
vendored
1
util/conan-package/.gitignore
vendored
@ -16,3 +16,4 @@ conanfile.pyc
|
|||||||
conaninfo.txt
|
conaninfo.txt
|
||||||
conanbuildinfo.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
|
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:
|
The package is hosted on [bintray](https://bintray.com/conan/conan-center?filterByPkgName=glm%3Ag-truc).
|
||||||
|
|
||||||
conan remote add bintraydimi309 https://api.bintray.com/conan/dimi309/conan-packages
|
|
||||||
|
|
||||||
It works on Windows (Visual Studio or MinGW), MacOS/OSX and Linux.
|
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"
|
url="https://github.com/g-truc/glm"
|
||||||
description="OpenGL Mathematics (GLM)"
|
description="OpenGL Mathematics (GLM)"
|
||||||
license = "https://github.com/g-truc/glm/blob/manual/copying.txt"
|
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):
|
def build(self):
|
||||||
self.output.warn("No compilation necessary for GLM")
|
self.output.info("No compilation necessary for GLM")
|
||||||
self.output.warn(os.sep.join([".", "..", "..", "*"]))
|
|
||||||
|
|
||||||
def package(self):
|
def package(self):
|
||||||
self.copy("FindGLM.cmake", ".", ".")
|
self.copy("FindGLM.cmake", ".", ".")
|
||||||
|
@ -3,11 +3,10 @@ cmake_minimum_required(VERSION 3.0.0)
|
|||||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||||
conan_basic_setup()
|
conan_basic_setup()
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CONAN_C_FLAGS}")
|
if(MSVC)
|
||||||
set(CMAKE_CXX_FLAGS "${CONAN_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "${CONAN_SHARED_LINKER_FLAGS}")
|
endif(MSVC)
|
||||||
|
|
||||||
add_executable(testGlm main.cpp)
|
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
|
from conans import ConanFile, CMake
|
||||||
import os
|
import os
|
||||||
|
|
||||||
channel = os.getenv("CONAN_CHANNEL", "testing")
|
|
||||||
username = os.getenv("CONAN_USERNAME", "g-truc")
|
|
||||||
|
|
||||||
class TestGlm(ConanFile):
|
class TestGlm(ConanFile):
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
requires = "glm/master@%s/%s" % (username, channel)
|
|
||||||
generators = "cmake"
|
generators = "cmake"
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user