Write and install pkg-config file
This commit is contained in:
@@ -28,6 +28,7 @@ set(tinyobjloader-examples-objsticher
|
||||
set(TINYOBJLOADER_CMAKE_DIR lib/cmake)
|
||||
set(TINYOBJLOADER_INCLUDE_DIR include)
|
||||
set(TINYOBJLOADER_LIBRARY_DIR lib)
|
||||
set(TINYOBJLOADER_PKGCONFIG_DIR lib/pkgconfig)
|
||||
|
||||
option(TINYOBJLOADER_BUILD_TEST_LOADER "Build Example Loader Application" OFF)
|
||||
option(TINYOBJLOADER_COMPILATION_SHARED "Build as shared library" OFF)
|
||||
@@ -88,6 +89,9 @@ write_basic_package_version_file(tinyobjloader-config-version.cmake
|
||||
SameMajorVersion
|
||||
)
|
||||
|
||||
#pkg-config file
|
||||
configure_file(tinyobjloader.pc.in tinyobjloader.pc @ONLY)
|
||||
|
||||
#Installation
|
||||
install ( TARGETS
|
||||
tinyobjloader
|
||||
@@ -115,3 +119,8 @@ install ( FILES
|
||||
DESTINATION
|
||||
${TINYOBJLOADER_CMAKE_DIR}
|
||||
)
|
||||
install ( FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/tinyobjloader.pc"
|
||||
DESTINATION
|
||||
${TINYOBJLOADER_PKGCONFIG_DIR}
|
||||
)
|
||||
|
||||
15
tinyobjloader.pc.in
Normal file
15
tinyobjloader.pc.in
Normal file
@@ -0,0 +1,15 @@
|
||||
# Generated by CMake @CMAKE_VERSION@ for @PROJECT_NAME@. Any changes to this
|
||||
# file will be overwritten by the next CMake run. The input file was
|
||||
# tinyobjloader.pc.in.
|
||||
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/@TINYOBJLOADER_LIBRARY_DIR@
|
||||
includedir=${prefix}/@TINYOBJLOADER_INCLUDE_DIR@
|
||||
|
||||
Name: @PROJECT_NAME@
|
||||
Description: Tiny but powerful single file wavefront obj loader
|
||||
URL: https://syoyo.github.io/tinyobjloader/
|
||||
Version: @TINYOBJLOADER_VERSION@
|
||||
Libs: -L${libdir} -ltinyobjloader
|
||||
Cflags: -I${includedir}
|
||||
Reference in New Issue
Block a user