File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ set(tinyobjloader-examples-objsticher
2828set (TINYOBJLOADER_CMAKE_DIR lib/cmake)
2929set (TINYOBJLOADER_INCLUDE_DIR include)
3030set (TINYOBJLOADER_LIBRARY_DIR lib)
31+ set (TINYOBJLOADER_PKGCONFIG_DIR lib/pkgconfig)
3132
3233option (TINYOBJLOADER_BUILD_TEST_LOADER "Build Example Loader Application" OFF )
3334option (TINYOBJLOADER_COMPILATION_SHARED "Build as shared library" OFF )
@@ -88,6 +89,9 @@ write_basic_package_version_file(tinyobjloader-config-version.cmake
8889 SameMajorVersion
8990 )
9091
92+ #pkg-config file
93+ configure_file (tinyobjloader.pc.in tinyobjloader.pc @ONLY )
94+
9195#Installation
9296install ( TARGETS
9397 tinyobjloader
@@ -115,3 +119,8 @@ install ( FILES
115119 DESTINATION
116120 ${TINYOBJLOADER_CMAKE_DIR}
117121 )
122+ install ( FILES
123+ "${CMAKE_CURRENT_BINARY_DIR} /tinyobjloader.pc"
124+ DESTINATION
125+ ${TINYOBJLOADER_PKGCONFIG_DIR}
126+ )
Original file line number Diff line number Diff line change 1+ # Generated by CMake @CMAKE_VERSION@ for @PROJECT_NAME@. Any changes to this
2+ # file will be overwritten by the next CMake run. The input file was
3+ # tinyobjloader.pc.in.
4+
5+ prefix=@CMAKE_INSTALL_PREFIX@
6+ exec_prefix=${prefix}
7+ libdir=${prefix}/@TINYOBJLOADER_LIBRARY_DIR@
8+ includedir=${prefix}/@TINYOBJLOADER_INCLUDE_DIR@
9+
10+ Name: @PROJECT_NAME@
11+ Description: Tiny but powerful single file wavefront obj loader
12+ URL: https://syoyo.github.io/tinyobjloader/
13+ Version: @TINYOBJLOADER_VERSION@
14+ Libs: -L${libdir} -ltinyobjloader
15+ Cflags: -I${includedir}
You can’t perform that action at this time.
0 commit comments