Merge pull request #119 from jamiesnape/fix-cmake-dir

Add MIT license file, use GNUInstallDirs module, fix cmake directory location
This commit is contained in:
Syoyo Fujita
2016-12-29 01:55:00 +09:00
committed by GitHub
2 changed files with 36 additions and 6 deletions

View File

@@ -25,10 +25,14 @@ set(tinyobjloader-examples-objsticher
)
#Install destinations
set(TINYOBJLOADER_CMAKE_DIR lib/cmake)
set(TINYOBJLOADER_INCLUDE_DIR include)
set(TINYOBJLOADER_LIBRARY_DIR lib)
set(TINYOBJLOADER_PKGCONFIG_DIR lib/pkgconfig)
include(GNUInstallDirs)
set(TINYOBJLOADER_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake)
set(TINYOBJLOADER_DOC_DIR ${CMAKE_INSTALL_DOCDIR})
set(TINYOBJLOADER_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR})
set(TINYOBJLOADER_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
set(TINYOBJLOADER_PKGCONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
set(TINYOBJLOADER_RUNTIME_DIR ${CMAKE_INSTALL_BINDIR})
option(TINYOBJLOADER_BUILD_TEST_LOADER "Build Example Loader Application" OFF)
option(TINYOBJLOADER_COMPILATION_SHARED "Build as shared library" OFF)
@@ -64,7 +68,7 @@ if(TINYOBJLOADER_BUILD_OBJ_STICHER)
install(TARGETS
obj_sticher
DESTINATION
bin
${TINYOBJLOADER_RUNTIME_DIR}
)
endif()
@@ -101,7 +105,7 @@ install(TARGETS
PUBLIC_HEADER DESTINATION
${TINYOBJLOADER_INCLUDE_DIR}
RUNTIME DESTINATION
bin
${TINYOBJLOADER_RUNTIME_DIR}
)
install(EXPORT
${PROJECT_NAME}-targets
@@ -113,6 +117,11 @@ install(FILES
DESTINATION
${TINYOBJLOADER_INCLUDE_DIR}
)
install(FILES
LICENSE
DESTINATION
${TINYOBJLOADER_DOC_DIR}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/tinyobjloader-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/tinyobjloader-config-version.cmake"

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2012-2016 Syoyo Fujita and many contributors.
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.